mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +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
|
|
@ -80,8 +80,10 @@ def _fetch_models_from_api(access_token: str) -> List[str]:
|
|||
if not isinstance(slug, str) or not slug.strip():
|
||||
continue
|
||||
slug = slug.strip()
|
||||
if item.get("supported_in_api") is False:
|
||||
continue
|
||||
# Codex CLI's catalog uses ``supported_in_api`` for the public OpenAI
|
||||
# API, not for the OAuth-backed Codex backend that this provider uses.
|
||||
# Some valid Codex CLI models (for example gpt-5.3-codex-spark) are
|
||||
# marked false here but are still accepted by the Codex route.
|
||||
visibility = item.get("visibility", "")
|
||||
if isinstance(visibility, str) and visibility.strip().lower() in ("hide", "hidden"):
|
||||
continue
|
||||
|
|
@ -130,8 +132,9 @@ def _read_cache_models(codex_home: Path) -> List[str]:
|
|||
if not isinstance(slug, str) or not slug.strip():
|
||||
continue
|
||||
slug = slug.strip()
|
||||
if item.get("supported_in_api") is False:
|
||||
continue
|
||||
# Do not filter on ``supported_in_api`` here. It describes the
|
||||
# public OpenAI API, while Hermes openai-codex talks to the same
|
||||
# OAuth-backed Codex backend as Codex CLI.
|
||||
visibility = item.get("visibility")
|
||||
if isinstance(visibility, str) and visibility.strip().lower() in ("hide", "hidden"):
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue