diff --git a/hermes_cli/models.py b/hermes_cli/models.py index a3cd389b4..5da9824f3 100644 --- a/hermes_cli/models.py +++ b/hermes_cli/models.py @@ -56,6 +56,18 @@ OPENROUTER_MODELS: list[tuple[str, str]] = [ _openrouter_catalog_cache: list[tuple[str, str]] | None = None + +def _codex_curated_models() -> list[str]: + """Derive the openai-codex curated list from codex_models.py. + + Single source of truth: DEFAULT_CODEX_MODELS + forward-compat synthesis. + This keeps the gateway /model picker in sync with the CLI `hermes model` + flow without maintaining a separate static list. + """ + from hermes_cli.codex_models import DEFAULT_CODEX_MODELS, _add_forward_compat_models + return _add_forward_compat_models(list(DEFAULT_CODEX_MODELS)) + + _PROVIDER_MODELS: dict[str, list[str]] = { "nous": [ "anthropic/claude-opus-4.6", @@ -86,14 +98,7 @@ _PROVIDER_MODELS: dict[str, list[str]] = { "openai/gpt-5.4-pro", "openai/gpt-5.4-nano", ], - "openai-codex": [ - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.3-codex", - "gpt-5.2-codex", - "gpt-5.1-codex-mini", - "gpt-5.1-codex-max", - ], + "openai-codex": _codex_curated_models(), "copilot-acp": [ "copilot-acp", ],