Skip to main content
Version: v5.7.0

opschain admin model-providers create

packs:ai-agents

Registers a model provider. The code (the estate identifier agent manifests reference and the gateway path carries) and the kind are immutable after create; everything else can change through the update verb. The API key is write-only: supply it through --credential-env (the name of an environment variable holding it) or --credential-prompt (a no-echo prompt), never on the command line; it is encrypted at rest and no read ever returns it.

Creating a provider requires the packs:ai-agents entitlement — the typed FEATURE_ENTITLEMENT_REQUIRED refusal names it.

ANTHROPIC_KEY=sk-ant-... opschain admin model-providers create demo-anthropic \
--kind anthropic --credential-env ANTHROPIC_KEY
Created model provider demo-anthropic (kind anthropic)

The endpoint defaults per kind for the hosted kinds (https://api.anthropic.com for anthropic, https://api.openai.com/v1 for openai — the OpenAI-SDK base URL shape, version segment included); --endpoint overrides it for a proxied or self-hosted compatible endpoint.

The Azure kinds target inference endpoints in your own Azure tenancy, so --endpoint is required — there is no platform default:

  • azure-foundry-anthropic — Claude models deployed in Azure AI Foundry, speaking the Anthropic wire format: --endpoint https://<resource>.services.ai.azure.com/anthropic.
  • azure-openai — GPT-family models on Azure OpenAI, speaking the OpenAI chat-completions wire at your deployment URL; a legacy deployment's api-version rides in the endpoint string itself, e.g. --endpoint "https://<resource>.openai.azure.com/openai/deployments/<name>?api-version=2024-10-21" (or the v1 shape https://<resource>.openai.azure.com/openai/v1).

Authentication to the Azure kinds is by API key (the gateway injects x-api-key for azure-foundry-anthropic, api-key for azure-openai); Microsoft Entra ID authentication is a planned follow-up.

The openai-compatible kind registers a model you host yourself — vLLM, Ollama, TGI, llama.cpp server, LiteLLM or any other stack speaking the OpenAI wire format. --endpoint is required (your own base URL, e.g. --endpoint https://models.internal.example/v1) and the credential is optional: with one stored the gateway sends it as Authorization: Bearer, without one it sends no auth header at all — the usual shape for an unauthenticated or mTLS-fronted internal endpoint. The --ssl-verify and --ssl-ca-cert flags cover endpoints behind a private certificate authority. The gateway forwards requests and responses faithfully and never translates the protocol, so wire-format fidelity is the hosting stack's responsibility.

Reference custody​

Custody is reference-first: --credential-ref pins an existing secret-vault:// reference, resolved at write time through a registered server-resolved secrets provider - an unresolvable reference refuses by name - and clears any at-rest value. An inline credential is held encrypted at rest in the server's database on the record itself (never written into a vault) and clears the reference; a server with no secrets provider registered still holds it. No read ever carries the value.

The provider-level model budget​

A provider record can carry a token ceiling per window — what the estate will spend with this provider as a whole, across every agent and every call brokered through it — beside the per-agent caps that live on trust grants:

ANTHROPIC_KEY=sk-ant-... opschain admin model-providers create demo-anthropic \
--kind anthropic --credential-env ANTHROPIC_KEY \
--tokens-per-day 2000000 --tokens-per-month 40000000

The gateway checks every window of the agent's grants first, then every window of the provider, and refuses the first one over its ceiling by name (model provider demo-anthropic: tokens per local day ceiling of 2000000 reached — resets at …), recording warn:trust:cap_refused with scope: provider; at model_usage.cap_warning_fraction of a window warn:trust:cap_approaching warns once per period. The ceiling is a fact of one provider's contract — there is no estate default. See opschain docs model-providers.

Flags​

FlagMeaning
--server <url>Server base URL (default: the active context / OPSCHAIN_SERVER).
--auth-token <token>Admin bearer token override (default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login).
--kind <kind>Provider kind: anthropic, openai, azure-foundry-anthropic, azure-openai or openai-compatible. Immutable after create.
--display-name <name>Human-readable provider name.
--endpoint <url>Endpoint base URL (empty: the kind's default where one exists; required for the Azure kinds and openai-compatible).
--tokens-per-minute <n>, --tokens-per-day <n>, --tokens-per-week <n>, --tokens-per-month <n>, --tokens-per-quarter <n>, --tokens-per-year <n>The provider-level model budget: a ceiling on model tokens per window across every agent and every call through this provider, enforced at the model gateway after the agents' own grant caps (the first window over its ceiling refuses by name with the local boundary it resets at). The windows are the grant's six — a sliding minute and the calendar day, week, month, fiscal quarter and fiscal year on the estate's reporting calendar. 0 or unmentioned: no ceiling on that window; there is no estate default.
--data-handling-approvedMarks the entry's data-processing terms as reviewed and approved for lanes that process customer-submitted content (default false — a new entry is unreviewed). The approval is a property of this entry, so a future or custom provider inherits the same one-time check; record the review's outcome before setting it.
--ssl-verifyVerify the endpoint's TLS certificate (default true; --ssl-verify=false is an explicit opt-out for self-signed endpoints).
--ssl-ca-cert <path-or-pem>CA trust anchor for the endpoint connection: a PEM block inline or a certificate file path on the server host.
--enabledWhether the gateway serves calls for this provider (default true).
--credential-ref <ref>secret-vault:// reference to pin as the credential (mutually exclusive with the inline channel).
--credential-promptPrompt for the API key without echo.

See also​

  • opschain docs cli/admin-model-providers-update — rotation and enable/disable.