hermes - ✅(Solved) Fix [Bug]: MiniMax-cn在切换时健康误报情况 [3 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#12547Fetched 2026-04-20 12:18:19
View on GitHub
Comments
1
Participants
2
Timeline
11
Reactions
0
Participants
Timeline (top)
referenced ×5cross-referenced ×3closed ×1commented ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

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

Description (problem / solution / changelog)

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

Changed files

  • hermes_cli/models.py (modified, +43/-0)

PR #12829: fix(models): validate MiniMax models against static catalog

Description (problem / solution / changelog)

What changed

Added a catalog-based validation path for MiniMax models in _resolve_model_selection(), mirroring the existing openai-codex pattern. MiniMax does not expose a /models API endpoint, so the previous code would fall through to a generic "Could not reach API" rejection even for valid model names.

Before: Any MiniMax model would be rejected with "Could not reach API" because the API probe to /v1/models always fails for MiniMax.

After: MiniMax models are validated against a static catalog (case-insensitive matching), with:

  • Exact match detection for known models
  • Auto-correct for close matches (edit distance via difflib.get_close_matches)
  • Suggestion display for near-matches
  • Graceful acceptance with warning for unrecognized models (since the catalog may be incomplete)

Note: Unlike openai-codex which rejects unknown models (accepted: False), MiniMax accepts unknown models with a warning (accepted: True) because the catalog may not cover all available models and the user's model may still work server-side.

How to test

  1. Configure MiniMax as a provider with a valid API key
  2. Set model to MiniMax-M2.7 — should be accepted without warning
  3. Set model to minimax-m2.7 — should be accepted (case-insensitive)
  4. Set model to MiniMax-Text-01 — should auto-correct with suggestion
  5. Set model to MiniMax-Unknown — should be accepted with warning
  6. Run the test suite:
    pytest tests/test_minimax_model_validation.py -v

Platforms tested

  • Linux (Docker container, Python 3.11)

Closes #12611 Closes #12460 Closes #12399 Closes #12547

Changed files

  • hermes_cli/models.py (modified, +45/-0)
  • tests/test_minimax_model_validation.py (added, +130/-0)

PR #12842: fix(models): validate MiniMax models against static catalog

Description (problem / solution / changelog)

Salvage of #12829 by @Tranquil-Flow onto current main.

Summary

hermes model MiniMax-M2.7 now succeeds. Previously, validation hard-rejected every MiniMax model because MiniMax's /v1/models endpoint returns 404 and commit aeb53131f flipped probe failure from warn-and-accept to hard-reject.

Changes

  • hermes_cli/models.py: new minimax / minimax-cn branch in validate_requested_model(), placed before the live probe — mirrors the existing openai-codex pattern. Case-insensitive exact match, case-insensitive auto-correct at 0.9 cutoff, similar-model suggestions at 0.5, unknown names accepted with a warning (catalog may be incomplete).
  • tests/test_minimax_model_validation.py: 7 tests covering exact match, case-insensitivity, near-match suggestion, unknown-model acceptance with warning, and catalog-path-is-taken guard.

Validation

  • Targeted pytest: 70/70 passed across tests/test_minimax_model_validation.py + tests/hermes_cli/test_model_validation.py.
  • E2E with fetch_api_models stubbed to return None: exact/lowercase/uppercase all accepted+recognized, MinMax-M2.7 auto-corrects to MiniMax-M2.7, unknown models accepted with the "MiniMax does not expose a /models endpoint" warning, minimax-cn behaves the same.

Closes #12611 Closes #12460 Closes #12399 Closes #12547

Supersedes #12564 (duplicate, same root cause, less coverage).

Changed files

  • hermes_cli/models.py (modified, +45/-0)
  • tests/test_minimax_model_validation.py (added, +130/-0)

Code Example


---
RAW_BUFFERClick to expand / collapse

Bug Description

描述 切换到 MiniMax 模型时(hermes model MiniMax-M2.7)验证失败,即使模型实际可用。

注: hermes doctor 存在类似问题,别人已经提交过,但模型切换没有报过问题,故提交问题

Steps to Reproduce

复现步骤

  1. 配置 MiniMax API Key(MINIMAX_API_KEY 或 MINIMAX_CN_API_KEY)
  2. 执行 hermes model MiniMax-M2.7

Expected Behavior

预期行为 模型切换成功,可正常对话。

Actual Behavior

实际行为 报错:Could not reach the MiniMax API to validate 'MiniMax-M2.7'. If the service isn't down, this model may not be valid.

Affected Component

Configuration (config.yaml, .env, hermes setup)

Messaging Platform (if gateway-related)

N/A (CLI only), Telegram, Discord, Slack, WhatsApp

Debug Report

Operating System

Debian 12

Python Version

3.11.15

Hermes Version

v0.10.0 (2026.4.16)

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

根本原因

  • MiniMax API 未实现 /v1/models 端点(返回 404)
  • Hermes 在模型切换时调用 /v1/models 验证模型是否可用
  • 验证失败导致切换被阻止,但 /v1/messages 聊天接口实际正常工作

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The issue can be resolved by updating the Hermes configuration to skip model validation or by implementing the /v1/models endpoint in the MiniMax API.

Guidance

  • Verify that the MiniMax API is correctly configured and the MINIMAX_API_KEY or MINIMAX_CN_API_KEY is set.
  • Check the Hermes documentation to see if there is an option to skip model validation during the model switching process.
  • Investigate the possibility of implementing the /v1/models endpoint in the MiniMax API to return a list of available models.
  • Test the /v1/messages endpoint to confirm that it is working as expected.

Example

No code example is provided as it is not clearly supported by the issue.

Notes

The issue seems to be related to the MiniMax API not implementing the /v1/models endpoint, which is required by Hermes for model validation. The fact that the /v1/messages endpoint is working suggests that the API is partially functional.

Recommendation

Apply workaround: Update the Hermes configuration to skip model validation, as implementing the /v1/models endpoint in the MiniMax API may not be feasible or may require significant changes. This workaround can allow the model switching process to complete successfully.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING