fix(llm): 修复 Kimi API temperature 参数配置

This commit is contained in:
2026-06-01 17:48:42 +08:00
parent 7636d0b5a6
commit 1dc3622e6e
4 changed files with 33 additions and 8 deletions

View File

@@ -9,6 +9,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
暂无。 暂无。
## [0.3.1] - 2026-06-01
### ✨ 新功能
- 按文件重要性对暂存差异排序,优先处理核心变更
- DeepSeek 新增 reasoning 推理模式支持
- LLM 统一思考模式配置,支持显式启用/禁用思考状态
- 新增 `thinking.rs` 思考状态管理模块
### 🐞 错误修复
- 修复 Kimi 返回信息的读取错误
- 修复 DeepSeek 和 Kimi 流式响应的解析问题
### 📚 文档
- 新增 ROADMAP.md 项目路线图文档
### 🔧 其他变更
- LLM 模块大规模重构所有提供商Anthropic、DeepSeek、Kimi、Ollama、OpenAI、OpenRouter适配流式响应处理
- 代码格式化并优化导入顺序
- 清理大量未使用的变量、方法及结构体警告
- 清理构建输出日志文件
- 重新编号 LLM 系统提示规则
- i18n 多语言消息格式修复
- 各命令模块commit、tag、changelog、config、profile、init持续优化
## [0.1.11] - 2026-03-23 ## [0.1.11] - 2026-03-23
### ✨ 新功能 ### ✨ 新功能

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "quicommit" name = "quicommit"
version = "0.3.0" version = "0.3.1"
edition = "2024" edition = "2024"
authors = ["Sidney Zhang <zly@lyzhang.me>"] authors = ["Sidney Zhang <zly@lyzhang.me>"]
description = "A powerful Git assistant tool with AI-powered commit/tag/changelog generation(alpha version)" description = "A powerful Git assistant tool with AI-powered commit/tag/changelog generation(alpha version)"

View File

@@ -55,10 +55,10 @@
扩展 LLM 提供商和模型覆盖范围,满足更多场景和偏好。 扩展 LLM 提供商和模型覆盖范围,满足更多场景和偏好。
- [ ] **新增 DeepSeek 最新模型** - [x] **新增 DeepSeek 最新模型**
- 支持 `deepseek-chat`DeepSeek-V3 - 支持 `deepseek-chat`DeepSeek-V3
- 支持 `deepseek-reasoner`DeepSeek-R1 - 支持 `deepseek-reasoner`DeepSeek-R1
- 支持 `deepseek-v4`(待官方发布后跟进) - 支持 `deepseek-v4`
- [ ] **新增国内模型提供商** - [ ] **新增国内模型提供商**
- 通义千问 (Qwen) — 阿里云 DashScope API - 通义千问 (Qwen) — 阿里云 DashScope API
@@ -88,7 +88,7 @@
提升 AI 生成提交信息、标签说明和变更日志时的用户体验。 提升 AI 生成提交信息、标签说明和变更日志时的用户体验。
- [ ] **流式输出与实时反馈** - [x] **流式输出与实时反馈**
- 支持 SSEServer-Sent Events流式生成 - 支持 SSEServer-Sent Events流式生成
- 终端打字机效果实时显示生成内容 - 终端打字机效果实时显示生成内容
- 流式生成过程中支持 `Ctrl+C` 中断 - 流式生成过程中支持 `Ctrl+C` 中断

View File

@@ -281,12 +281,13 @@ impl KimiClient {
}, },
}); });
// 对于 kimi-k2.6 等支持思考模式的模型,使用默认 temperature 即可 // Kimi API temperature 要求:
// 思考模式下不显式指定 temperature // - 思考模式: temperature 必须为 1.0
// - 非思考模式: temperature 必须为 0.6
let temperature = if self.thinking_enabled { let temperature = if self.thinking_enabled {
None Some(1.0)
} else { } else {
Some(self.temperature) Some(0.6)
}; };
let request = ChatCompletionRequest { let request = ChatCompletionRequest {