You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert enriched Responses API requests to Chat Completions format for backends that only speak /v1/chat/completions. This is the conversion counterpart to responses_proxy (#432), which forwards to native /v1/responses backends.
Behavior
Read responses.messages, responses.tools, responses.tool_choice from filter chain metadata
Build a /v1/chat/completions request body from Responses API state:
Map messages to chat completion message format
Map tool definitions to chat completion function/tool format
Purpose
Convert enriched Responses API requests to Chat Completions format for backends that only speak
/v1/chat/completions. This is the conversion counterpart toresponses_proxy(#432), which forwards to native/v1/responsesbackends.Behavior
responses.messages,responses.tools,responses.tool_choicefrom filter chain metadata/v1/chat/completionsrequest body from Responses API state:temperature,top_p,frequency_penalty,max_completion_tokens,reasoning_effort,service_tier,parallel_tool_calls,top_logprobs,presence_penalty,extra_bodystreamsettingstream_options.include_usage=truewhen streamingtextresponse_format when tools are presentprompt_cache_keyif configuredinstructionsas system messageconvert.rs) with clear input/output types for reuse by Provider abstraction: unified request/response types #213Config
Dependencies
/v1/chat/completions)stream_events(Filter 6: stream_events #433) must handle Chat Completion chunks → Responses API SSE transformationReference