openai_chat_completions_to_anthropic
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.
Only Chat Completions fields represented by Anthropic Messages are accepted. Unsupported fields and modalities fail with a 400 response.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
api_translation_enabled | bool | yes | Permission projected from the authoritative MaaS tenant setting. Anthropic candidates fail closed when this is false. |
max_body_bytes | integer | yes | Maximum complete JSON body retained for one request or response. |