Skip to content

[Bug]: v2.57.0 still selects Free account for Sol/Astra after roster refresh #4906

Description

@snowiscold1

Client or integration

OpenCodex Codex account pool on Windows

Area

Codex account entitlement-aware routing

Summary

This remains reproducible after the fix landed in PR #4797 / OpenCodex v2.57.0.

The pool contains multiple Codex OAuth accounts: one main Plus account, three Free accounts, and one additional Plus account. After running the account quota refresh and model catalog sync, OpenCodex still selected a Free account for both gpt-5.6-sol and gpt-6-astra, then returned the upstream unsupported-model 400 instead of selecting an entitled Plus account or retrying on one.

The previous issue was #4768. This report is a follow-up verification for the behavior after #4797 landed.

Expected behavior

When a requested model has account-specific availability, the pool should not select an account whose authenticated roster confirms that it cannot serve the model. If no confirmed denial is available, the implementation should still provide a bounded alternate-account retry for the exact pre-stream unsupported-model 400 when another account exists.

Reproduction

  1. Install OpenCodex v2.57.0 on Windows 11 24H2.
  2. Configure a pool containing Plus and Free Codex OAuth accounts.
  3. Run opencodex account refresh openai.
  4. Run opencodex sync --restart-codex.
  5. Start a new request using gpt-5.6-sol.
  6. Repeat using gpt-6-astra.
  7. Inspect opencodex logs --jsonl.

Version

OpenCodex 2.57.0 (@bitkyc08/opencodex@2.57.0).

Operating system

Windows 11 24H2.

Provider and model

Codex / ChatGPT OAuth account pool.

Models affected:

  • gpt-5.6-sol
  • gpt-6-astra

Observed result

For gpt-5.6-sol:

status: 400
provider: openai-pd56bf5
accountLogLabel: pd56bf5
upstreamError: The 'gpt-5.6-sol' model is not supported when using Codex with a ChatGPT account.
attempts: 1
recoveryKinds: []
moveReasons: ["healthy"]

For gpt-6-astra:

status: 400
provider: openai-pd56bf5
accountLogLabel: pd56bf5
upstreamError: The 'gpt-6-astra' model is not supported when using Codex with a ChatGPT account.
attempts: 1
recoveryKinds: []
moveReasons: ["healthy"]

The selected account label corresponds to the Free account shown by opencodex account list openai as selected.

Additional context

The account quota refresh completed successfully and returned quota data for all five accounts. The model catalog sync also completed successfully and appended 83 models. However, the refresh did not produce usable per-account model-roster denial evidence for Sol/Astra, or the denial evidence is not being consumed by the initial native Codex selection path.

The v2.57.0 source contains ENTITLEMENT_PREFERRED_NATIVE_OPENAI_MODELS and cachedDeniedCodexAccountIdsForModel, but the live behavior above still routes to the Free account and performs no alternate attempt.

A local WebSocket warning also appeared:

failed to connect to websocket: HTTP error: 426 Upgrade Required, url: ws://127.0.0.1:10100/v1/responses

The relevant terminal failure remains the account-specific unsupported-model 400.

Requested fix

Please investigate and fix the remaining gap so that:

  1. Full authenticated /codex/models roster refresh is available for every pool account, not only quota refresh.
  2. Confirmed per-account model denial is persisted and consumed by the initial native Codex account selector for Sol/Terra/Luna/Astra.
  3. The exact unsupported-model 400 reliably triggers a bounded alternate-account retry when the request is replayable and another account is available.
  4. Add an integration/regression test covering a Plus + Free pool for gpt-5.6-sol and gpt-6-astra.
  5. Make the logs expose a redacted routing reason such as account-model-denied or entitlement-unknown.

Please relate this to the original issue and verify against a current Windows installation.

Checks

  • I searched existing issues and related PRs.
  • I removed account emails, tokens, API keys, and private credentials.

Related: #4768
Fix under test: #4797

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolOAuth, credentials, Codex pool, quota, failover, plansbugSomething isn't workingcatalogModel catalog, slugs, visibility, routed entries

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions