Anthropic
Configure anthropic deployments and understand provider-specific behavior.
Configure a deployment
Send this body to POST /admin/deployments with an operator credential. Replace the example
credentials and choose a model available to your provider account. See
Creating deployments for the shared configuration fields.
{ "publicModel": "claude", "adapterKey": "anthropic", "upstreamModel": "claude-sonnet-5", "credentials": { "apiKey": "sk-ant-..." } }Behavior and limitations
- Credentials:
apiKey.version(theanthropic-versionheader) defaults to2023-06-01and rarely needs overriding. - Default transport: Messages API for text.
- Reasoning: either
anthropic_adaptive(the model picks its own depth; the request only carries anoutput_config.effortlabel) oranthropic_budget(thinking: { budget_tokens }, with a provider-side default budget per canonical level if the catalog doesn't override it) — see Reasoning. Models that expose bothxhighandmaxpreserve them as distinct tiers; models such as Opus/Sonnet 4.6 declaremaxwithout inventingxhighsupport. - Signed thinking round-trips on
/v1/responses. When the request includesreasoning.encrypted_content, each turn's content (thinking, text and tool calls, in order) is sealed into areasoningitem that standard clients replay, and the next request sends the turn back exactly as Claude returned it. On/v1/messagesthe blocks stay native, in Claude's order. See Provider-specific fields. - Claude Opus 5 enables adaptive thinking upstream when
thinkingis omitted. The adapter sendsthinking: { "type": "disabled" }when canonical reasoning resolves tonone, preserving the gateway's provider-independent off semantics. claude-opus-5-fastandclaude-opus-4-8-fastare gateway aliases for Anthropic's research-preview fast mode. The adapter selects the base model, sendsspeed: "fast", and adds the required beta header. Anthropic account access is still required.- Native
/v1/messagesrequests pass through with minimal translation;/v1/chat/completionsand/v1/responsesrequests are rendered onto the same canonical reasoning/tool/format machinery as every other provider. - Prompt caching is automatic on
/v1/chat/completionsand/v1/responses. The adapter sends Anthropic's top-levelcache_control: { "type": "ephemeral" }(5-minute TTL), so repeated prefixes are cached as they are on OpenAI and Gemini and reported incached_tokens. To control caching yourself, use/v1/messages: those requests are sent with exactly thecache_controlyou write, or none. - Models that declare
capabilities.strictTools: truepreserve Anthropic's native top-levelstrict: truetool flag. Nativeoutput_config.formatis schema-adherent and is treated as strict structured output by the gateway. - Anthropic compiles strict tool schemas and
json_schemaresponse formats from a subset of JSON Schema and rejects constraints outside it (maxItems,minLength,minimum, …) that OpenAI's strict mode accepts. For/v1/chat/completionsand/v1/responsesrequests the adapter keeps the supported keywords and moves the rest into the field'sdescription, as Anthropic's SDKs do; clients keep validating against their original schema. Native/v1/messagestools are sent as written. - Catalog:
src/adapters/anthropic/catalog.json.