软化tool_choice兼容性表述为可能不支持
Project CI / Repository checks (pull_request) Failing after 44s
Project CI / Frontend tests (pull_request) Successful in 3m9s
Project CI / Backend tests (pull_request) Successful in 7m23s
Project CI / Native shell tests (pull_request) Successful in 21m20s

- 代码注释与策划会话文档改为“部分模型或端点可能不支持”,DeepSeek 仅作示例
This commit is contained in:
2026-09-07 07:38:05 +00:00
parent b5d214cef8
commit 85de37710b
2 changed files with 4 additions and 4 deletions
@@ -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)
}
@@ -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 兼容性