Files
OmniRoute/tests
diegosouzapw 1430ded910 fix(sse): require Responses-shaped body before native OpenAI-compatible passthrough (#12129)
The internal context-handoff/universal-handoff summary request is built in Chat
Completions shape and dispatched through the same handleSingleModel closure
that still carries the original client request's /responses endpoint. This
made resolveChatCoreRequestFormat resolve sourceFormat to "openai-responses"
purely from the inherited endpoint path, and
shouldUseNativeOpenAICompatibleResponsesPassthrough then skipped chat->responses
translation entirely for any openai-compatible-* connection with
apiType: "responses", regardless of the actual body shape. The upstream ended
up receiving the raw Chat Completions body (messages) on /v1/responses with no
input, so the request was rejected outright.

shouldUseNativeOpenAICompatibleResponsesPassthrough now takes the request body
and requires it to actually look Responses-shaped (input present, messages
absent) before allowing the native-passthrough fast path. A genuine client
Responses-API request still gets the zero-translation shortcut; an
internally-synthesized chat-shaped body is now routed through the normal
chat->responses translation layer instead.
2026-09-10 15:51:31 -03:00
..