anomalyco / anomalyco/opencode
[BUG]: EU Enterprise OAuth requests fail for all tested GPT models after #42432; Codex CLI succeeds
@rekram1-node is already working on this.
Since Aug 20, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Using ChatGPT Enterprise OAuth with EU compute residency, all tested GPT models fail in OpenCode on current dev, including the residency fix from #42432.
The same account and models work in the official Codex CLI.
OpenCode returns:
The requested model snapshot is not available for your project's geography.
If you need regional processing, consider switching to a model that officially supports it.
The OAuth access token contains:
chatgpt_compute_residency: "eu"
chatgpt_data_residency: "eu"
As a diagnostic, I changed OpenCode's request identity headers from their normal values to:
originator: codex_cli_rs
version: <installed Codex CLI version>
With both changes applied, the same requests succeed.
This suggests the issue is not specific to GPT-5.6 or an individual model. There appears to be a remaining difference between OpenCode and the official Codex client's request handling for EU-resident Enterprise accounts after #42432.
Related: #40243, #42432, openai/codex#31967
Plugins
No response
OpenCode version
No response
Steps to reproduce
-
Use a ChatGPT Enterprise account with EU compute residency.
-
Authenticate OpenCode using ChatGPT OAuth.
-
On current
devincluding #42432, select an OpenAI GPT model. -
Send a simple prompt.
-
Observe the model-snapshot geography error.
-
Repeat with other GPT models; all tested models fail in the same way.
-
Verify that the same account/models work in the official Codex CLI.
-
As a diagnostic, change both OpenCode request identity headers to:
originator: codex_cli_rs version: <installed Codex CLI version> -
Retry the same request. It succeeds.
Expected behavior
ChatGPT Enterprise OAuth requests with EU compute residency should work in OpenCode when the same account and model work in the official Codex CLI.
Actual behavior
All tested GPT models fail with a model-snapshot geography error.
The requests succeed when both originator and version are changed to match the official Codex CLI.
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.