v1.2 真实模型接入 + Thinking 死循环修复

- 新增 OpenAIProvider / ClaudeProvider,接入 Deepseek 真实 API
- 修复 Deepseek thinking 模式 reasoning_content 回传问题
- 修复 Thinking 阶段过渡指令每轮重复插入导致的死循环
- 新增 maxTurns 保护、dumpMessages/dumpTools 调试输出
This commit is contained in:
zhuyongxin
2026-05-14 20:35:44 +08:00
parent f75d0c49ae
commit daa89531f5
9 changed files with 491 additions and 47 deletions
+3
View File
@@ -16,6 +16,9 @@ type Message struct {
Role Role `json:"role"`
Content string `json:"content"` // 存放纯文本内容
// ReasoningContent Deepseek thinking 模式的内部推理链,回传时必须保留
ReasoningContent string `json:"reasoning_content,omitempty"`
// 如果模型决定调用工具,此字段将被填充 (支持并行调用多个工具)
ToolCalls []ToolCall `json:"tool_calls,omitempty"`