Update the AI provider configuration
PATCH /admin/system/ai
Persists the AI provider list and default-provider selection. Providers are stored but NOT yet used for inference — the AI auto-tagging / search phase wires the providers into a real client. API keys are stored as plain strings for now (admin-only table); a secrets-backend migration is planned.
providers[*].api_key is write-only: supply it to set or
rotate a key, omit it (or send an empty string) to keep the
stored one. Saving an unrelated field therefore cannot wipe
a key. The response echoes api_key_set, never the key.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”AI provider configuration. Persisted under the sysconfig key
ai. API keys are stored as plain strings for now (admin-
only table; never federated); a secrets-backend migration is
planned. Keys are write-only on this surface — see
providers[*].api_key / providers[*].api_key_set.
object
Picks the providers[*].id used when nothing else
specifies. Empty = no default (callers must choose, or
AI features stay disabled).
object
E.g. gpt-4o, claude-sonnet-4-6
Override for self-hosted / proxied endpoints.
Write-only. Provide to set or rotate this provider’s
API key; omit (or send an empty string) on PATCH to
keep the current value. The response NEVER echoes
this field — read api_key_set instead to check
whether one is on file. A stored credential has no
read-back workflow, so it is not returned to any
capability, system.admin included (#711).
True when an API key is currently stored for this provider. Set by the server on GET responses; ignored if sent on PATCH.
Per-provider inference defaults. Closed schema, for the same
reason as SSOProviderConfig (#718): a free-form map on a
provider record is where credentials end up, and the read path
cannot tell an unknown key holding a rate limit from one
holding a token. Every field here is a tuning knob; the
provider’s one credential is api_key, which is write-only.
object
Sampling temperature. Unset = the model’s own default.
Nucleus-sampling cutoff. Unset = the model’s own default.
Cap on generated tokens per request. 0 = no override.
Prepended to every request routed to this provider.
Per-request timeout. 0 = the client default.
Client-side requests-per-minute ceiling. 0 = unthrottled.
Responses
Section titled “ Responses ”Updated AI config
AI provider configuration. Persisted under the sysconfig key
ai. API keys are stored as plain strings for now (admin-
only table; never federated); a secrets-backend migration is
planned. Keys are write-only on this surface — see
providers[*].api_key / providers[*].api_key_set.
object
Picks the providers[*].id used when nothing else
specifies. Empty = no default (callers must choose, or
AI features stay disabled).
object
E.g. gpt-4o, claude-sonnet-4-6
Override for self-hosted / proxied endpoints.
Write-only. Provide to set or rotate this provider’s
API key; omit (or send an empty string) on PATCH to
keep the current value. The response NEVER echoes
this field — read api_key_set instead to check
whether one is on file. A stored credential has no
read-back workflow, so it is not returned to any
capability, system.admin included (#711).
True when an API key is currently stored for this provider. Set by the server on GET responses; ignored if sent on PATCH.
Per-provider inference defaults. Closed schema, for the same
reason as SSOProviderConfig (#718): a free-form map on a
provider record is where credentials end up, and the read path
cannot tell an unknown key holding a rate limit from one
holding a token. Every field here is a tuning knob; the
provider’s one credential is api_key, which is write-only.
object
Sampling temperature. Unset = the model’s own default.
Nucleus-sampling cutoff. Unset = the model’s own default.
Cap on generated tokens per request. 0 = no override.
Prepended to every request routed to this provider.
Per-request timeout. 0 = the client default.
Client-side requests-per-minute ceiling. 0 = unthrottled.
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completed