Uh oh!
There was an error while loading. Please reload this page.
feat: add copilot gemini reasoning - #10963
Conversation
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found the following potentially related PRs: Related PRs Found:
Note: PR #8900 is the most directly related, as the current PR references it and builds on similar patterns for a different model provider (Gemini vs Claude). |
joseehilton147
commented
Jan 28, 2026
@rekram1-node can you check this? |
NateSmyth
commented
Jan 30, 2026
#11274 is a way simpler way to do this |
Issue
Now that GPT-5 models go to /responses and Anthropic models go to /v1/messages, Gemini is the last lobotomized copilot model left. This is a low(ish) footprint approach to let Gemini think.
Changes
Handles copilot's reasoning +
reasoning_opaquereplay. Most of this lives in a newCopilotChatLanguageModel, which handles transformation, storage, etc.Re-uses some stuff from the /responses path where possible.
Also had to add a step to sanitize MCP tools, so extracted the relevant transform function for reuse.
Verify
Tested personally many times, both with Gemini sequentially as well as model/provider swaps.
The MCP issue originally came from chrome_devtools during testing, so I also made sure that works now.
Screenshots
Would fix#6864
Similar to #8900, but smaller diff. I figured it made sense as a different PR because routing Claude to /v1/messages changes things pretty significantly (although this approach also works with Claude).
Edit: also fixes#8417 (this is the "gemini prefers nullable keyword" issue)