mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 07:12:12 +03:00
* 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>