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
- TMLR paper: enforced thinking doesn't reliably make LLM agents disclose key info to users — SharonYixuanLi · 2026-10-27
- Resin lets an agent build standalone LLM inference engines; vLLM and SGLang optimize DeepSeek kernels differently — AccBalanced · 2026-10-27
- How I let my cloud Grok Bot code on my Mac mini via Tailscale, no public ports — talkaboutdesign · 2026-10-27
- Context layout is a cost decision: one memory edit can bust your entire agent prompt cache — dscape · 2026-10-27
- Alchemy adds effect/Workflow support across Durable Objects, Workflows and Lambda Durable Functions — samgoodwin89 · 2026-10-27
- Alchemy's Lambda Web Functions run plain Node web servers on Lambda, no OpenNext needed — samgoodwin89 · 2026-10-27