fix(models): use local catalog for MiniMax validation instead of /v1/models (fixes false negative)#12564
Closed
ygd58 wants to merge 1 commit into
Closed
Conversation
…models MiniMax (both global and CN) does not implement the /v1/models endpoint (returns 404). validate_requested_model() fell through to the generic 'Could not reach API' error even when the model name was valid and the chat endpoint worked fine. Add a MiniMax-specific branch in validate_requested_model() that uses the local provider_model_ids() catalog (same pattern as Bedrock) instead of probing /v1/models. Valid model names are accepted immediately; close matches trigger auto-correct; unknown names are accepted with a warning. Fixes NousResearch#12547
Contributor
|
Closed as superseded by #12842 (merged as 35e7bf6), which takes the same approach but with case-insensitive matching, placement before the /v1/models probe (skips the pointless 404), and a full test file. Thanks for tackling the same issue — credit to you and @Tranquil-Flow for converging on the right pattern. |
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
MiniMax (both global and CN endpoints) does not implement
/v1/models— it returns 404. When a user runshermes model MiniMax-M2.7,validate_requested_model()callsfetch_api_models()which probes/v1/models, gets 404, returnsNone, and falls through to the generic error:The chat endpoint works fine — only the models listing endpoint is missing.
Fix
Add a
minimax/minimax-cnbranch invalidate_requested_model()that usesprovider_model_ids()(local catalog) instead of probing/v1/models. Same pattern already used for Bedrock.accepted=True, recognized=Trueaccepted=Truewith a warning (user may have plan-specific access)Result
hermes model MiniMax-M2.7succeeds whenMiniMax-M2.7is in the local catalog. No network call needed for validation.Fixes #12547