mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
fix(cli): non-zero /model counts for native OpenAI and direct API rows
This commit is contained in:
parent
7f26cea390
commit
4a51ab61eb
3 changed files with 84 additions and 0 deletions
|
|
@ -1240,6 +1240,15 @@ def list_authenticated_providers(
|
|||
if m and m not in models_list:
|
||||
models_list.append(m)
|
||||
|
||||
# Official OpenAI API rows in providers: often have base_url but no
|
||||
# explicit models: dict — avoid a misleading zero count in /model.
|
||||
if not models_list:
|
||||
url_lower = str(api_url).strip().lower()
|
||||
if "api.openai.com" in url_lower:
|
||||
fb = curated.get("openai") or []
|
||||
if fb:
|
||||
models_list = list(fb)
|
||||
|
||||
# Try to probe /v1/models if URL is set (but don't block on it)
|
||||
# For now just show what we know from config
|
||||
results.append({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue