mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
Xiaomi MiMo (and potentially other providers) support multimodal user messages but reject list-type tool message content with 400 'text is not set'. Previously this was handled reactively — the API call would fail, images would be stripped, and the request retried, losing visual info. Fix: add supports_vision_tool_messages field to ProviderProfile (default True). Xiaomi sets it to False. _tool_result_content_for_active_model now checks this field proactively and returns a text summary instead of list content, avoiding the round-trip failure entirely.
16 lines
550 B
Python
16 lines
550 B
Python
"""Xiaomi MiMo provider profile."""
|
|
|
|
from providers import register_provider
|
|
from providers.base import ProviderProfile
|
|
|
|
xiaomi = ProviderProfile(
|
|
name="xiaomi",
|
|
aliases=("mimo", "xiaomi-mimo"),
|
|
env_vars=("XIAOMI_API_KEY",),
|
|
base_url="https://api.xiaomimimo.com/v1",
|
|
supports_health_check=False, # /v1/models returns 401 even with valid key
|
|
supports_vision=True, # mimo-v2-omni is vision-capable
|
|
supports_vision_tool_messages=False, # rejects list-type tool content (400 "text is not set")
|
|
)
|
|
|
|
register_provider(xiaomi)
|