diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_protocol/planning_session_v2.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_protocol/planning_session_v2.rs index 439963e2d..cb8143388 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_protocol/planning_session_v2.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_protocol/planning_session_v2.rs @@ -817,9 +817,9 @@ fn build_provider_request_v2( .with_max_output_tokens(16_384) .with_request_timeout_ms(llm.request_timeout_ms) .with_function_tools(planning_v2_function_tools()) - // 注意:思考模式模型(如 DeepSeek)不支持 tool_choice=required,会直接以 - // 400 “Thinking mode does not support this tool_choice” 拒绝;该 4xx 属硬错误, - // 不进入瞬态重试。接入新模型时必须先确认端点接受 required。 + // 注意:部分模型或端点可能不支持 tool_choice=required(例如思考模式下的 + // DeepSeek 会以 400 “Thinking mode does not support this tool_choice” 拒绝); + // 该 4xx 属硬错误,不进入瞬态重试。接入新模型时必须先确认端点接受 required。 .with_tool_choice(platform_llm::LlmToolChoice::Required); apply_game_creator_llm_reasoning_effort(request, llm) } diff --git a/docs/technical/【技术方案】策划会话RuntimeV2接入与旧链路退役-2026-09-03.md b/docs/technical/【技术方案】策划会话RuntimeV2接入与旧链路退役-2026-09-03.md index 86c80d1fb..24d9ce051 100644 --- a/docs/technical/【技术方案】策划会话RuntimeV2接入与旧链路退役-2026-09-03.md +++ b/docs/technical/【技术方案】策划会话RuntimeV2接入与旧链路退役-2026-09-03.md @@ -386,7 +386,7 @@ questionCount=8,本次返回 question - 用户修改不受 `questionLimit` 限制,但修改回合仍不能再次向用户展示 question;若 Provider 返回 question,按一次内部出稿重试处理。 - 达到内部输出重试上限后,保留当前会话和错误摘要,允许用户再次提交或恢复,不伪造 GDD。 - 瞬态 Provider 故障不直接判死:timeout、connectivity、transport、空响应、反序列化失败、流式中途断连和上游 408/429/5xx 统一按主 Agent Runtime 同款分类判定为瞬态,会话层沿用该 Agent 的 `maxRetries` / `retryBackoffMs` 预算做指数退避自动重试本回合;重试不增加 `questionCount`、不产生 GDD 版本,debug `attempt-N` 随每次物理尝试递增。耗尽后才投影 `provider_failed`,错误摘要附带已重试次数;上游 4xx 等硬错误不进入该重试,直接 `provider_failed`。 -- `tool_choice=required` 依赖端点支持:思考模式模型(如 DeepSeek)不支持该取值,会以 400 “Thinking mode does not support this tool_choice” 拒绝;这类 4xx 硬错误不进入瞬态重试,会话直接 `provider_failed`。接入或切换模型时必须先在目标端点验证 `required` 可用,再接入策划会话。 +- `tool_choice=required` 依赖端点支持:部分模型或端点可能不接受该取值(例如思考模式下的 DeepSeek 会以 400 “Thinking mode does not support this tool_choice” 拒绝);这类 4xx 硬错误不进入瞬态重试,会话直接 `provider_failed`。接入或切换模型时必须先在目标端点验证 `required` 可用,再接入策划会话。 ## 5. Provider、上下文与未来 MCP/Skill 兼容性