Agents

Refresh exactly one provider's account-aware model inventory. This is an explicit operation because it starts a CLI process (and, for Claude workspaces, creates or wakes the user's persistent sandbox). Authorization therefore matches the provider's chat execution requirement instead of requiring unrelated settings mutation access. The AI service applies a provider-scoped single-flight and cooldown before doing that work.

post/settings/ai-providers/{provider_id}/models/refresh

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/settings/ai-providers/{provider_id}/models/refresh
  • Auth: HTTP bearer

Path parameters

provider_idstring required

AI provider ID

Response

default_runtime_model_idstring nullable
model_source'live' | 'cache' | 'stale_cache' | 'bootstrap' required

Provenance of a provider model inventory. Only live and unexpired cached inventories are authoritative enough to reject a saved model. Bootstrap and stale inventories remain useful for selectors, but must not block a turn because account entitlements may legitimately differ.

models_refreshed_atstring nullable
provider_idstring required

Changes

No recorded changes to this operation across all 54 revisions of this API.