Skip to content

OpenAI Responses to Anthropic Messages

This page documents the high-value conversion pair used when a client speaks OpenAI Responses and the selected provider speaks Anthropic Messages.

Inbound
`openai_responses` request payload
Normalize
ingress parses Responses input and request controls
Translate request
Responses input/messages/tools -> Anthropic Messages request
Translate response
Anthropic Message/content blocks -> Responses output items
Outbound
`openai_responses` response or SSE events
AreaExpected behavior
Non-streaming requestSupported when request fields can be represented in Anthropic Messages.
Non-streaming responseAnthropic returns one final Message; ProxAI converts it into one Responses response envelope with output[].
Streaming responseAnthropic content-block events are accumulated and emitted as Responses-style typed SSE events.
Unsupported provider-specific fieldsFail or ignore deliberately; do not leak raw provider structures through Responses output.
Responses conceptAnthropic Messages targetNotes
input easy messagesmessages[]User/developer content becomes Anthropic message content blocks where possible.
System/developer instructionssystem or equivalent normalized instruction placementPreserve instruction intent without duplicating user-visible content.
tools[] function toolstools[]Function schema should preserve name, description, and JSON schema shape.
Hosted toolsProvider-compatible representation or explicit unsupported behaviorDo not pretend an upstream supports hosted tools if it does not.
reasoning.effortoutput_config.effort when availableSupported effort values map directly; disabled/minimal maps to disabled thinking behavior.
reasoning.summarythinking.display lossilyAnthropic has no equivalent summary granularity.
Anthropic conceptResponses targetNotes
Message envelopeResponses response envelopeAnthropic non-streaming returns one message; Responses output may contain multiple typed items.
Text content blockMessage output contentPreserve text order within the response.
Tool use blockFunction call output itemPreserve call identity using target-protocol identifiers.
Thinking/reasoning blockReasoning output item when representableProvider-specific metadata should be transformed, not raw-round-tripped.
stop_reasonResponses status / terminal output semanticsSee status and stop reasons reference for mappings.
Anthropic eventResponses-side expectation
message_startInitialize response state and output item assembly.
content_block_startStart a Responses output item or content part depending on block type.
content_block_deltaEmit compatible delta events without slicing Unicode boundaries.
content_block_stopFinalize the current item/content block.
message_deltaUpdate usage or stop metadata when available.
message_stopEmit terminal Responses event such as response.completed.
  • Responses output item identity may be richer than Anthropic message block identity.
  • Hosted tools may not have Anthropic equivalents.
  • Reasoning summary granularity is not symmetric.
  • Refusal metadata should preserve refusal semantics, not raw upstream shapes.
  • Provider-specific metadata such as signatures should not be exposed as untyped Responses payloads.
Change typeTest area
Request placement changeSystem/developer normalization and message placement tests.
Tool mapping changeTool call and tool result round-trip behavior tests.
Streaming event changeSSE terminal, stalled tool-call, Unicode scanning, and event ordering tests.
Stop/status mapping changeStatus and stop reason conversion tests plus reference docs.