Skip to content

fix(codex): preserve live model catalog authority - #67867

Open
tschosch55 wants to merge 4 commits into
NousResearch:mainfrom
tschosch55:fix/codex-live-catalog-authority-20260719
Open

fix(codex): preserve live model catalog authority#67867
tschosch55 wants to merge 4 commits into
NousResearch:mainfrom
tschosch55:fix/codex-live-catalog-authority-20260719

Conversation

@tschosch55

Copy link
Copy Markdown

Summary

  • preserve successful account-specific Codex catalog authority end to end, including empty/all-hidden catalogs
  • distinguish live discovery failures from authoritative empty catalogs and reject absent configured/requested slugs only when live authority exists
  • prevent generic provider-cache fallback from resurrecting stale Codex models
  • filter six retired/offline-only Codex slugs while allowing a live catalog to re-advertise them
  • accept documented gateway/runtime root configuration keys in strict validation

Verification

  • 940 passed across all Codex-related test files plus config validation, model validation, provider-resolution, model-switch, and inventory contracts
  • Ruff passed on every changed Python file
  • git diff --check passed
  • live account probe returned one authoritative catalog used identically by discovery, picker, and cached-provider paths; gpt-5.6-sol validated and absent gpt-5.6-sol-pro failed closed
  • active config validation returned zero issues

The installed Hermes checkout and running gateway were not modified by this change.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard provider/openai OpenAI / Codex Responses API codex area/config Config system, migrations, profiles sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Jul 20, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for tracing the live-catalog provenance through discovery, picker, cache, and validation. The current-main premise is real: get_codex_model_ids() falls through whenever the live result is empty (hermes_cli/codex_models.py:236-240), and the generic cache can then restore stale entries (hermes_cli/models.py:3006-3015).

Problems

  • The new authoritative-empty rule also applies when no ChatGPT-Account-Id was recovered. Current main documents that a header-less /models probe returns HTTP 200 with {"models": []} and must degrade to fallback (hermes_cli/codex_models.py:97-109; c44c2fbb0b). The PR's new discovery path makes that same response authoritative, so opaque/malformed tokens can cause the CLI to reject all models rather than use the offline catalog.

Suggested changes

  • Carry whether the account header was sent into the discovery decision; only an account-scoped empty response should be authoritative.
  • Add a mocked malformed-token + 200-empty regression test alongside the authoritative-empty test.

Automated hermes-sweeper review.

@teknium1 teknium1 added the sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles codex comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists provider/openai OpenAI / Codex Responses API sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants