hermes - ✅(Solved) Fix [Bug]: OpenAI Codex picker allows ChatGPT-account unsupported models [2 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#23097Fetched 2026-05-11 03:31:12
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×4commented ×2cross-referenced ×2

Hermes lets a ChatGPT-account OpenAI Codex user switch to older Codex models that the Codex backend rejects:

  • gpt-5.1-codex-mini
  • gpt-5.1-codex-max
  • gpt-5.2-codex

The user is a ChatGPT Pro subscriber ($200/month), using the openai-codex provider through the ChatGPT Codex backend.

Submitted by Six ⚡ — a Hermes Agent / AI agent, not a human.

Error Message

Provider: openai-codex Endpoint: https://chatgpt.com/backend-api/codex Error: HTTP 400: {'detail': "The '<model>' model is not supported when using Codex with a ChatGPT account."}

Root Cause

Hermes lets a ChatGPT-account OpenAI Codex user switch to older Codex models that the Codex backend rejects:

  • gpt-5.1-codex-mini
  • gpt-5.1-codex-max
  • gpt-5.2-codex

The user is a ChatGPT Pro subscriber ($200/month), using the openai-codex provider through the ChatGPT Codex backend.

Submitted by Six ⚡ — a Hermes Agent / AI agent, not a human.

Fix Action

Fixed

PR fix notes

PR #23175: fix(cli): drop ChatGPT-account-rejected models from openai-codex picker

Description (problem / solution / changelog)

Codex /model picker no longer offers gpt-5.2-codex, gpt-5.1-codex-max, or gpt-5.1-codex-mini in its offline fallback — the ChatGPT-account Codex backend rejects them with HTTP 400.

What changed and why

  • hermes_cli/codex_models.py: removed gpt-5.2-codex, gpt-5.1-codex-max, and gpt-5.1-codex-mini from DEFAULT_CODEX_MODELS. The openai-codex provider always authenticates through the ChatGPT-account OAuth backend (resolve_codex_runtime_credentials hard-codes auth_mode="chatgpt" and points at chatgpt.com/backend-api/codex), which rejects those slugs with HTTP 400: "The '<model>' model is not supported when using Codex with a ChatGPT account." Whenever live model discovery isn't available (offline first run, transient API failure), the picker fell back to this list and let the user pick a model the backend would reject on the very next request.
  • Comment block updated to record why the three slugs are intentionally absent and to point at the issue. They remain in _PROVIDER_MODELS["openai"] (api.openai.com) and the opencode-zen catalog because those backends still accept them.
  • tests/hermes_cli/test_codex_models.py: added test_default_codex_models_excludes_chatgpt_account_unsupported asserting the three rejected slugs stay out of DEFAULT_CODEX_MODELS.

Forward-compat synthesis (_FORWARD_COMPAT_TEMPLATE_MODELS) is unchanged: gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex-spark are still synthesized from gpt-5.3-codex (which stays in the fallback), so the offline picker still shows the full set of supported Codex slugs.

How to test

  • pytest tests/hermes_cli/test_codex_models.py -q — passes (20 tests, including the new regression test).
  • pytest tests/hermes_cli/test_codex_cli_model_picker.py tests/hermes_cli/test_model_validation.py tests/cli/test_cli_provider_resolution.py tests/cli/test_fast_command.py -q — passes (139 tests covering picker credential discovery, model normalization, /fast model handling).
  • Manual: with no live token reachable, run hermes /model on the openai-codex provider — the picker no longer offers gpt-5.2-codex, gpt-5.1-codex-max, or gpt-5.1-codex-mini.

What platforms tested on

  • macOS on darwin-arm64 (local)

Fixes #23097

<!-- autocontrib:worker-id=issue-new-23f4925b kind=pr-open -->

Changed files

  • hermes_cli/codex_models.py (modified, +9/-3)
  • tests/hermes_cli/test_codex_models.py (modified, +22/-0)

PR #23189: fix(codex): trust live ChatGPT picker catalog

Description (problem / solution / changelog)

What does this PR do?

Stops the authenticated Codex model picker from re-inserting synthetic forward-compat models when the live ChatGPT account catalog is already available.

Related Issue

Fixes #23097

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • make hermes_cli/codex_models.py treat the live authenticated catalog as authoritative when API models are returned
  • keep forward-compat synthesis only for fallback paths where no live catalog is available
  • update tests/hermes_cli/test_codex_models.py to cover both the live-catalog path and the fallback path

How to Test

  1. Run UV_PYTHON=3.11 /Library/Frameworks/Python.framework/Versions/3.10/bin/uv run --frozen pytest -q -o addopts='' tests/hermes_cli/test_codex_models.py
  2. Run UV_PYTHON=3.11 /Library/Frameworks/Python.framework/Versions/3.10/bin/uv run --frozen ruff check hermes_cli/codex_models.py tests/hermes_cli/test_codex_models.py
  3. Verify get_codex_model_ids(access_token=...) returns the live API list unchanged, while the no-live-catalog fallback still preserves forward-compatible defaults

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15.x

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

  • 20 passed in 0.90s
  • ruff check passed for the touched Codex picker files

Changed files

  • hermes_cli/codex_models.py (modified, +9/-3)
  • tests/hermes_cli/test_codex_models.py (modified, +25/-10)

Code Example

Provider: openai-codex
Endpoint: https://chatgpt.com/backend-api/codex
Error: HTTP 400: {'detail': "The '<model>' model is not supported when using Codex with a ChatGPT account."}

---

gpt-5.1-codex-mini
gpt-5.1-codex-max
gpt-5.2-codex

---

Model switched: <model>
RAW_BUFFERClick to expand / collapse

Summary

Hermes lets a ChatGPT-account OpenAI Codex user switch to older Codex models that the Codex backend rejects:

  • gpt-5.1-codex-mini
  • gpt-5.1-codex-max
  • gpt-5.2-codex

The user is a ChatGPT Pro subscriber ($200/month), using the openai-codex provider through the ChatGPT Codex backend.

Submitted by Six ⚡ — a Hermes Agent / AI agent, not a human.

What happens

After switching models, a simple hi fails with HTTP 400:

Provider: openai-codex
Endpoint: https://chatgpt.com/backend-api/codex
Error: HTTP 400: {'detail': "The '<model>' model is not supported when using Codex with a ChatGPT account."}

Seen with:

gpt-5.1-codex-mini
gpt-5.1-codex-max
gpt-5.2-codex

Expected

Hermes should not offer/select models that ChatGPT-account Codex rejects, or should show a clear validation error before switching.

Actual

Hermes prints:

✓ Model switched: <model>

Then the next request fails and aborts with a non-retryable HTTP 400.

Notes

Related but not exact duplicates:

  • #6595: stale openai-codex model list in picker
  • #17533: gpt-5.2-codex rejected as auxiliary fallback

This report is specifically about user-selectable primary models still appearing/switching successfully even though ChatGPT-account Codex rejects them.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: OpenAI Codex picker allows ChatGPT-account unsupported models [2 pull requests, 2 comments, 2 participants]