Skip to content

[BUG]: EU Enterprise OAuth requests fail for all tested GPT models after #42432; Codex CLI succeeds #43615

Description

@ThomasWilliamMarsh

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

  1. Use a ChatGPT Enterprise account with EU compute residency.

  2. Authenticate OpenCode using ChatGPT OAuth.

  3. On current dev including fix: codex data residency #42432, select an OpenAI GPT model.

  4. Send a simple prompt.

  5. Observe the model-snapshot geography error.

  6. Repeat with other GPT models; all tested models fail in the same way.

  7. Verify that the same account/models work in the official Codex CLI.

  8. As a diagnostic, change both OpenCode request identity headers to:

    originator: codex_cli_rs
    version: <installed Codex CLI version>
    
  9. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions