Skip to content

fix: refresh Codex client version to expose newer models - #1870

Merged
AbirAbbas merged 4 commits into
Agent-Field:devfrom
0xMrMasry:fix/codex-model-catalog-version
Oct 20, 2026
Merged

AbirAbbas merged 4 commits into
Agent-Field:devfrom
0xMrMasry:fix/codex-model-catalog-version

Conversation

@0xMrMasry

@0xMrMasry 0xMrMasry commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Codex discovery advertises client version 0.144.1, which can hide newer models available to the signed-in account. Update the shared version to 0.162.1, covering both direct model listing and translated catalog requests on every platform.

With the same account and token, changing only this version increased the visible list from three GPT-5.6 models to seven, adding GPT-6.1 Sol, GPT-6 Astra, GPT-6 Sol, and GPT-6 Luna. Model visibility filtering and account permissions are unchanged. This PR is independent of the SQLite fix in #1868.

How it was checked

  • Live read-only catalog comparison, then a rebuilt executable and catalog refresh: all seven models are cached. No inference calls were made.
  • Existing model-listing and request-translation tests pass:
go test ./internal/codexauth -run 'TestC12ListingUsesAccountHeadersFiltersVisibilityAndCachesLevels|TestC13C14C15TransportMapsTurnHeadersStreamAndReasoningRoundTrip' -count=1
  • go vet ./internal/codexauth and git diff --check pass.
  • The full auth suite encounters two unmodified Windows file-permission assertions expecting POSIX mode 0600.
  • make pr-ready passes go build ./..., then stops at go vet ./... on unmodified tests using Unix-only syscalls or test helpers excluded on Windows. The full local gate does not pass.

Checklist

0xMrMasry and others added 4 commits October 18, 2026 00:50
Pin the backend fixture independently of the shared client version so reverting the advertised version hides newer models in both direct and translated listings. Preserve visibility filtering and cached reasoning metadata.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@AbirAbbas AbirAbbas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified this one. 0.162.1 is a published Codex CLI release (openai/codex rust-v0.162.1, 2026-10-09, and on npm). With the same account and headers, a read-only catalog GET returns 3 visible models at client_version=0.144.1 and 7 at 0.162.1, which matches what you saw. Both doors (direct List and the translated GET /models) share the constant, and the User-Agent is still codeaf.

The existing C12 test compared the request to the same constant the code uses, so it would pass with any version. I added a catalog fixture that gates a visible model on 0.162.1 and checks it comes through both doors. It fails if only tokens.go is put back to dev. I also merged current dev. CI is green. Thanks!

@AbirAbbas
AbirAbbas added this pull request to the merge queue Oct 20, 2026
Merged via the queue into Agent-Field:dev with commit 6f5c1ca Oct 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants