fix(doctor): skip /models health check for providers that don't support it - #21785
Closed
jak983464779 wants to merge 1 commit into
Closed
fix(doctor): skip /models health check for providers that don't support it#21785jak983464779 wants to merge 1 commit into
jak983464779 wants to merge 1 commit into
Conversation
…rt it Xiaomi MiMo's /v1/models endpoint returns 401 even with a valid API key, causing hermes doctor to falsely report 'invalid API key'. Add a `supports_health_check` field to ProviderProfile (default True). Providers whose /models endpoint doesn't support auth verification can set it to False. The doctor's dynamic provider discovery now reads this field instead of hardcoding True. The xiaomi provider plugin sets supports_health_check=False.
This was referenced May 10, 2026
Contributor
|
Merged via PR #24657 (cherry-picked onto current main with your authorship preserved). Thanks for the contribution! |
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.
Problem
Xiaomi MiMo's
/v1/modelsendpoint returns 401 even with a valid API key, causinghermes doctorto falsely report "invalid API key".This isn't unique to Xiaomi — any provider whose
/modelsendpoint doesn't support auth verification will trigger the same false positive.Solution
3 files, 4 lines added:
providers/base.py— Addsupports_health_check: bool = Truefield toProviderProfile. Providers that don't support/modelsfor auth verification can set it toFalse.hermes_cli/doctor.py— Dynamic provider discovery now readssupports_health_checkfrom the profile instead of hardcodingTrue.plugins/model-providers/xiaomi/__init__.py— Setsupports_health_check=Falsefor Xiaomi MiMo.Before and After
Testing
hermes doctorno longer reports false positive for Xiaomisupports_health_check=True(default) are unaffected