Description
I use both ChatGPT Codex OAuth and an OpenAI API key. If I switch the active OpenAI account from ChatGPT Codex OAuth to an API key while an existing session is open, the next prompt keeps using the Codex endpoint and fails with API keys are not supported by this endpoint. I expect the next prompt to use the normal OpenAI API endpoint and the newly active API key, without interrupting the session.
Plugins
opencode-chatgpt-websearch
OpenCode version
0.0.0-dev-18308 when observed, currently 0.0.0-dev-18313
Steps to reproduce
- Connect a ChatGPT account through the ChatGPT Codex OAuth flow.
- Start a session with an OpenAI model that routes through Codex.
- Add or activate an OpenAI API-key account.
- In the same session, send the next prompt.
- The request still targets
https://chatgpt.com/backend-api/codex and fails because it received the API key.
Operating System
Linux 7.1.10-200.fc44.x86_64
Terminal
Alacritty
Additional context
This is distinct from #7699 and #34765. This case is an API-key request retaining the Codex route after an active-account switch in an existing session.
Description
I use both ChatGPT Codex OAuth and an OpenAI API key. If I switch the active OpenAI account from ChatGPT Codex OAuth to an API key while an existing session is open, the next prompt keeps using the Codex endpoint and fails with
API keys are not supported by this endpoint.I expect the next prompt to use the normal OpenAI API endpoint and the newly active API key, without interrupting the session.Plugins
opencode-chatgpt-websearch
OpenCode version
0.0.0-dev-18308 when observed, currently 0.0.0-dev-18313
Steps to reproduce
https://chatgpt.com/backend-api/codexand fails because it received the API key.Operating System
Linux 7.1.10-200.fc44.x86_64
Terminal
Alacritty
Additional context
This is distinct from #7699 and #34765. This case is an API-key request retaining the Codex route after an active-account switch in an existing session.