From 0ff2c00618e8be3ba6323c208cc9e4244ebee710 Mon Sep 17 00:00:00 2001 From: Linghong Date: Mon, 7 Sep 2026 07:30:57 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E6=98=8E=E6=80=9D=E8=80=83=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E6=A8=A1=E5=9E=8B=E4=B8=8D=E6=94=AF=E6=8C=81tool=5Fch?= =?UTF-8?q?oice=3Drequired?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - planning_session_v2 的 Required 设置处补注释:DeepSeek 等思考模式模型会以 400 拒绝该取值,接入新模型需先验证端点支持 - 策划会话 Runtime V2 文档重试规则节补充该限制及其与瞬态重试的边界 --- .../src/agent/runtime_protocol/planning_session_v2.rs | 3 +++ ...【技术方案】策划会话RuntimeV2接入与旧链路退役-2026-09-03.md | 1 + 2 files changed, 4 insertions(+) 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 499e1bd5f..439963e2d 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,6 +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。 .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 5dd7cf9fd..86c80d1fb 100644 --- a/docs/technical/【技术方案】策划会话RuntimeV2接入与旧链路退役-2026-09-03.md +++ b/docs/technical/【技术方案】策划会话RuntimeV2接入与旧链路退役-2026-09-03.md @@ -386,6 +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` 可用,再接入策划会话。 ## 5. Provider、上下文与未来 MCP/Skill 兼容性