Files
OmniRoute/tests
SAMUEL AUGUSTO GUIMARAES LOPES 6143da70d1 fix(mcp): persist and re-attach Gemini thoughtSignature on the direct Claude<->Gemini path (#9448)
The direct Claude<->Gemini translator (claude-to-gemini.ts / gemini-to-claude.ts)
never persisted the thoughtSignature Gemini returns on functionCall parts, and
never re-attached one on the next turn. Gemini 3+/2.5 strictly reject a native
functionCall part with no signature (400), which surfaces whenever a combo falls
back onto a Gemini model mid-conversation (the fallback tool_use never went
through Gemini, so no signature exists for it).

- gemini-to-claude.ts: store the signature (keyed by tool_use id + connection
  namespace) when Gemini's response carries one, mirroring the existing
  gemini-to-openai.ts hub-path behavior.
- claude-to-gemini.ts: resolve a stored signature for historical tool_use
  blocks; when none exists and the target model requires one, downgrade the
  tool_use/tool_result pair to inert text instead of sending a signature-less
  native part, matching the "context" fallback already used by the OpenAI hub
  path (#3358) rather than the removed fake-signature injection.

Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-08-13 07:55:00 -03:00
..