hermes - ✅(Solved) Fix Add MiniMax as vision backend in auxiliary_client.py (_try_minimax) [1 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#11420Fetched 2026-04-18 06:01:12
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
commented ×1cross-referenced ×1referenced ×1

Root Cause

The MiniMax plan at \$50/mo advertises LLM + text + image + video + voice + music + search capabilities. While their chat-completions API models are text-only, MiniMax does offer multimodal endpoints (e.g. MiniMax-VL for vision) that could be wired up as a vision backend for vision_analyze in Hermes.

Fix Action

Fixed

PR fix notes

PR #11542: feat: Add MiniMax as vision backend

Description (problem / solution / changelog)

Add MiniMax as Vision Backend

Problem

When setting AUXILIARY_VISION_PROVIDER=minimax, the vision_analyze tool silently fails because _resolve_strict_vision_backend() has no MiniMax branch.

Solution

Add _try_minimax() function and wire it into _resolve_strict_vision_backend():

  1. New _try_minimax() function follows the same pattern as _try_openrouter()
  2. Uses MiniMax API key from MINIMAX_API_KEY env var
  3. Connects to MiniMax OpenAI-compatible endpoint
  4. Returns "MiniMax-VL" as the vision model

Changes

  • Added _try_minimax() function (19 lines)
  • Added minimax branch in _resolve_strict_vision_backend()

Usage

export AUXILIARY_VISION_PROVIDER=minimax
export MINIMAX_API_KEY=your_key_here

Then vision_analyze will use MiniMax as the backend.

Fixes #11420

Changed files

  • agent/auxiliary_client.py (modified, +19/-0)
  • hermes_state.py (modified, +61/-0)

Code Example

# From /v1/models API — text models have vision: false
MiniMax-Text-01"vision": false
MiniMax-M2.7"vision": false
MiniMax-M2.5"vision": false
MiniMax-M1"vision": false

---

def _resolve_strict_vision_backend(provider: str) -> Tuple[Optional[Any], Optional[str]]:
    provider = _normalize_vision_provider(provider)
    if provider == "openrouter":
        return _try_openrouter()
    if provider == "nous":
        return _try_nous(vision=True)
    if provider == "openai-codex":
        return _try_codex()
    if provider == "anthropic":
        return _try_anthropic()
    if provider == "custom":
        return _try_custom_endpoint()
    if provider == "minimax":
        return _try_minimax()   # <-- ADD THIS
    return None, None

---

def _try_minimax() -> Tuple[Optional[OpenAI], Optional[str]]:
    api_key = os.getenv("MINIMAX_API_KEY")
    if not api_key:
        return None, None
    # MiniMax uses OpenAI-compatible endpoint
    return OpenAI(api_key=api_key, base_url="https://api.minimax.io/v1"), "MiniMax-VL"
RAW_BUFFERClick to expand / collapse

Problem

When setting AUXILIARY_VISION_PROVIDER=minimax and AUXILIARY_VISION_MODEL=MiniMax-M2.7 in the environment, the vision_analyze tool silently fails because _resolve_strict_vision_backend() in agent/auxiliary_client.py has no MiniMax branch.

Current code path

_resolve_strict_vision_backend() only knows how to handle:

  • openrouter_try_openrouter()
  • nous_try_nous(vision=True)
  • openai-codex_try_codex()
  • anthropic_try_anthropic()
  • custom_try_custom_endpoint()

All other providers (including minimax) fall through to return None, None, so the vision client is never created.

Why this matters

The MiniMax plan at \$50/mo advertises LLM + text + image + video + voice + music + search capabilities. While their chat-completions API models are text-only, MiniMax does offer multimodal endpoints (e.g. MiniMax-VL for vision) that could be wired up as a vision backend for vision_analyze in Hermes.

Evidence

# From /v1/models API — text models have vision: false
MiniMax-Text-01"vision": false
MiniMax-M2.7"vision": false
MiniMax-M2.5"vision": false
MiniMax-M1      → "vision": false

This means the standard chat endpoint is text-only, but MiniMax has a separate vision-capable model endpoint that is not being used.

Proposed Solution

Add a _try_minimax() function and wire it into _resolve_strict_vision_backend():

def _resolve_strict_vision_backend(provider: str) -> Tuple[Optional[Any], Optional[str]]:
    provider = _normalize_vision_provider(provider)
    if provider == "openrouter":
        return _try_openrouter()
    if provider == "nous":
        return _try_nous(vision=True)
    if provider == "openai-codex":
        return _try_codex()
    if provider == "anthropic":
        return _try_anthropic()
    if provider == "custom":
        return _try_custom_endpoint()
    if provider == "minimax":
        return _try_minimax()   # <-- ADD THIS
    return None, None

And implement _try_minimax() following the same pattern as _try_openrouter():

def _try_minimax() -> Tuple[Optional[OpenAI], Optional[str]]:
    api_key = os.getenv("MINIMAX_API_KEY")
    if not api_key:
        return None, None
    # MiniMax uses OpenAI-compatible endpoint
    return OpenAI(api_key=api_key, base_url="https://api.minimax.io/v1"), "MiniMax-VL"

Note: The exact vision model name (e.g. MiniMax-VL, minimax-vl-01) and base URL should be verified against MiniMax's official API docs — this is a placeholder that needs confirmation.

Additional context

  • MiniMax API key is stored in the OpenClaw config at /root/.openclaw/openclaw.json (env.vars.MINIMAX_API_KEY)
  • The MINIMAX_API_KEY env var is already set in the Hermes environment
  • Current Hermes version: v0.9.0 (1af2e18d, 2026-04-13)
  • Related: _PROVIDER_VISION_MODELS only maps xiaomi → mimo-v2-omni today — MiniMax would follow the same pattern
  • There is NO issue with the existing MiniMax text provider — that works fine. This is ONLY about adding MiniMax as a vision backend.

Labels

enhancement, provider-integration, vision

extent analysis

TL;DR

To fix the silent failure of the vision_analyze tool when using MiniMax as the auxiliary vision provider, add a _try_minimax() function and integrate it into the _resolve_strict_vision_backend() method.

Guidance

  • Implement the proposed _try_minimax() function, following the pattern of existing provider functions like _try_openrouter(), to handle the MiniMax vision backend.
  • Integrate the _try_minimax() function into the _resolve_strict_vision_backend() method by adding a conditional check for the "minimax" provider.
  • Verify the exact vision model name and base URL for MiniMax against their official API documentation to ensure accuracy.
  • Confirm that the MINIMAX_API_KEY environment variable is set correctly in the Hermes environment.

Example

def _try_minimax() -> Tuple[Optional[OpenAI], Optional[str]]:
    api_key = os.getenv("MINIMAX_API_KEY")
    if not api_key:
        return None, None
    # MiniMax uses OpenAI-compatible endpoint
    return OpenAI(api_key=api_key, base_url="https://api.minimax.io/v1"), "MiniMax-VL"

Notes

The implementation of _try_minimax() and its integration into _resolve_strict_vision_backend() should be done with caution, ensuring that the MiniMax API key and endpoint are handled correctly to avoid any security or functionality issues.

Recommendation

Apply the proposed workaround by implementing the _try_minimax() function and integrating it into the _resolve_strict_vision_backend() method, as this will enable the use of MiniMax as a vision backend for the vision_analyze tool.

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