Custom `model_provider` endpoint is silently ignored when signed into a ChatGPT account — zero requests reach the configured base_url; all sampling goes to the account websocket, with no diagnostic
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- api, authentication, backend, networking
Research direction
Reproduce the behavior with the provided CODEX_HOME configuration in both account-signed-in and API-login environments, then inspect transport records for the configured base_url versus account websocket endpoints. Trace provider selection and model-catalog refresh behavior; done when the configured provider is honored or a visible diagnostic explains the precedence and prevents misleading model resolution.
Written by the indexing model from the issue text.
Description
Summary
When a Codex home (CODEX_HOME) is signed into a ChatGPT account, configuring a custom model_provider (e.g. base_url = "https://api.deepseek.com", wire_api = "responses") is silently ignored. Sessions resolve the configured model name, but no request ever reaches the provider's base_url; all sampling traffic goes to the signed-in account's OpenAI websocket (wss://chatgpt.com/backend-api/codex/responses, wss://api.openai.com/v1/responses). No warning, error, or diagnostic indicates the override. The same provider config works correctly in a fresh CODEX_HOME with forced_login_method = "api". This effectively makes custom providers unusable in any account-signed-in environment, with nothing telling the user why.
Repro
Config in an account-signed-in CODEX_HOME:
model = "deepseek-v4-flash"
model_provider = "deepseek"
[model_providers.deepseek]
name = "DeepSeek"
base_url = "https://api.deepseek.com"
wire_api = "responses"
[model_providers.deepseek.auth]
command = "/usr/bin/security"
args = ["find-generic-password", "-a", "codex-deepseek", "-s", "com.xueyanli.codex.deepseek-v4-flash", "-w"]
Expected: sampling requests are POSTed to https://api.deepseek.com/responses.
Observed over the day this config was active (from the app's own logs_2.sqlite transport records):
- requests reaching
api.deepseek.com: 0 - requests via
wss://chatgpt.com/backend-api/codex/responses: 165 - requests via
wss://api.openai.com/v1/responses: 23
The configured model name still resolves (turn_context shows model=deepseek-v4-flash), so the provider setting is not ignored at the model-name level — only at the transport level. There is no log line saying the custom provider was overridden or fell back.
Control: the exact same provider block in a fresh CODEX_HOME with forced_login_method = "api" + preferred_auth_method = "apikey" reaches api.deepseek.com correctly.
Related symptom
With a custom provider configured, the online model-catalog refresh also fails intermittently:
list_models{refresh_strategy=online}: failed to refresh available models: timeout waiting for child process to exit
(observed 100+ times across several days, always while a custom/non-default provider was configured). No surface explains the failure or retries it.
Expected behavior
- Either honor the configured
model_provider'sbase_urlregardless of sign-in state, or - if sign-in must take precedence, log a visible warning such as "custom provider X ignored because account Y is signed in" — and do not resolve the custom model name if it won't be used. Silent transport redirection with a resolved-but-unused provider is the worst failure mode: the session looks like it's using DeepSeek while actually billing/routing through the account.
Environment
- macOS (Darwin 25.5.0)
- ChatGPT desktop app
26.730.61639(build 6234), embedded Codex runtimecli 0.147.0-alpha.1.2 model=deepseek-v4-flash,model_provider=deepseek,base_url=https://api.deepseek.com,wire_api=responses
Related: #37237 — a second silent failure of custom-provider handling in the same app build.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
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.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·