Skip to content

MiniMax provider model validation fails because /anthropic/models endpoint returns 404 #12460

@cannonball-me

Description

@cannonball-me

Bug Description

MiniMax is a built-in provider in Hermes. When switching to a MiniMax model (e.g. MiniMax-M2.7) via /model, validation fails with:

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

The switch is rejected even though the model works correctly for actual inference.

Root Cause

MiniMax provides an Anthropic-compatible endpoint at https://api.minimax.io/anthropic/v1/messages but does not expose a standard OpenAI /models listing endpoint at /anthropic/models — it returns HTTP 404.

The validate_requested_model() function in hermes_cli/models.py probes the provider's /models endpoint to verify model existence. When that probe returns None (endpoint unreachable or 404), the function returns accepted: False, persist: False, blocking the switch entirely.

Commit aeb53131f (April 13, "fix(ui-tui): harden TUI error handling, model validation...") changed the behavior of this failure path from warn-and-accept to hard-reject, which introduced this regression for MiniMax and other providers with non-standard /models endpoints.

Affected Providers / Endpoints

This is a known class of issue affecting multiple providers that have functional chat APIs but broken or missing /models endpoints:

Provider Endpoint Pattern Status
MiniMax api.minimax.io/anthropic /anthropic/models → 404
Alibaba/DashScope (coding) coding.dashscope.aliyuncs.com /models → 404
Bailian/DashScope dashscope.aliyuncs.com /models → 404
GitHub Copilot api.githubcopilot.com/models Returns 403 for some users
Custom providers Various regional/cloud providers /v1/models → 500 or unreachable

See also: #12220 (Bailian/DashScope), #12272 (Alibaba/DashScope coding endpoint), #12153 (custom providers), #12086 (GitHub Copilot).

Expected Behavior

When the /models probe fails for a known-working provider with an Anthropic-compatible or OpenAI-compatible chat endpoint, Hermes should:

  1. Accept and persist the model switch (the user knows what they're doing)
  2. Issue a warning (not a rejection) that validation could not be performed
  3. Allow the switch to proceed — actual inference will verify if the model works

This is consistent with how AWS Bedrock is already handled in the same function — Bedrock uses AWS SDK discovery instead of HTTP /models and falls back to warn-and-accept when that also fails.

Current Behavior

When the /models probe returns None:

  • accepted: False, persist: False — switch is blocked
  • Error message shown to user
  • User cannot switch to MiniMax models via /model even though inference works

Workaround

Patch hermes_cli/models.py around line 2191 — change the fallback return from accepted: False to accepted: True (with a warning). This restores the pre-aeb53131f behavior.

Environment

  • Hermes version: latest (main branch)
  • Provider: MiniMax (built-in, provider slug: minimax)
  • Endpoint: https://api.minimax.io/anthropic/v1/messages (Anthropic-compatible)
  • API key: MINIMAX_API_KEY set in ~/.hermes/.env

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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