OpenCode bug: ChatGPT token-sharing logins hit 401 INVALID_API_KEY while same token works on direct API calls
laravelgeek · ghdev · 2026-10-13
OpenCode 2.0.26/2.0.27 on Windows fails all requests to openai/gpt-6.1-sol with HTTP 401 INVALIDAPIKEY when authenticated via ChatGPT token sharing, failing within 1 second with no output. The same access token returns 200 when POSTed directly to api.openai.com/v1/responses outside OpenCode, proving the token is valid. Signing out and back in doesn't help, and debug logs hide the outbound URL, pointing to an endpoint or auth-header construction issue in OpenCode. The reporter rules out the earlier Codex routing bug (#34765).
More from coding & agent
- Claude Code Pushes Urgent Security Update Across All Installations — umeshonai · 2026-10-23
- Claude cut a 2.6-hour video export to 20 minutes — but only after being told to rebuild the server — byhewar · 2026-10-23
- 3 flight-booking rules my AI agent checks that I'd never do by hand — Efistoffeles · 2026-10-23
- OpenJet claims Qwen3.8-27B coding runs 1.9x faster than llama.cpp on one RTX 3090 — JeremyCMorgan · 2026-10-23
- Building an autonomous SEO agent in Hermes with three skills: programmatic pages, Keywords Everywhere, DataForSEO — EXM7777 · 2026-10-23
- Building a sports betting AI agent with onchain execution and human approval by default: architecture and lessons — Dry-Comfortable-2678 · 2026-10-23