Skip to content

fix(models): use local catalog for MiniMax validation instead of /v1/models (fixes false negative)#12564

Closed
ygd58 wants to merge 1 commit into
NousResearch:mainfrom
ygd58:fix/minimax-model-validation-false-negative
Closed

fix(models): use local catalog for MiniMax validation instead of /v1/models (fixes false negative)#12564
ygd58 wants to merge 1 commit into
NousResearch:mainfrom
ygd58:fix/minimax-model-validation-false-negative

Conversation

@ygd58

@ygd58 ygd58 commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Problem

MiniMax (both global and CN endpoints) does not implement /v1/models — it returns 404. When a user runs hermes model MiniMax-M2.7, validate_requested_model() calls fetch_api_models() which probes /v1/models, gets 404, returns None, and falls through to the generic error:

Could not reach the MiniMax API to validate 'MiniMax-M2.7'.
If the service isn't down, this model may not be valid.

The chat endpoint works fine — only the models listing endpoint is missing.

Fix

Add a minimax / minimax-cn branch in validate_requested_model() that uses provider_model_ids() (local catalog) instead of probing /v1/models. Same pattern already used for Bedrock.

  • Valid model names → accepted=True, recognized=True
  • Close matches → auto-correct
  • Unknown names → accepted=True with a warning (user may have plan-specific access)

Result

hermes model MiniMax-M2.7 succeeds when MiniMax-M2.7 is in the local catalog. No network call needed for validation.

Fixes #12547

…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
@teknium1

Copy link
Copy Markdown
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.

@teknium1 teknium1 closed this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: MiniMax-cn在切换时健康误报情况

2 participants