Files
OmniRoute/tests/unit
diegosouzapw 9a9f5fa02d fix(api): restore function_call name on non-streaming /v1/responses (#12370)
A plain (non-namespace) tool call's #7936 identity restore in
nonStreamingClientTranslate.ts unconditionally applied whatever
requestToolIdentityMap.get(item.name) returned as a {namespace, name}
object. That map falls back to the _toolNameMap alias table (a plain
Map<string, string>, e.g. "shell" -> "shell") published by the
openai->gemini/claude pivot whenever no namespace tools are present.
Applying that string as an identity object read undefined for both
.namespace and .name, blanking item.name to undefined -- a key
JSON.stringify then drops entirely, leaving Codex with a function_call
it cannot dispatch and causing it to re-narrate its tool intent in a
loop instead of executing it.

Guard the restore so it only fires when the map entry actually has the
{namespace, name} shape.

Live VPS check (192.168.0.15, real gemini API key, Codex-shaped
payload: tool_choice "auto", one shell function tool,
gemini/gemini-3-flash-preview) reproduced the bug 3/3 on
stream:false /v1/responses; stream:false /v1/chat/completions and
stream:true /v1/responses were both already correct.
2026-09-15 23:27:41 -03:00
..
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00
2026-08-26 14:25:01 -03:00