From a2258139f2bf8bd81047b9374e3167a455069aec Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Mon, 13 Apr 2026 22:35:27 -0700 Subject: [PATCH] fix: expand openai-codex model catalog to match DEFAULT_CODEX_MODELS (#407) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: expand openai-codex model catalog to match agent DEFAULT_CODEX_MODELS The _PROVIDER_MODELS["openai-codex"] catalog only listed codex-mini-latest, so the model dropdown for profiles using openai-codex provider (e.g. CodePath) showed only that one entry — even when the profile's saved default_model was gpt-5.4 or another standard Codex model. Updated to match DEFAULT_CODEX_MODELS from hermes_cli/codex_models.py: - gpt-5.4 - gpt-5.4-mini - gpt-5.3-codex - gpt-5.2-codex - gpt-5.1-codex-max - gpt-5.1-codex-mini - codex-mini-latest (kept, relabeled as 'Codex Mini (latest)') Also adds 2 regression tests: catalog includes gpt-5.4, display name correct. * docs: v0.50.28 release — version badge and CHANGELOG --------- Co-authored-by: Nathan Esquenazi --- CHANGELOG.md | 6 ++++++ api/config.py | 8 +++++++- static/index.html | 2 +- tests/test_opencode_providers.py | 16 ++++++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b0c26c..d0e075c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Hermes Web UI -- Changelog +## [v0.50.28] fix: expand openai-codex model catalog to match DEFAULT_CODEX_MODELS + +`_PROVIDER_MODELS["openai-codex"]` only listed `codex-mini-latest`, so profiles using the `openai-codex` provider (e.g. a CodePath profile with `default: gpt-5.4`) showed only one entry in the model dropdown. Updated to mirror the agent's authoritative `DEFAULT_CODEX_MODELS` list: `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.3-codex`, `gpt-5.2-codex`, `gpt-5.1-codex-max`, `gpt-5.1-codex-mini`, `codex-mini-latest`. Added 2 regression tests. + +- 1029 tests total (up from 1027) + ## [v0.50.27] feat: relative time labels in session sidebar (#394) - `static/sessions.js`: new `_sessionCalendarBoundaries()` (DST-safe via `new Date(y,m,d)` construction), `_localDayOrdinal()`, `_formatSessionDate()` (includes year for dates from prior years); `_formatRelativeSessionTime()` now uses calendar midnight boundaries consistent with `_sessionTimeBucketLabel()` — no more label/bucket mismatch; all relative time strings call `t()` for localization; meta row only appended when non-empty (removes redundant group-header fallback); dead `ONE_DAY` constant removed diff --git a/api/config.py b/api/config.py index 8607fb0..35478ee 100644 --- a/api/config.py +++ b/api/config.py @@ -466,7 +466,13 @@ _PROVIDER_MODELS = { {"id": "o4-mini", "label": "o4-mini"}, ], "openai-codex": [ - {"id": "codex-mini-latest", "label": "Codex Mini"}, + {"id": "gpt-5.4", "label": "GPT-5.4"}, + {"id": "gpt-5.4-mini", "label": "GPT-5.4 Mini"}, + {"id": "gpt-5.3-codex", "label": "GPT-5.3 Codex"}, + {"id": "gpt-5.2-codex", "label": "GPT-5.2 Codex"}, + {"id": "gpt-5.1-codex-max", "label": "GPT-5.1 Codex Max"}, + {"id": "gpt-5.1-codex-mini", "label": "GPT-5.1 Codex Mini"}, + {"id": "codex-mini-latest", "label": "Codex Mini (latest)"}, ], "google": [ {"id": "gemini-2.5-pro", "label": "Gemini 2.5 Pro"}, diff --git a/static/index.html b/static/index.html index f78c416..2fd7366 100644 --- a/static/index.html +++ b/static/index.html @@ -535,7 +535,7 @@
System
- v0.50.27 + v0.50.28
diff --git a/tests/test_opencode_providers.py b/tests/test_opencode_providers.py index a4efd94..c342b59 100644 --- a/tests/test_opencode_providers.py +++ b/tests/test_opencode_providers.py @@ -68,3 +68,19 @@ def test_opencode_zen_detected_via_env_key(monkeypatch): def test_opencode_go_detected_via_env_key(monkeypatch): _models_with_env_key(monkeypatch, "OPENCODE_GO_API_KEY", "OpenCode Go") + + +def test_openai_codex_model_catalog_includes_gpt54(): + """openai-codex catalog must include gpt-5.4 and the standard Codex lineup.""" + assert "openai-codex" in config._PROVIDER_MODELS + ids = [m["id"] for m in config._PROVIDER_MODELS["openai-codex"]] + assert "gpt-5.4" in ids, f"gpt-5.4 missing from openai-codex catalog: {ids}" + assert "gpt-5.4-mini" in ids, f"gpt-5.4-mini missing from openai-codex catalog: {ids}" + assert "gpt-5.3-codex" in ids, f"gpt-5.3-codex missing from openai-codex catalog: {ids}" + assert "gpt-5.2-codex" in ids, f"gpt-5.2-codex missing from openai-codex catalog: {ids}" + + +def test_openai_codex_display_name(): + """openai-codex must have a human-readable display name.""" + assert "openai-codex" in config._PROVIDER_DISPLAY + assert config._PROVIDER_DISPLAY["openai-codex"] == "OpenAI Codex"