fix(doctor): accept catalog provider aliases#17135
Merged
teknium1 merged 1 commit intoApr 29, 2026
Merged
Conversation
Validate configured providers against both Hermes runtime provider ids and catalog-normalized provider ids. This keeps providers like ai-gateway from being rejected after catalog resolution maps them to models.dev ids. Keep credential checks and vendor-slug warnings anchored to the runtime id so doctor reports actionable provider names in follow-up diagnostics.
Collaborator
stevenchanin
added a commit
to stevenchanin/hermes-agent
that referenced
this pull request
Apr 30, 2026
NousResearch#17135 fixed doctor for providers whose Hermes runtime id differs from the models.dev catalog id (ai-gateway, copilot, kilocode, kimi-coding, kimi-coding-cn, opencode-zen). It missed local-endpoint aliases — ollama, vllm, llamacpp — which auth.resolve_provider routes to "custom" but resolve_provider_full has no entry for, so catalog_provider is None. The validator's failure check started with `if catalog_provider is None or ...`, which short-circuited and rejected those providers even though their auth-resolved runtime id ("custom") was already in provider_ids_to_accept and known_providers. Drop the short-circuit; rely on the intersection check below. Genuinely unknown providers (e.g. "completely-made-up") still fail because the intersection is empty. Tests: parametrized regression test covering ollama / vllm / llamacpp (the cases NousResearch#17135 didn't address) plus bedrock and lmstudio (regression guards — those used to be on the list in NousResearch#16085 but were fixed by adding a HERMES_OVERLAYS / PROVIDER_REGISTRY entry); an invariant test asserting every name doctor prints in its "Valid providers" list passes its own validator; and a negative test asserting a fake provider name is still rejected.
Contributor
|
@alt-glitch @teknium1 Thanks for landing this! Narrowed #16086 down to the remaining cases — ollama, vllm, llamacpp still trip the same validator because auth.resolve_provider routes them to custom but resolve_provider_full returns None, so the catalog_provider is None or … short-circuit rejects them before the intersection check runs. The fix is to drop that short-circuit; the runtime-id intersection you set up already accepts them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes a false-positive
hermes doctorconfig validation error forprovider ids that have different Hermes runtime ids and models.dev catalog
ids.
The bug showed up with
model.provider: ai-gateway: doctor displayedai-gatewayas a valid provider, but still reported it as unknown becausethe provider catalog normalizes
ai-gatewayto the models.dev idvercel.The same path also caused doctor to warn incorrectly about vendor-prefixed
model names on aggregator providers.
False errors seen before this fix:
The fix validates configured providers against both Hermes runtime ids and
catalog-normalized ids, while keeping credential checks and policy warnings
anchored to the runtime id users configured.
This is not limited to
ai-gateway. The runtime ids that currently differfrom their catalog-normalized ids are:
Related Issue
Fixes #
Type of Change
Changes Made
hermes_cli/doctor.pyto accept provider ids resolved throughboth runtime auth normalization and catalog normalization.
names users can configure directly.
tests/hermes_cli/test_doctor.pyforai-gateway,opencode-zen,kilocode, andkimi-coding.How to Test
model.provider: ai-gatewayand a vendor-prefixed model suchas
model.default: openai/gpt-4.1.hermes doctor.ai-gatewayas unknown or suggestsswitching the vendor-prefixed model to
openrouter.Regression test run:
Result:
27 passed.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A