mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-21 05:11:26 +00:00
fix: surface Codex CLI-only models
This commit is contained in:
parent
c6dc295a35
commit
9457644390
4 changed files with 36 additions and 9 deletions
|
|
@ -75,6 +75,30 @@ def test_normal_path_still_works(hermes_auth_only_env):
|
|||
assert "openai-codex" in slugs
|
||||
|
||||
|
||||
def test_codex_picker_uses_live_codex_catalog(hermes_auth_only_env, tmp_path, monkeypatch):
|
||||
"""The gateway /model picker should surface Codex CLI-only listed models."""
|
||||
from hermes_cli.model_switch import list_authenticated_providers
|
||||
|
||||
codex_home = tmp_path / "codex-home"
|
||||
codex_home.mkdir()
|
||||
(codex_home / "models_cache.json").write_text(json.dumps({
|
||||
"models": [
|
||||
{"slug": "gpt-5.5", "priority": 0, "supported_in_api": True},
|
||||
{"slug": "gpt-5.3-codex-spark", "priority": 7, "supported_in_api": False},
|
||||
]
|
||||
}))
|
||||
monkeypatch.setenv("CODEX_HOME", str(codex_home))
|
||||
|
||||
providers = list_authenticated_providers(
|
||||
current_provider="openai-codex",
|
||||
max_models=10,
|
||||
)
|
||||
|
||||
codex = next(p for p in providers if p["slug"] == "openai-codex")
|
||||
assert "gpt-5.3-codex-spark" in codex["models"]
|
||||
assert codex["total_models"] == len(codex["models"])
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def claude_code_only_env(tmp_path, monkeypatch):
|
||||
"""Set up an environment where Anthropic credentials only exist in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue