Language models for Enterprise apps

Status: being rolled out, not available yet. This page describes model connections as sota is rolling them out. Until they are switched on, the dashboard shows no Models page, the API has no /v1/enterprise/models routes and apps get none of the variables below. Your AI assistant sees the state in get-account (GET /v1/account answers "models_enabled": false until then); you can also ask us.

A model connection is one provider key of your company, stored once for the whole sota Enterprise account, together with the model your apps use by default. Every app of the account gets the key and the model as environment variables when it is deployed. Nobody has to copy the key into each app, and changing it is one step.

sota only stores the key and hands it to your apps. The apps call the provider directly, on your company's own contract with that provider. sota does not sit between the app and the provider, and it does not count, limit or bill the calls: usage and cost are in the provider's own console (for Anthropic the Claude Console, for OpenAI the OpenAI platform, for Mistral the Mistral console).

Model connections exist only on sota Enterprise accounts.

Providers

ProviderWhat you enterThe key is checked with
AnthropicAn API key and the default modelGET https://api.anthropic.com/v1/models (active models only)
OpenAIAn API key and the default modelGET https://api.openai.com/v1/models
MistralAn API key and the default modelGET https://api.mistral.ai/v1/models
OpenAI-compatible endpointThe endpoint's base address, an API key and the default modelGET <base address>/models

The base address of an OpenAI-compatible endpoint is the address an OpenAI client takes as its base URL, usually ending in /v1 (for example https://llm.example.com/v1). The endpoint has to answer GET <base address>/models with a bearer key, in OpenAI's list format.

Who can manage it

  • The owner and the admins of the Enterprise account add, change, test and delete connections and switch them off and on per app, in the sota dashboard under Enterprise → Models. They see the provider, the base address, the default model, the result of the last key test and the last four characters of the key (•••• abcd). Nobody ever sees more of the key, the owner included.
  • Developers of the account see, for every app they work on, which connections exist, the provider, the default model, the test state and the variable names. sota never shows them the key or its last four characters (code they deploy into an app can still read it, see who can read the key), and they cannot change a connection.
  • API keys, team keys and AI assistants cannot add, read or change a connection: the routes accept only a dashboard sign-in. An assistant connected over MCP sees the same as a developer.

Every change (add, change, new key, delete, test, per-app switch) is recorded in sota's audit log with who did it, without the key or its last four characters.

For the owner: step by step

  1. Add a connection. On Enterprise → Models, click Add connection and pick the provider. For an OpenAI-compatible endpoint enter its base address. Paste the API key.
  2. Load the models. Click Load models. sota asks the provider once for the models this key may use (a read-only call; nothing is stored yet) and offers them in a list. If the list does not load, you can type the model id instead.
  3. Save. Pick or type the default model and click Save connection. Saving tests the key once more and shows the result: Verified, or Test failed with a plain sentence and the provider's own message (see test results). A failed test does not stop the save, so you can save first and fix the key at the provider afterwards.
  4. Replace the key. Replace key takes a new key; saving tests it at once. For an OpenAI-compatible endpoint the same dialog changes the base address. A new base address always needs the key again: sota never sends a stored key to an address it was not saved for.
  5. Change the model. Change model offers the provider's list again, or a typed id. No key is needed for that. Test again checks the stored key and loads the list again.
  6. Switch a connection off for one app. Each connection lists the account's apps with a switch. Every app is on by default, new apps too. Switch one off and that app no longer gets the connection's variables from its next deploy on.
  7. Redeploy the apps that still run with old values. A change reaches an app only when it is deployed again (see when a change takes effect). The page lists them under Apps running with old values and offers Redeploy per app and Redeploy all, which redeploys them one after the other.
  8. Delete a connection. Delete connection first lists the apps whose running version holds this key, and the apps that are deploying right now (sota cannot tell yet whether they get it). If sota could not check the apps, the dialog says so; when in doubt, revoke the key at the provider. Read what deleting does before you confirm.

The provider of a connection cannot be changed: delete it and add a new one.

What an app gets

At every deploy, redeploy, rollback and project move, each app of the account gets these variables for every connection that is not switched off for that app:

ProviderVariableWhat it holdsWho reads it
AnthropicANTHROPIC_API_KEYthe keyAnthropic's official SDKs, by themselves
AnthropicANTHROPIC_MODELthe default model idyour app's code (Claude Code also reads it)
OpenAIOPENAI_API_KEYthe keyOpenAI's official SDKs, by themselves
OpenAIOPENAI_MODELthe default model idyour app's code
MistralMISTRAL_API_KEYthe keyMistral's official Python and TypeScript clients, by themselves
MistralMISTRAL_MODELthe default model idyour app's code
OpenAI-compatibleOPENAI_COMPATIBLE_BASE_URLthe base addressyour app's code
OpenAI-compatibleOPENAI_COMPATIBLE_API_KEYthe keyyour app's code
OpenAI-compatibleOPENAI_COMPATIBLE_MODELthe default model idyour app's code
allSOTA_MODELSJSON: the connections this app got, their default models and variable names, never a keyyour app's code or an assistant

The SDKs do not read the *_MODEL variables: pass the model id from them in your code instead of hard-coding it. An OpenAI-compatible endpoint has its own OPENAI_COMPATIBLE_* names on purpose, so it never takes the place of the OpenAI connection; pass both values to an OpenAI client explicitly.

SOTA_MODELS is one line of JSON. It is set only when the app gets at least one variable from the account. An example (the value is shown on several lines here), for an app with an Anthropic connection whose app sets ANTHROPIC_MODEL itself, and an OpenAI-compatible endpoint:

{
  "version": 1,
  "connections": [
    {
      "provider": "anthropic",
      "default_model": "m-a",
      "key_owner": "customer",
      "env": { "api_key": "ANTHROPIC_API_KEY", "model": "ANTHROPIC_MODEL" },
      "overridden": ["ANTHROPIC_MODEL"]
    },
    {
      "provider": "openai_compatible",
      "base_url": "https://llm.example.test/v1",
      "default_model": "m-custom",
      "key_owner": "customer",
      "env": { "api_key": "OPENAI_COMPATIBLE_API_KEY", "model": "OPENAI_COMPATIBLE_MODEL", "base_url": "OPENAI_COMPATIBLE_BASE_URL" },
      "overridden": []
    }
  ]
}

overridden lists the names the app sets itself (they keep the app's value, see below). key_owner is customer: the key is your company's own.

Using the variables in code

# Python: the Anthropic SDK reads ANTHROPIC_API_KEY by itself
import os
import anthropic

client = anthropic.Anthropic()
reply = client.messages.create(
    model=os.environ["ANTHROPIC_MODEL"],
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
// Node.js: an OpenAI-compatible endpoint, both values passed explicitly
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: process.env.OPENAI_COMPATIBLE_BASE_URL,
  apiKey: process.env.OPENAI_COMPATIBLE_API_KEY,
});
const reply = await client.chat.completions.create({
  model: process.env.OPENAI_COMPATIBLE_MODEL,
  messages: [{ role: "user", content: "Hello" }],
});

Never put a provider key into code, into an uploaded file or into the app's own variables when the account has a connection for that provider.

Names sota never sets

The official clients also read these variables, and sota does not set any of them in this version:

ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_CUSTOM_HEADERS, OPENAI_BASE_URL, OPENAI_ORG_ID, OPENAI_PROJECT_ID.

If an app sets one of them itself, it changes where or how its client sends the account's key: a base URL sends the key to another server, an auth token or extra headers change what the client sends, and an organization or project id changes which part of the provider account the calls are booked to. Set them only when you mean exactly that.

An app's own variable wins

If an app already has a project variable (an environment variable set in sota for the app) with one of these names, it keeps its own value. sota never overwrites, changes or deletes a project variable you set. A value built into the image (an ENV line in the Dockerfile) is not a project variable: the account's value replaces it in the running container; set it as a project variable instead if the app must keep its own. The rule applies per name: an app that sets only ANTHROPIC_MODEL still gets ANTHROPIC_API_KEY from the account. The dashboard marks the connection for that app as overridden in this app (the app sets the key itself) or model set by the app (it sets only the model or the base address). Names are compared exactly, upper and lower case included.

To use the account's connection in such an app, delete the app's own variable and redeploy.

On the app's Environment tab the dashboard shows the account's variables under From the account, by name and without a value. They are not part of the app's own variables (GET /v1/projects/{projectID}/envs lists only those), and there is no way to reveal their values.

When a change takes effect

An app gets the account's current values when it is deployed, redeployed, rolled back or moved to another server: each of these builds the app's environment again. Until then the running app keeps the values it started with. A restart of the container, by Docker or by sota's watchdog, does not change them.

So after a new key, a new default model, a switch per app or a delete, redeploy the apps that should get the change. A redeploy starts the image that is running again, with the app's and the account's current variables, without a new build, blue-green behind the health check (the dashboard's Redeploy, POST /v1/projects/{projectID}/redeploy, or the redeploy tool over MCP).

Apps running with old values in the dashboard lists every app whose running version has values that differ from what a deploy would give it now, with the reason: a connection is new for the app, a key, model or address changed, a connection was deleted or switched off while the running app still holds its key, or the app's own variables changed which names come from the account.

Deleting a connection

Deleting a connection deletes sota's copy of the key from the platform database (the encrypted database backups keep it until they age out). Apps no longer get its variables from their next deploy or redeploy on.

Apps that are running keep the key until they are redeployed. sota does not reach into running containers, and it cannot revoke a key at the provider. To stop the key being used at once, revoke it in the provider's console; then redeploy the apps listed under Apps running with old values.

Who can read the key

Whoever can deploy code into an app can read the app's environment, including this key: the central store saves copying and makes rotation one step, it does not hide the key from the company's own developers.

A developer of your account can, for example, deploy code that prints ANTHROPIC_API_KEY. sota cannot prevent that in this version. If a key must not reach a developer, do not give that developer access to apps that get it (switch the connection off for those apps, or keep the developer out of them).

Where the key lives

  • At sota: encrypted (AES-256-GCM) in sota's platform database in Germany, and in that database's encrypted backups. sota's API never returns it after you saved it; only its last four characters are shown to the owner and the admins.
  • On the server your apps run on: at deploy time sota decrypts the key into the app container's environment, on the server the account's apps run on (for sota Enterprise, your company's own server), like every other environment variable of the app. There Docker keeps the container's configuration, including its environment, on the server's disk, readable by root; if backups of that server are switched on, they contain it too.
  • Never: in build logs, in container images, in the stored source of your apps, in the edge's routing files, in audit entries, in error messages, or in any answer of sota's API, the dashboard, the SDK or the MCP server.

Calls from the app go from your company's server straight to the provider, over the internet, from the server's fixed outgoing IP (network). What the provider does with the calls is governed by your company's contract with that provider.

Limits in this version

  • One connection per provider per account: one Anthropic, one OpenAI, one Mistral and one OpenAI-compatible endpoint. A second one of the same kind is refused (model_connection_exists).
  • Anthropic keys scoped to one workspace. A key scoped to the whole organization needs an anthropic-workspace-id header on every request, and sota sets no extra header variables in this version (no ANTHROPIC_CUSTOM_HEADERS). Create the key in one workspace of the Claude Console. An organization-scoped key shows Test failed with the provider's 400 answer.
  • Mistral's default server. sota checks a Mistral key against https://api.mistral.ai, and Mistral's clients use that server by default. To use Mistral's EU server, the app selects it in its own code (the Python client takes server="eu"); no variable sets it.
  • Custom endpoints: the base address must be https:// on port 443, at most 512 characters, without user name, query or fragment, and its host must resolve to public IPv4 addresses outside sota (sota calls model endpoints over IPv4 only: an IPv6 address, or a host with IPv6 addresses only, is refused). An app on sota, a custom domain that points at sota and a sota server are refused, and so are private and internal networks. sota does not follow redirects and checks the address again at every test.
  • The key: 16 to 512 printable ASCII characters without spaces. Spaces around a pasted key are removed.
  • The model id: starts with a letter or digit and has at most 200 letters, digits or . _ : / @ + -.
  • The model list: at most 1,000 model ids are kept from a provider's answer. A test waits at most 10 seconds and reads at most 4 MiB.
  • Changes: at most 10 changes per minute per account (add, change, delete, load models, test, per-app switch), counted together for the owner and the admins.

Test results

When sota tests a key, the dashboard shows one of these. The provider's own message is shown too, with anything that looks like a key removed.

CodeDashboard sentence
invalid_keyThe provider did not accept this key.
forbiddenThe provider refused this key access to the model list.
not_foundNo model list at this address; check the base address (an OpenAI-compatible address usually ends in /v1).
bad_requestThe provider refused the request. (For Anthropic: if this is a key scoped to the whole organization: it needs a workspace header, which sota does not set in this version; use a key scoped to one workspace.)
rate_limitedThe provider is limiting requests for this key right now; try again in a minute.
provider_errorThe provider had an error; try again later.
timeoutThe provider did not answer within 10 seconds; try again.
unreachablesota could not reach this address (name, connection or certificate failed).
blocked_by_policyThis address is not reachable from sota: it must be a public HTTPS address on port 443 outside sota (an app on sota or a sota server is not allowed).
bad_responseThe answer was not a model list; you can still type the model id.

API

The dashboard uses these routes. They accept only a dashboard sign-in of the owner or an admin; an API key or team key gets 403 session_required, a developer of the account and an account that is not sota Enterprise get 404 not_enterprise. No answer ever contains the key.

Method and pathWhat it does
GET /v1/enterprise/modelsThe account's connections, per connection its apps with their state, and the apps running with old values
POST /v1/enterprise/models/checkTests a key and returns the provider's model list; stores nothing
POST /v1/enterprise/modelsAdds a connection (provider, base_url for openai_compatible only, api_key, default_model) and tests it
GET /v1/enterprise/models/{connectionID}One connection
PATCH /v1/enterprise/models/{connectionID}New key, new base address (with the key), new default model. Send the connection's version as you read it: if someone changed the connection meanwhile the answer is 409 model_connection_conflict and nothing is sent to the provider
DELETE /v1/enterprise/models/{connectionID}Deletes the connection
POST /v1/enterprise/models/{connectionID}/testTests the stored key again and loads the model list
PUT /v1/enterprise/models/{connectionID}/apps/{projectID}Switches the connection off or on for one app ({"enabled": false})

Everyone who works on an app (owner, admins, developers of that app) reads what it gets with GET /v1/projects/{projectID}/models: the connections, the variable names, which of them the app sets itself, which are in the running app, and whether a redeploy is needed, never a value. GET /v1/account names the account's connections and the variable names (models_enabled, models). The SDK has getProjectModels(projectId) and Account.models.

Error codes

HTTPCodeWhen (dashboard sentence where there is one)
422provider_invalidThe provider is not one of anthropic, openai, mistral, openai_compatible, or a change tried to change the provider.
422api_key_invalidThe key must be 16 to 512 characters without spaces.
422api_key_requiredEnter the key again to use it with the new address.
422model_id_invalidThe model id must start with a letter or digit and hold at most 200 letters, digits or . _ : / @ + -
422base_url_invalidThe base address must be an https:// address on port 443, at most 512 characters, without user name, query or fragment (or a base address was given for a provider that takes none).
422base_url_blockedThis address is not reachable from sota: it must be a public HTTPS address on port 443 outside sota (an app on sota or a sota server is not allowed).
422validation_errorThe per-app switch was sent without enabled.
409model_connection_existsThere is already a connection for this provider. Change or delete that one instead.
409model_connection_conflictThe connection was changed at the same time (or the version sent is no longer the connection's). Reload the page and try again.
404model_connection_not_foundThis connection no longer exists.
404model_app_not_foundThe app is not in this account.
404not_enterpriseModels are only available for Enterprise accounts (also the answer for a developer).
400invalid_bodyThe request could not be read (not JSON, over 16 KiB, or an unknown field).
429rate_limitedToo many changes in a short time. Wait a minute and try again.
403session_requiredAn API key or team key was used; sign in to the dashboard.

A provider refusing the key is not an API error: the connection is saved and its test shows Test failed with one of the test results. An error message never quotes the key.

For AI assistants

The sota MCP server tells assistants, once model connections are switched on: when get-account lists a model connection, never ask the user for a provider key; if the account has none for the provider the app needs, tell the owner to add one on Enterprise → Models. deploy and get-status print a Models block with the variable names the app got and whether a redeploy is needed; get-env lists them without values. The rules word for word are on build with your AI agent; the tools are described on MCP tools.

Read on: build with your AI agent, environment variables, network, known limits.