hermes - 💡(How to fix) Fix Custom providers in config.providers are misclassified as unknown by and doctor [1 comments, 1 participants]

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…
GitHub stats
NousResearch/hermes-agent#14849Fetched 2026-04-24 06:14:28
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
closed ×1commented ×1

Named user-defined providers configured under config.yaml -> providers: are correctly surfaced in picker/runtime flows, but some validation/entrypoint code paths still treat them as unknown because they call hermes_cli.auth.resolve_provider() (built-in providers only) instead of the user-aware provider resolution path.

This produces false warnings like:

Warning: Unknown provider 'volcengine-plan'. Check 'hermes model' for available providers, or run 'hermes doctor' to diagnose config issues. Falling back to auto provider detection.\n```\n\nand config diagnostics like `model.provider points to a provider not found in config`, even though the provider is present in `config.yaml`, appears in the model picker, and can fetch models successfully.\n\n## Environment\n\n- Reproduced on official `main`\n- Commit: `6fdbf2f2d76cf37393e657bf37ceda3d84589200`\n- Remote: `https://github.com/NousResearch/hermes-agent.git`\n\n## Repro\n\nUse a config like:\n\n```yaml\nmodel:\n  default: doubao-seed-2.0-code\n  provider: volcengine-plan\n\nproviders:\n  volcengine-plan:\n    name: volcengine-plan\n    base_url: https://ark.cn-beijing.volces.com/api/coding/v3\n    api_key: ${VOLCENGINE_API_KEY}\n    default_model: doubao-seed-2.0-code\n    models:\n      doubao-seed-2.0-code: {}\n```\n\nThen run:\n\n```bash\nhermes model\n```\n\n### Actual\n\n1. `hermes model` first prints:\n\n```text\nWarning: Unknown provider 'volcengine-plan'. Check 'hermes model' for available providers, or run 'hermes doctor' to diagnose config issues. Falling back to auto provider detection.\n```\n\n2. The picker then still shows the provider correctly, for example:\n\n```text\n29. volcengine-plan (ark.cn-beijing.volces.com/api/coding/v3) — doubao-seed-2.0-code\n```\n\n3. Selecting that provider succeeds and fetches models from the endpoint.\n\n4. `hermes doctor` / Web UI diagnostics also misclassify `model.provider: volcengine-plan` as unknown.\n\n### Expected\n\nIf a provider exists in `config.yaml -> providers:` (or the compatibility view from `get_compatible_custom_providers()`), entrypoint validation and diagnostics should accept it consistently. No false warning should be emitted before opening the picker, and `doctor` should not report the provider as unknown.\n\n## Root cause\n\nThere are currently two different provider-resolution paths in play:\n\n- The shared switch/runtime flows correctly support user-defined providers via `resolve_provider_full(...)` and compatibility helpers.\n- But some validation/display entrypoints still call `resolve_provider(...)`, which only knows built-in providers.\n\n### Affected call sites\n\n1. `hermes_cli/main.py`\n\n`select_provider_and_model()` pre-validates the current provider with:\n\n```py\nactive = resolve_provider(effective_provider)\n```\n\nThis is what emits the false `Unknown provider` warning before the picker opens.\n\n2. `hermes_cli/doctor.py`\n\nDoctor validates `model.provider` with:\n\n```py\ncanonical_provider = _resolve_provider(provider)\n```\n\nThis incorrectly reports user-defined `providers:` entries as unknown.\n\n## Suggested fix\n\nUse the user-aware resolution path for these validation/entrypoint checks, e.g. `resolve_provider_full(...)` with:\n\n- `cfg.get("providers")`\n- `get_compatible_custom_providers(cfg)`\n\nThat should bring `hermes model`, `doctor`, and UI diagnostics into alignment with the already-correct picker/runtime behavior.\n\n## Notes\n\nThis is not a local divergence issue: the reproduction above was verified against official `main` at `6fdbf2f2d76cf37393e657bf37ceda3d84589200`.\n

Root Cause

Named user-defined providers configured under config.yaml -> providers: are correctly surfaced in picker/runtime flows, but some validation/entrypoint code paths still treat them as unknown because they call hermes_cli.auth.resolve_provider() (built-in providers only) instead of the user-aware provider resolution path.

Code Example

Warning: Unknown provider 'volcengine-plan'. Check 'hermes model' for available providers, or run 'hermes doctor' to diagnose config issues. Falling back to auto provider detection.\n
RAW_BUFFERClick to expand / collapse

Summary

Named user-defined providers configured under config.yaml -> providers: are correctly surfaced in picker/runtime flows, but some validation/entrypoint code paths still treat them as unknown because they call hermes_cli.auth.resolve_provider() (built-in providers only) instead of the user-aware provider resolution path.

This produces false warnings like:

Warning: Unknown provider 'volcengine-plan'. Check 'hermes model' for available providers, or run 'hermes doctor' to diagnose config issues. Falling back to auto provider detection.\n```\n\nand config diagnostics like `model.provider points to a provider not found in config`, even though the provider is present in `config.yaml`, appears in the model picker, and can fetch models successfully.\n\n## Environment\n\n- Reproduced on official `main`\n- Commit: `6fdbf2f2d76cf37393e657bf37ceda3d84589200`\n- Remote: `https://github.com/NousResearch/hermes-agent.git`\n\n## Repro\n\nUse a config like:\n\n```yaml\nmodel:\n  default: doubao-seed-2.0-code\n  provider: volcengine-plan\n\nproviders:\n  volcengine-plan:\n    name: volcengine-plan\n    base_url: https://ark.cn-beijing.volces.com/api/coding/v3\n    api_key: ${VOLCENGINE_API_KEY}\n    default_model: doubao-seed-2.0-code\n    models:\n      doubao-seed-2.0-code: {}\n```\n\nThen run:\n\n```bash\nhermes model\n```\n\n### Actual\n\n1. `hermes model` first prints:\n\n```text\nWarning: Unknown provider 'volcengine-plan'. Check 'hermes model' for available providers, or run 'hermes doctor' to diagnose config issues. Falling back to auto provider detection.\n```\n\n2. The picker then still shows the provider correctly, for example:\n\n```text\n29. volcengine-plan (ark.cn-beijing.volces.com/api/coding/v3) — doubao-seed-2.0-code\n```\n\n3. Selecting that provider succeeds and fetches models from the endpoint.\n\n4. `hermes doctor` / Web UI diagnostics also misclassify `model.provider: volcengine-plan` as unknown.\n\n### Expected\n\nIf a provider exists in `config.yaml -> providers:` (or the compatibility view from `get_compatible_custom_providers()`), entrypoint validation and diagnostics should accept it consistently. No false warning should be emitted before opening the picker, and `doctor` should not report the provider as unknown.\n\n## Root cause\n\nThere are currently two different provider-resolution paths in play:\n\n- The shared switch/runtime flows correctly support user-defined providers via `resolve_provider_full(...)` and compatibility helpers.\n- But some validation/display entrypoints still call `resolve_provider(...)`, which only knows built-in providers.\n\n### Affected call sites\n\n1. `hermes_cli/main.py`\n\n`select_provider_and_model()` pre-validates the current provider with:\n\n```py\nactive = resolve_provider(effective_provider)\n```\n\nThis is what emits the false `Unknown provider` warning before the picker opens.\n\n2. `hermes_cli/doctor.py`\n\nDoctor validates `model.provider` with:\n\n```py\ncanonical_provider = _resolve_provider(provider)\n```\n\nThis incorrectly reports user-defined `providers:` entries as unknown.\n\n## Suggested fix\n\nUse the user-aware resolution path for these validation/entrypoint checks, e.g. `resolve_provider_full(...)` with:\n\n- `cfg.get("providers")`\n- `get_compatible_custom_providers(cfg)`\n\nThat should bring `hermes model`, `doctor`, and UI diagnostics into alignment with the already-correct picker/runtime behavior.\n\n## Notes\n\nThis is not a local divergence issue: the reproduction above was verified against official `main` at `6fdbf2f2d76cf37393e657bf37ceda3d84589200`.\n

extent analysis

TL;DR

Use the user-aware provider resolution path, such as resolve_provider_full(...), to fix the inconsistent treatment of user-defined providers.

Guidance

  • Identify the affected call sites, specifically hermes_cli/main.py and hermes_cli/doctor.py, where resolve_provider(...) is used.
  • Replace resolve_provider(...) with resolve_provider_full(...) to utilize the user-aware resolution path.
  • Pass cfg.get("providers") and get_compatible_custom_providers(cfg) to resolve_provider_full(...) to ensure correct provider resolution.
  • Verify that the changes fix the false warnings and incorrect diagnostics by running hermes model and hermes doctor with the updated code.

Example

# In hermes_cli/main.py
active = resolve_provider_full(effective_provider, cfg.get("providers"), get_compatible_custom_providers(cfg))

# In hermes_cli/doctor.py
canonical_provider = resolve_provider_full(provider, cfg.get("providers"), get_compatible_custom_providers(cfg))

Notes

The suggested fix assumes that resolve_provider_full(...) is correctly implemented and handles user-defined providers as expected. Additional testing may be necessary to ensure the changes do not introduce new issues.

Recommendation

Apply the workaround by replacing resolve_provider(...) with resolve_provider_full(...) in the affected call sites, as this should bring the validation and diagnostics into alignment with the correct picker/runtime behavior.

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 in config.providers are misclassified as unknown by and doctor [1 comments, 1 participants]