Google’s Gemini CLI strips stray Authorization headers to fix API-key 401s
loulanyue · ghdev · 2026-07-27
What changed
Google’s gemini-cli fixes a bug where, in GEMINIAPIKEY mode, a leftover Authorization header could override the intended x-goog-api-key auth path and trigger 401 UNAUTHENTICATED ACCESSTOKENTYPEUNSUPPORTED errors on generativelanguage.googleapis.com.
Details
- The patch removes both Authorization and authorization from request headers when using AuthType.USEGEMINI with the default API-key mechanism.
- The change is covered by a unit test in contentGenerator.test.ts.
- The PR reports all tests passing (56 passed).
More from coding & agent
- Software products need an API/MCP/plugin now: agents will drive acquisition and retention — omooretweets · 2026-12-02
- Matt Shumer says collaborating with Jacob humbles his AI-orchestration skills ahead of Spawn — mattshumer_ · 2026-12-02
- LiveCraft benchmark: top agents score just 30.3/100 in real-time Minecraft worlds — Chengxing Xie · 2026-12-02
- LegoReview mines 556k PRs for verifiable review data, boosting SWE-bench Pro V2 Hard to 70.6 — Lego-X · 2026-12-02
- Steve Yegge after a year of software factories: the last bottleneck is human attention — Steve_Yegge · 2026-12-02
- Stop telling Claude to 'build an Airbnb' — 5 copy-paste prompts for sturdy apps — alex_verem · 2026-12-02