feat: fix deepseek tool call bug

This commit is contained in:
mingmxren 2026-03-01 02:04:59 +08:00
parent 62842dd646
commit 59ca8ad3dd

View file

@ -285,6 +285,7 @@ func parseResponse(body []byte) (*LLMResponse, error) {
type openaiMessage struct {
Role string `json:"role"`
Content string `json:"content"`
ReasoningContent string `json:"reasoning_content,omitempty"`
ToolCalls []ToolCall `json:"tool_calls,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
}
@ -298,6 +299,7 @@ func stripSystemParts(messages []Message) []openaiMessage {
out[i] = openaiMessage{
Role: m.Role,
Content: m.Content,
ReasoningContent: m.ReasoningContent,
ToolCalls: m.ToolCalls,
ToolCallID: m.ToolCallID,
}