Fix Stateful API Errors in Gemini CLI During Model Fallback
amelidev · ghdev · 2026-07-21
This PR fixes a blocking API error in Gemini CLI that occurred during permanent model fallbacks (e.g., downgrading to gemini-2.5-flash).
The core change introduces a rotateSessionId() method triggered before fallback activation. This forces the backend to treat retried requests as fresh and stateless by rotating the in-memory session ID, while preserving all local storage paths and CLI states.
More from coding & agent
- NVIDIA says Nemotron 3 Ultra hit 97.1% on agentic RTL chip-design tasks — NVIDIAAI · 2026-07-27
- Tokyo Agent Forge hackathon shipped production-ready AI agents in one day — DavidBennett__ · 2026-07-27
- Long-running agents will need immutable event logs, this thread argues — sebpaquet · 2026-07-27
- Agentic Data Science in Practice: Agents Write Code but Answer Wrong Questions — hugobowne · 2026-07-27
- A VS Code extension adds Markdown-style highlighting to Alchemy string templates — samgoodwin89 · 2026-07-27
- Claude’s Stripe MCP connector is being called unusable after repeated disconnects — evielync · 2026-07-27