Skip to content

Doctor health check incorrectly uses /models endpoint for MiniMax-CN, which returns 404 #13757

@raydoomed

Description

@raydoomed

Bug Description

The hermes doctor command uses https://api.minimaxi.com/v1/models to health-check the MiniMax (China) provider. This endpoint does not exist and returns HTTP 404.

However, the actual MiniMax /v1/chat/completions API works perfectly fine.

What I tested

# /v1/models — does not exist
$ curl -s -o /dev/null -w "%{http_code}" "https://api.minimaxi.com/v1/models"
404

# /v1/chat/completions — works fine
$ curl -s -X POST "https://api.minimaxi.com/v1/chat/completions"   -H "Authorization: Bearer $MINIMAX_CN_API_KEY"   -H "Content-Type: application/json"   -d '{"model": "MiniMax-M2.7", "messages": [{"role": "user", "content": "hi"}], "max_tokens": 5}'
{"id":"...","object":"chat.completion",...}  # 200 OK

The problematic code

In hermes_cli/doctor.py lines 831-832:

("MiniMax (China)",  ("MINIMAX_CN_API_KEY",),
 "https://api.minimaxi.com/v1/models",  "MINIMAX_CN_BASE_URL", True),

The code comment at line 830 says:

"MiniMax: the /anthropic endpoint doesn't support /models, but the /v1 endpoint does."

This is incorrect for MiniMax-CN (api.minimaxi.com). The /v1/models endpoint does not exist there. The comment was likely written for MiniMax Global (api.minimax.io) and incorrectly applied to both.

Suggested fix

MiniMax-CN does not have a /models endpoint. The health check should either:

  1. Use a direct chat completion test (POST to /v1/chat/completions with a minimal request), or
  2. Set _supports_health_check = False for MiniMax (China) to skip the check, similar to OpenCode Go

Environment

  • Hermes version: (latest, git clone)
  • Python: 3.11.15
  • Platform: macOS
  • Provider: MiniMax-CN (api.minimaxi.com)

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp/cliCLI entry point, hermes_cli/, setup wizardprovider/minimaxMiniMax (Anthropic transport)type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions