What's New
Fix: Gemini 2.5 thinking tokens leaking through OpenRouter
Gemini 2.5 Flash/Pro models have thinking/reasoning enabled by default. Without explicit disable, thinking tokens leak into the output stream through OpenRouter, producing messy output with internal monologue mixed into task results.
Changes:
- sanitize.js: Inject
reasoning.effort="none"for Gemini 2.5+ models to disable thinking via OpenRouter API - sanitize.js: Add
reasoning_contentto filtered content types (OpenRouter reasoning blocks) - sanitize.js: Add
isGeminiThinkingModel()helper with future-proofing for Gemini 3.x - test.js: 15 new tests for Gemini thinking fix (133 total, all passing)
Affected models:
google/gemini-2.5-flash— thinking disabledgoogle/gemini-2.5-pro— thinking disabledgoogle/gemini-3*— future-proofedgoogle/gemini-2.5-flash-lite— excluded (thinking off by default)
Install/Update
npm install -g claude-flow@latest