Description
The native OpenAI OAuth flow (ChatGPT Plus/Pro browser/headless login) regressed in 1.14.49+ and is still broken on v1.15.6. Running opencode auth login → OpenAI now shows only "Manually enter API Key", omitting the (browser) / (headless) options that worked in 1.14.48.
This is a follow-up to #27905 (still open, contains full root-cause analysis). Filed separately because v1.15.6 was released on 2026-05-20 and does not address the regression.
Diff analysis 1.15.5 → 1.15.6 (gh api compare/v1.15.5...v1.15.6):
Files touched containing the string "auth":
packages/console/app/src/routes/auth/[...callback].ts — web console login, unrelated
packages/console/function/src/auth.ts — web console, unrelated
packages/opencode/src/server/routes/instance/httpapi/middleware/authorization.ts — internal HTTP API headers, unrelated
packages/opencode/test/server/httpapi-authorization.test.ts — test for above
packages/opencode/test/fixtures/recordings/session/native-openai-tool-call.json — removed fixture
Files NOT touched (which is where the regression lives per #27905 RCA):
packages/core/src/auth.ts — AuthV2.layer, migrate(), OAuthCredential / Account Schema.Class
packages/core/src/plugin/auth.ts — bridge AuthV2.Service → provider.options.aisdk.provider.apiKey
packages/core/src/provider/openai.ts — OpenAI provider, no OAuth declarations
Two commits sound auth-related but are not:
6618e2b feat(native-llm): route Anthropic API-key models through native runtime — Anthropic only, not OpenAI
8a321c4 fix(native-llm): prefer console opencode token — OpenCode console (zen) token, not ChatGPT OAuth
Scope confirmed in #27905: reproduces with minimal config (single provider, zero plugins) on both CLI and Desktop builds. Workarounds that failed: third-party opencode-openai-codex-auth plugin, manual auth-v2.json construction, copying ~/.codex/auth.json, isolated minimal config, full reinstall. Workarounds that work: pin to 1.14.48, or use plain API key.
Plugins
None (reproduces with zero plugins on a minimal config)
OpenCode version
1.15.6 (also reproduces on 1.14.49 through 1.15.5; works on 1.14.48)
Steps to reproduce
- Install opencode 1.15.6 (
scoop install opencode or any installer)
- Ensure no provider OAuth tokens exist: remove
~/.local/share/opencode/auth.json and ~/.local/share/opencode/auth-v2.json
- Run
opencode auth login
- Select
OpenAI from the provider list
- Observed: only
Manually enter API Key is presented
- Expected (1.14.48 behavior):
Login to OpenAI
❯ ChatGPT Pro/Plus (browser)
ChatGPT Pro/Plus (headless)
Manually enter API Key
Screenshot and/or share link
N/A — interactive CLI menu output cannot be /share-d. Full evidence (telemetry logs, auth.json shape comparison, AuthV2.layer non-activation findings) is in #27905.
Operating System
Windows 11 (build 26200)
Terminal
Windows Terminal (PowerShell 7)
Description
The native OpenAI OAuth flow (ChatGPT Plus/Pro browser/headless login) regressed in 1.14.49+ and is still broken on v1.15.6. Running
opencode auth login→ OpenAI now shows only "Manually enter API Key", omitting the(browser)/(headless)options that worked in 1.14.48.This is a follow-up to #27905 (still open, contains full root-cause analysis). Filed separately because v1.15.6 was released on 2026-05-20 and does not address the regression.
Diff analysis 1.15.5 → 1.15.6 (
gh api compare/v1.15.5...v1.15.6):Files touched containing the string "auth":
packages/console/app/src/routes/auth/[...callback].ts— web console login, unrelatedpackages/console/function/src/auth.ts— web console, unrelatedpackages/opencode/src/server/routes/instance/httpapi/middleware/authorization.ts— internal HTTP API headers, unrelatedpackages/opencode/test/server/httpapi-authorization.test.ts— test for abovepackages/opencode/test/fixtures/recordings/session/native-openai-tool-call.json— removed fixtureFiles NOT touched (which is where the regression lives per #27905 RCA):
packages/core/src/auth.ts—AuthV2.layer,migrate(),OAuthCredential/AccountSchema.Classpackages/core/src/plugin/auth.ts— bridgeAuthV2.Service→provider.options.aisdk.provider.apiKeypackages/core/src/provider/openai.ts— OpenAI provider, no OAuth declarationsTwo commits sound auth-related but are not:
6618e2b feat(native-llm): route Anthropic API-key models through native runtime— Anthropic only, not OpenAI8a321c4 fix(native-llm): prefer console opencode token— OpenCode console (zen) token, not ChatGPT OAuthScope confirmed in #27905: reproduces with minimal config (single provider, zero plugins) on both CLI and Desktop builds. Workarounds that failed: third-party
opencode-openai-codex-authplugin, manualauth-v2.jsonconstruction, copying~/.codex/auth.json, isolated minimal config, full reinstall. Workarounds that work: pin to1.14.48, or use plain API key.Plugins
None (reproduces with zero plugins on a minimal config)
OpenCode version
1.15.6 (also reproduces on 1.14.49 through 1.15.5; works on 1.14.48)
Steps to reproduce
scoop install opencodeor any installer)~/.local/share/opencode/auth.jsonand~/.local/share/opencode/auth-v2.jsonopencode auth loginOpenAIfrom the provider listManually enter API Keyis presentedScreenshot and/or share link
N/A — interactive CLI menu output cannot be
/share-d. Full evidence (telemetry logs,auth.jsonshape comparison,AuthV2.layernon-activation findings) is in #27905.Operating System
Windows 11 (build 26200)
Terminal
Windows Terminal (PowerShell 7)