Skip to content

[Bug] minimax-cn provider not shown in /model list despite MINIMAX_CN_API_KEY being set #6620

@Mirko214

Description

@Mirko214

Bug Description

When running /model in Telegram or CLI, the minimax-cn provider is not listed even though MINIMAX_CN_API_KEY is correctly set in .env.

Environment

  • Hermes version: v2026.4.8 (hermes-agent at commit 268ee6b)
  • Config version: 13
  • .env contains: MINIMAX_CN_API_KEY=

Root Cause

The /model provider list uses `list_authenticated_providers()` in `hermes_cli/model_switch.py`. This function checks credentials by looking up the `env` field from the remote models.dev registry data (via `fetch_models_dev()`).

The models.dev registry returns `minimax-cn` with `env: ["MINIMAX_API_KEY"]`, but the actual provider implementation in `hermes_cli/auth.py` correctly uses `api_key_env_vars=("MINIMAX_CN_API_KEY",)` for minimax-cn.

This mismatch means:

  • `auth.py` correctly resolves minimax-cn credentials using MINIMAX_CN_API_KEY (actual API calls work)
  • `list_authenticated_providers()` fails to detect the key because it checks the wrong env var

Verification

```python
from agent.models_dev import fetch_models_dev
data = fetch_models_dev()
data["minimax-cn"]["env"] # Returns [MINIMAX_API_KEY] — WRONG

from hermes_cli.auth import get_provider_auth
get_provider_auth("minimax-cn") # Correctly uses MINIMAX_CN_API_KEY
```

Expected Behavior

The /model command should show minimax-cn in the provider list when MINIMAX_CN_API_KEY is set, just like minimax appears when MINIMAX_API_KEY is set.

Possible Fix

The models.dev registry data for minimax-cn has an incorrect env field. Either:

  1. Fix the data at the source (models.dev registry)
  2. Or add a hardcoded override in Hermes for the minimax-cn env var mapping

The correct env var for minimax-cn is MINIMAX_CN_API_KEY, as confirmed by the auth.py implementation.

Additional Notes

GitHub Copilot shows up in /model because it correctly checks GITHUB_TOKEN. The minimax-cn bug is analogous but with the wrong env var name in the remote data.

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