hermes - 💡(How to fix) Fix custom_providers: model name not forwarded to API request [2 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

hermes chat -q "Hello"

Error: HTTP 400: Invalid model name passed in model=

Root Cause

provider_model_ids() in models.py doesn't handle custom providers — it only has handlers for openrouter, nous, xai, copilot, etc. Custom provider names fall through to the default path which returns an empty model list, causing the model field to be empty in the API call.

Fix Action

Fixed

Code Example

# ~/.hermes/config.yaml
model:
  name: claude-sonnet-4-20250514
  provider: my-litellm

custom_providers:
  - name: my-litellm
    base_url: http://litellm-proxy:4000/v1
    api_key: sk-...
    models:
      - claude-sonnet-4-20250514

---

hermes chat -q "Hello"
# Error: HTTP 400: Invalid model name passed in model=
RAW_BUFFERClick to expand / collapse

Bug

When using custom_providers in config.yaml, the model name from model.name is not included in the API request body. The request sends model= (empty string), causing 400 errors from OpenAI-compatible backends.

Repro

# ~/.hermes/config.yaml
model:
  name: claude-sonnet-4-20250514
  provider: my-litellm

custom_providers:
  - name: my-litellm
    base_url: http://litellm-proxy:4000/v1
    api_key: sk-...
    models:
      - claude-sonnet-4-20250514
hermes chat -q "Hello"
# Error: HTTP 400: Invalid model name passed in model=

Expected

The model name claude-sonnet-4-20250514 should be sent in the request body.

Root cause

provider_model_ids() in models.py doesn't handle custom providers — it only has handlers for openrouter, nous, xai, copilot, etc. Custom provider names fall through to the default path which returns an empty model list, causing the model field to be empty in the API call.

Version

Hermes Agent v0.15.1 (2026.5.29)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix custom_providers: model name not forwarded to API request [2 pull requests]