fix(doctor): add check_url flag to skip /models for providers that don't support it#833
Open
ygd58 wants to merge 1 commit intoNousResearch:mainfrom
Open
fix(doctor): add check_url flag to skip /models for providers that don't support it#833ygd58 wants to merge 1 commit intoNousResearch:mainfrom
ygd58 wants to merge 1 commit intoNousResearch:mainfrom
Conversation
…n't support it MiniMax (global and China) return 404 on /v1/models by design. Instead of treating this as a connectivity failure, providers can now set check_url=False in _apikey_providers to show '(API key configured)' when a valid key is present. - Adds check_url field to _apikey_providers tuple - MiniMax and MiniMax (China) both set to check_url=False - Removes the separate MiniMax-specific block after the loop - Future providers with no /models endpoint can use the same flag Closes NousResearch#811
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.
Summary
Fixes #811 — MiniMax APIs (both global and China) return 404 on
/v1/modelsby design, causinghermes doctorto falsely report connectivity failures.Approach
Rather than adding a one-off special case for MiniMax, this PR extends the
_apikey_providerstuple with acheck_urlboolean field. Providers that don't expose a/modelshealth-check endpoint can setcheck_url=Falseand will show(API key configured)when a valid key is present.This is more maintainable than #822 — any future provider with the same limitation only needs a single flag change.
Before:
◆ API Connectivity
⚠ MiniMax (HTTP 404)
⚠ MiniMax (China) (HTTP 404)
After:
API Connectivity
✓ MiniMax (API key configured)
✓ MiniMax (China) (API key configured)
Changes
check_urlfield added to_apikey_providerstuplecheck_url=False