Skip to content

[Feature Request] Auto-failover on invalid model selection #96150

Description

@jimkuo2026-bit

Problem

When a user manually selects a model that is invalid (e.g., the API key is missing, the model name doesn't exist, or credentials are invalid), Hermes crashes/becomes unresponsive instead of automatically triggering the failover mechanism to fall back to the next available provider in fallback_providers.

Expected Behavior

When a manually selected model fails due to an authentication error or invalid model name, Hermes should automatically attempt to use the next provider in the fallback_providers chain, similar to how it handles transient API errors (429, 503, connection timeout).

Current Workaround

User must manually restart the gateway with /restart to recover.

Environment

  • Hermes Agent version: 0.17.0
  • Platform: Linux
  • Gateway: Telegram

Config (relevant)

model:
default: MiniMax-M2.7
provider: minimax

providers:
minimax: { api_key: ..., base_url: https://api.minimaxi.com/v1, default: MiniMax-M2.7 }
deepseek: { api_key: ..., base_url: https://api.deepseek.com/v1, default: deepseek-v4-pro }
kimi: { api_key: ..., base_url: https://api.moonshot.cn/v1, default: kimi-k2.6 }
nvidia: { api_key: ..., base_url: https://integrate.api.nvidia.com/v1, default: nvidia/llama-3.1-nemotron-70b-instruct }
anthropic: { api_key: ..., base_url: https://api.anthropic.com, default: claude-sonnet-4-6 }

fallback_providers: [deepseek, kimi, nvidia, anthropic]

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions