Repository navigation
Conversation
Console-provided OpenAI catalogs were left owned by the Zen integration after the OpenAI plugin rerouted them to the ChatGPT Codex endpoint. Rebind both credential ownership and source connection to the active ChatGPT OAuth connection.
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
64dc4f7 to
a2fa4a4
Compare
|
Confirming this bug on v2.0.12 (also reproduced on v2.0.8) - Linux, logged into the OpenCode Console and ChatGPT OAuth ( Every I verified the diagnosis in this PR independently:
Happy to test a build with this merged. |
|
It happens when BYOK key enabled in the OpenCode Console. |
|
Removing my BYOK OpenAI account from the web console resolves it immediately, which points at the Console-supplied credential winning over the ChatGPT OAuth token. |
Issue for this PR
Closes #49847
Type of change
What does this PR do?
Fixes an issue where the incorrect auth was being used for openai.
It was causing requests with the correct Codex endpoint and ChatGPT account header, but with the Zen API key in Authorization. Codex rejects these requests with API keys are not supported by this endpoint.
How did you verify your code works?
tested a similar implementation with a plugin
Also, added a regression test with both a Zen API key and ChatGPT OAuth credential configured. It verifies that the provider remains available and the Codex request uses the ChatGPT OAuth token.
Checklist