mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: unify visibility filter in codex model discovery
_fetch_models_from_api checked for "hide" while _read_cache_models checked for "hidden", causing models hidden by the API to still appear when loaded from cache. Both now accept either value.
This commit is contained in:
parent
d6d5a43d3a
commit
ca23875575
1 changed files with 2 additions and 2 deletions
|
|
@ -47,7 +47,7 @@ def _fetch_models_from_api(access_token: str) -> List[str]:
|
|||
if item.get("supported_in_api") is False:
|
||||
continue
|
||||
visibility = item.get("visibility", "")
|
||||
if isinstance(visibility, str) and visibility.strip().lower() == "hidden":
|
||||
if isinstance(visibility, str) and visibility.strip().lower() in ("hide", "hidden"):
|
||||
continue
|
||||
priority = item.get("priority")
|
||||
rank = int(priority) if isinstance(priority, (int, float)) else 10_000
|
||||
|
|
@ -97,7 +97,7 @@ def _read_cache_models(codex_home: Path) -> List[str]:
|
|||
if item.get("supported_in_api") is False:
|
||||
continue
|
||||
visibility = item.get("visibility")
|
||||
if isinstance(visibility, str) and visibility.strip().lower() == "hidden":
|
||||
if isinstance(visibility, str) and visibility.strip().lower() in ("hide", "hidden"):
|
||||
continue
|
||||
priority = item.get("priority")
|
||||
rank = int(priority) if isinstance(priority, (int, float)) else 10_000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue