github Lexus2016/claude-flow v2.1.0
v2.1.0 — Gemini thinking tokens fix

latest release: v2.1.1
one month ago

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_content to 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 disabled
  • google/gemini-2.5-pro — thinking disabled
  • google/gemini-3* — future-proofed
  • google/gemini-2.5-flash-lite — excluded (thinking off by default)

Install/Update

npm install -g claude-flow@latest

Don't miss a new claude-flow release

NewReleases is sending notifications on new releases.