Files
OmniRoute/tests
Diego Rodrigues de Sa e Souza 4f97297793 fix(translator): preserve Gemini thought parts as reasoning_content on the OpenAI bridge (#7206)
* fix(translator): preserve Gemini thought parts as reasoning_content on the OpenAI request bridge

Gemini thinking-mode output marks internal reasoning with `part.thought === true`
inside a content's `parts` array. geminiToOpenAIRequest() ran every part (thought
or not) through the same text-part branch, so a thought part was merged straight
into the message's visible `content` — leaking private reasoning into whatever the
OpenAI pivot forwarded downstream, and hiding it from Reasoning Replay Cache (which
only ever inspects `reasoning_content`).

Add convertGeminiContentWithReasoning(): split out `thought: true` parts before
delegating to the existing convertGeminiContent(), then re-attach the joined
thought text as `reasoning_content` on the resulting message (skipping tool/
functionResponse messages, whose schema has no such field). Non-strict-provider
stripping and reasoning-replay injection in translator/index.ts are untouched —
this only fixes what reasoning_content gets populated with on this one inbound
hop.

Co-authored-by: W ARELIK <warelik@users.noreply.github.com>
Inspired-by: https://github.com/decolua/9router/pull/2401

* chore(changelog): fragment for #7206

---------

Co-authored-by: W ARELIK <warelik@users.noreply.github.com>
2026-07-17 10:39:32 -03:00
..
2026-05-23 01:46:59 -03:00
2026-07-13 09:12:40 -03:00
2026-07-02 10:47:13 -03:00
2026-06-19 06:49:01 -03:00
2026-07-06 02:25:17 -03:00
2026-07-13 09:12:40 -03:00
2026-07-13 09:12:40 -03:00
2026-06-13 17:27:40 -03:00