Files
nexus/wiki/concepts/Fallback-机制.md
2026-04-18 00:18:08 +08:00

951 B
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
Fallback 机制 concept
ai-agent
model
routing
2026-04-18

Definition

当默认模型不可用或出现问题时AI Agent 系统自动切换到备选模型的机制。

Trigger Conditions

  1. 显式的 API 服务不可用503/502/429/Connection Timeout
  2. 隐性的 Token 长度溢出预判:估计 Token 接近模型上限
  3. 配置文件的"优先级"覆盖Agent/Channel 特定配置覆盖全局配置
  4. 节点选择算法:负载均衡/随机分发可能选中备选模型

Problem

Fallback 机制可能切到一个比原模型更小的模型(如 16K vs 200K导致立即 overflow。