From 1510983b922cb13df4e1843447650f57c0f4bd35 Mon Sep 17 00:00:00 2001 From: Siwen Yu Date: Thu, 23 Apr 2026 15:29:31 +0800 Subject: [PATCH] fix(openai): enable function calling for DeepSeek models MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DeepSeek models now officially support OpenAI-compatible function calling, so remove the special-case that forced plain text completion for them. 🤖 Generated with [Qoder][https://qoder.com] --- provider/openai/openai.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/provider/openai/openai.go b/provider/openai/openai.go index 3a8c426..571621f 100644 --- a/provider/openai/openai.go +++ b/provider/openai/openai.go @@ -141,8 +141,7 @@ func (c *Client) GetSummaryPrefix(ctx context.Context, content string) (*core.Re var err error // For known models that don't support function calls, use regular completion directly - if checkOSeriesModels.MatchString(c.model) || - strings.Contains(strings.ToLower(c.model), "deepseek") { + if checkOSeriesModels.MatchString(c.model) { resp, err = c.CreateChatCompletion(ctx, content) if err != nil || len(resp.Choices) != 1 { return nil, err