Inference Providers

Update LiteLLM key or key creation

Changed on

Verifies and stores a new organization LiteLLM key (org mode) or LiteLLM admin key (member and issued modes), and in issued mode changes how keys are created, then syncs. Changing issueStrategy replaces existing created keys at that sync. For a provider whose members sign in with Microsoft: changes oauthTenantId, oauthClientId, oauthClientSecret, oauthScope and/or modelIds without contacting the proxy; with company SSO: oidcIssuer, oauthClientId, oauthClientSecret, oidcScope and/or modelIds, likewise; changing any sign-in setting revokes every member's token and cancels pending sign-ins, so people sign in again. The proxy URL and mode are fixed; create a new provider to change them. Keys are write-only. Requires the Manage Gateway providers permission and Gateway management; session callers must recently reauthenticate.

patch/v1/inference-providers/{inferenceProviderId}/litellm

Request

  • Base URL
    https://api.openworklabs.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Path parameters

inferenceProviderId, string typeid required

Den TypeID with 'ipr_' prefix and a 26-character base32 suffix.

Request body

object required
apiKey, string
issueStrategy, 'per_team' | 'mirror'

issued mode. per_team: one key per LiteLLM team the person belongs to, or one key without a team when they are in none. mirror: a copy of their oldest active key (team, models, aliases, tags, expiry; never key-level budgets or rate limits).

mirrorFallback, 'per_team' | 'error'

issued + mirror: for someone with no key to copy, create per-team keys, or report them and create nothing.

oauthTenantId, string

Directory (tenant) ID of the Entra ID tenant, a GUID.

oauthClientId, string

Application (client) ID of the Entra app registration people sign in to.

oauthClientSecret, string

A client secret of that app registration. Write-only.

oauthScope, string

One API scope that app registration exposes, for example api://<application-id>/access. LiteLLM must accept access tokens for it; Microsoft Graph and Azure Cognitive Services scopes are refused.

oidcIssuer, string

Issuer URL of the authorization server people sign in with, exactly as its discovery document names it, for example https://example.okta.com/oauth2/default. OpenWork reads <oidcIssuer>/.well-known/openid-configuration. It must issue signed access tokens (JWTs) LiteLLM can check; Okta's org authorization server does not, so use a custom one.

oidcScope, string

The API scopes that authorization server issues LiteLLM access tokens for, separated by spaces, for example litellm. OpenWork adds openid, profile and offline_access itself.

modelIds, string[]

The LiteLLM model names people may use. OpenWork holds no LiteLLM key in this mode, so it cannot read them from the proxy.

Response

Update LiteLLM key or key creation

object required
inferenceProvider, GatewayProviderDetails required
sync, object required

Changes

    • info

      added the optional property inferenceProvider/litellm/signInCheck to the response with the status

    • warning

      added the new oauth_oidc enum value to the inferenceProvider/credentials/items/kind response property for the response status

    • warning

      added the new oidc enum value to the inferenceProvider/litellm/keySource/anyOf[subschema #1] response property for the response status

    4 more changes in this revision