Skip to content

fix: Codex model discovery returned unusable gpt-5.5-*-wm slugs - #1981

Merged
tpae merged 1 commit into
mainfrom
bugfix/openai-codex-fix
Jul 11, 2026
Merged

fix: Codex model discovery returned unusable gpt-5.5-*-wm slugs#1981
tpae merged 1 commit into
mainfrom
bugfix/openai-codex-fix

Conversation

@tpae

@tpae tpae commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Users signed in with ChatGPT/Codex auth reported their model list suddenly changed to gpt-5.5-cca-wm and gpt-5.5-wm, both unusable. Root cause: Osaurus fetched the model catalog from the wrong endpoint with a client_version the backend doesn't recognize.

  • Model discovery now hits https://chatgpt.com/backend-api/codex/models (matching codex-rs's CHATGPT_CODEX_BASE_URL) instead of https://chatgpt.com/backend-api/models. The latter is the ChatGPT web-app catalog, which recently began serving internal experiment slugs (*-wm); those pass the ^gpt-\d+\.\d+ slug filter, fully replace the static fallback list, and then fail on /backend-api/codex/responses.
  • client_version is now a pinned Codex CLI semver constant (codexClientVersion = "0.144.1") instead of osaurus-<bundle version>. The backend silently filters the catalog for unknown/stale versions, so the constant is documented with when to bump it.
  • Chat requests already used the correct /backend-api/codex/responses path; only discovery changed.

Added regression tests pinning the discovery URL path and the semver format of client_version.

Test plan

  • swift test --filter OpenAICodexOAuthServiceTests — 14/14 pass (includes 2 new regression tests)
  • swift test --filter "RemoteProviderManagerTestConnectionTests|ProviderNetworkDiagnosticsTests" — 13/13 pass
  • Live proof: sign in with ChatGPT, reconnect the provider, confirm the picker shows the real Codex catalog (gpt-5.5, gpt-5.4, gpt-5.3-codex, ...) and a chat turn succeeds

…real Codex CLI client_version

Model discovery hit chatgpt.com/backend-api/models (the ChatGPT web-app
catalog) with client_version=osaurus-<bundle version>. The web catalog
recently began serving experiment slugs like gpt-5.5-cca-wm / gpt-5.5-wm,
which pass the gpt-X.Y slug filter, replace the static fallback list, and
then fail on /backend-api/codex/responses — leaving ChatGPT-auth users with
only unusable models.

Point discovery at the Codex catalog (/backend-api/codex/models, matching
codex-rs's CHATGPT_CODEX_BASE_URL) and send a pinned Codex CLI semver
(0.144.1), since the backend silently filters the catalog for unknown or
stale client_version values.
@github-actions github-actions Bot added the bug Something isn't working label Jul 11, 2026
@tpae
tpae merged commit 7d7df28 into main Jul 11, 2026
6 checks passed
@tpae
tpae deleted the bugfix/openai-codex-fix branch July 11, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant