diff --git a/main/manager-api/src/main/java/xiaozhi/modules/llm/service/impl/OpenAIStyleLLMServiceImpl.java b/main/manager-api/src/main/java/xiaozhi/modules/llm/service/impl/OpenAIStyleLLMServiceImpl.java index 04f9bf0ce..b89ae982f 100644 --- a/main/manager-api/src/main/java/xiaozhi/modules/llm/service/impl/OpenAIStyleLLMServiceImpl.java +++ b/main/manager-api/src/main/java/xiaozhi/modules/llm/service/impl/OpenAIStyleLLMServiceImpl.java @@ -36,6 +36,7 @@ public class OpenAIStyleLLMServiceImpl implements LLMService { static { THINKING_DISABLED_DOMAINS.put("aliyuncs.com", Map.of("enable_thinking", false)); Map thinkingDisabled = Map.of("thinking", Map.of("type", "disabled")); + THINKING_DISABLED_DOMAINS.put("deepseek.com", thinkingDisabled); THINKING_DISABLED_DOMAINS.put("bigmodel.cn", thinkingDisabled); THINKING_DISABLED_DOMAINS.put("moonshot.cn", thinkingDisabled); THINKING_DISABLED_DOMAINS.put("volces.com", thinkingDisabled); diff --git a/main/manager-api/src/main/resources/db/changelog/202608061030.sql b/main/manager-api/src/main/resources/db/changelog/202608061030.sql new file mode 100644 index 000000000..28854a6a3 --- /dev/null +++ b/main/manager-api/src/main/resources/db/changelog/202608061030.sql @@ -0,0 +1,4 @@ +UPDATE `ai_model_config` +SET `config_json` = JSON_SET(`config_json`, '$.model_name', 'deepseek-v4-flash') +WHERE `id` = 'LLM_DeepSeekLLM' + AND JSON_EXTRACT(`config_json`, '$.model_name') = 'deepseek-chat'; diff --git a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml index 641d3de55..90a5148dc 100644 --- a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml @@ -718,3 +718,10 @@ databaseChangeLog: - sqlFile: encoding: utf8 path: classpath:db/changelog/202607290930.sql + - changeSet: + id: 202608061000 + author: cgd + changes: + - sqlFile: + encoding: utf8 + path: classpath:db/changelog/202608061030.sql diff --git a/main/xiaozhi-server/config.yaml b/main/xiaozhi-server/config.yaml index 444798aa5..c35cc523e 100644 --- a/main/xiaozhi-server/config.yaml +++ b/main/xiaozhi-server/config.yaml @@ -649,7 +649,7 @@ LLM: # 定义LLM API类型 type: openai # 可在这里找到你的api key https://platform.deepseek.com/ - model_name: deepseek-chat + model_name: deepseek-v4-flash url: https://api.deepseek.com api_key: 你的deepseek web key ChatGLMLLM: diff --git a/main/xiaozhi-server/core/providers/llm/openai/openai.py b/main/xiaozhi-server/core/providers/llm/openai/openai.py index ed0b5e978..e67c8333f 100644 --- a/main/xiaozhi-server/core/providers/llm/openai/openai.py +++ b/main/xiaozhi-server/core/providers/llm/openai/openai.py @@ -12,6 +12,7 @@ logger = setup_logging() # 需要禁用思考模式的平台域名及其对应参数(默认关闭思考模式) THINKING_DISABLED_DOMAINS = { "aliyuncs.com": {"enable_thinking": False}, + "deepseek.com": {"thinking": {"type": "disabled"}}, "bigmodel.cn": {"thinking": {"type": "disabled"}}, "moonshot.cn": {"thinking": {"type": "disabled"}}, "volces.com": {"thinking": {"type": "disabled"}},