Client APIs
openai_chat_completions_to_anthropic
Read the release-matched openai chat completions to anthropic documentation and its scope.
Switching projects opens that project’s default documentation release.
Versions marked “overview” do not contain this page. Selecting one opens that version’s documentation overview.
On this page
Translates OpenAI Chat Completions requests only when the selected ExternalModel candidate uses Anthropic Messages; OpenAI candidates pass through with their configured path and model.
Configuration Notes
The trusted profile is emitted by intelligent_route, never inferred from a request header or model name. The selected Secret is injected later by credential_inject.
For Anthropic candidates, non-streaming JSON response chunks are retained in bounded request-local state until they can be translated. The separate SSE filter converts event chunks incrementally, and OpenAI-compatible response chunks remain unchanged.
Anthropic translation runs only when the filter’s api_translation_enabled setting is true, as derived from the tenant’s API translation permission.
The compatibility contract defaults an omitted token limit to 4096 and ignores user, n, seed, and parallel_tool_calls after validating their types. Ignoring n does not produce multiple completions; ignoring seed does not make generation deterministic; and ignoring parallel_tool_calls does not constrain the provider’s tool scheduling. Other unsupported fields fail with HTTP 400.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
api_translation_enabled | bool | no | Permission from trusted application configuration. Anthropic requests fail closed when this is false (the default). |
max_body_bytes | integer | no | Compatibility setting for the former shared request/response limit. A direction-specific limit takes precedence when set. |
max_request_body_bytes | integer | no | Maximum complete translated Chat Completions request body. |
max_response_body_bytes | integer | no | Maximum complete Anthropic JSON response body retained for conversion. |