[Phase 4] 降级/回退链 — 模型与 Agent 自动故障转移 #8

Closed
opened 2026-05-05 01:01:23 +08:00 by admin · 0 comments
Owner

背景

当前系统主模型故障或 Agent 执行失败时没有自动降级机制,用户直接看到错误。

需求

  1. 模型级降级:AgentLLMConfig 增加 fallback_llm 字段,主模型挂了自动切换到备用模型
  2. Agent 级降级:Agent 配置增加 fallback_agent_id,执行失败自动调用备选 Agent
  3. 降级事件记录到日志,便于事后分析

涉及模块

  • backend/app/agent_runtime/core.py — LLM 调用层
  • backend/app/models/agent.py — 增加 fallback 字段
  • backend/app/agent_runtime/schemas.py — AgentLLMConfig

优先级

高 — Phase 4 核心需求

## 背景 当前系统主模型故障或 Agent 执行失败时没有自动降级机制,用户直接看到错误。 ## 需求 1. **模型级降级**:AgentLLMConfig 增加 `fallback_llm` 字段,主模型挂了自动切换到备用模型 2. **Agent 级降级**:Agent 配置增加 `fallback_agent_id`,执行失败自动调用备选 Agent 3. 降级事件记录到日志,便于事后分析 ## 涉及模块 - backend/app/agent_runtime/core.py — LLM 调用层 - backend/app/models/agent.py — 增加 fallback 字段 - backend/app/agent_runtime/schemas.py — AgentLLMConfig ## 优先级 高 — Phase 4 核心需求
admin self-assigned this 2026-05-05 01:01:23 +08:00
admin closed this issue 2026-05-10 14:25:48 +08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/aiagent#8