Skip to content

fix(doctor): skip /models health check for /anthropic endpoints (MiniMax-CN)#12162

Closed
zhengrick9-ship-it wants to merge 1 commit into
NousResearch:mainfrom
zhengrick9-ship-it:fix/minimax-cn-doctor-healthcheck
Closed

fix(doctor): skip /models health check for /anthropic endpoints (MiniMax-CN)#12162
zhengrick9-ship-it wants to merge 1 commit into
NousResearch:mainfrom
zhengrick9-ship-it:fix/minimax-cn-doctor-healthcheck

Conversation

@zhengrick9-ship-it

Copy link
Copy Markdown

Problem

hermes doctor reports ⚠ MiniMax (China) (HTTP 404) even when the API key is valid and working.

Root cause: MINIMAX_CN_BASE_URL is https://api.minimaxi.com/anthropic. The health check rewrites /anthropic/v1 to check /v1/models, which doesn't exist for MiniMax-CN.

Fix

Skip the /models health check for providers using /anthropic endpoints.

if _base and _base.rstrip("/").endswith("/anthropic"):
    print(f"\r  {color('✓', Colors.GREEN)} {_label} {color('(key configured, /anthropic endpoint — no /models check)', Colors.DIM)}")
    continue

Verification

# /v1/models 404s (expected for MiniMax-CN)
curl -o /dev/null -w "%{http_code}" https://api.minimaxi.com/v1/models

# actual API works fine
curl -X POST -d '{"model":"MiniMax-M2.7-highspeed","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}' \
  https://api.minimaxi.com/anthropic/v1/messages
# → 200

…Max-CN)

MiniMax-CN uses /anthropic as the primary surface; /v1/models 404s.
Skip the health check for /anthropic endpoints to avoid false positives.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard provider/minimax MiniMax (Anthropic transport) labels Apr 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competing fix with #13780 and #14123 — all address the same MiniMax-CN /v1/models 404 in hermes doctor. See also issues #12768 and #13757.

@Hackebein

Copy link
Copy Markdown

same issue exists for MiniMax (Global) - api.minimax.io

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the PR! This fix has already been superseded by more complete handling on main — automated hermes-sweeper review.

What's on main now:

  • b4a100dfc initially fixed the false-positive 404 by disabling the /models health check for both MiniMax providers entirely.
  • Subsequent commits evolved the fix further: MiniMax (China) now uses https://api.minimaxi.com/v1/models as its default health-check URL (which does work), and lines 972-974 in hermes_cli/doctor.py add a /anthropic/v1 rewrite for users who set MINIMAX_CN_BASE_URL to the Anthropic-compat endpoint.

The current behavior on main is strictly richer than the proposed skip — it performs a real health check where possible and only falls back gracefully when the endpoint doesn't support /models. Merging this PR would replace that with an unconditional skip, which would mask genuinely invalid keys for MiniMax-CN users.

Related: member @alt-glitch also flagged competing PRs #13780 and #14123 that address the same root issue; those are worth checking for any remaining gaps.

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

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have provider/minimax MiniMax (Anthropic transport) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants