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

24 lines
951 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Fallback 机制"
type: concept
tags: [ai-agent, model, routing]
last_updated: 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。
## Related
- [[上下文压缩]] — OpenClaw 的 compaction 机制
- [[模型配置层级]] — Global Config、Agent Specific Config、环境变量的分层
- [[MiniMax-M2.7]] — 作者的默认模型200K context
- [[DeepSeek-Reasoner]] — 只有 16K context 的模型