1 Commits
v0.8.1 ... main

Author SHA1 Message Date
ef64e7d844 fix: 修正 DeepSeek 默认 base_url 去除多余 /v1 后缀 2026-09-21 17:28:50 +08:00
6 changed files with 14 additions and 13 deletions

View File

@@ -7,7 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
暂无。
### 🐞 错误修复
- 修复 DeepSeek 默认 `base_url` 误带 `/v1` 后缀的问题:该后缀会使用于校验凭据的 `GET /user/balance` 被拼成 `/v1/user/balance` 而失败,并在生成前被笼统报为 `LLM provider 'deepseek' is not available`。默认地址改为 `https://api.deepseek.com`,与官方 API 路径一致;已有配置若显式写入过 `.../v1`,需用 `quicommit config set-llm deepseek` 重新选择或手动修改
### 📚 文档
- README中/英文DeepSeek 配置示例的 `--base-url` 同步去掉 `/v1`
## [0.8.1] - 2026-08-31

View File

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

View File

@@ -256,7 +256,7 @@ quicommit config set-llm kimi --base-url https://api.moonshot.cn/v1 --model moon
# Configure DeepSeek
quicommit config set-llm deepseek
quicommit config set-api-key YOUR_API_KEY
quicommit config set-llm deepseek --base-url https://api.deepseek.com/v1 --model deepseek-chat
quicommit config set-llm deepseek --base-url https://api.deepseek.com --model deepseek-chat
# Configure OpenRouter
quicommit config set-llm openrouter

View File

@@ -250,7 +250,7 @@ quicommit config set-llm kimi --base-url https://api.moonshot.cn/v1 --model moon
# 配置DeepSeek
quicommit config set-llm deepseek
quicommit config set-api-key YOUR_API_KEY
quicommit config set-llm deepseek --base-url https://api.deepseek.com/v1 --model deepseek-chat
quicommit config set-llm deepseek --base-url https://api.deepseek.com --model deepseek-chat
# 配置OpenRouter
quicommit config set-llm openrouter

View File

@@ -726,7 +726,7 @@ mod tests {
let backend = Backend::DeepSeek(
deepseek::Client::builder()
.api_key("sk-test")
.base_url("https://api.deepseek.com/v1")
.base_url("https://api.deepseek.com")
.http_client(recorder.clone())
.build()
.expect("build deepseek client with mock backend"),
@@ -843,7 +843,7 @@ mod tests {
let captured = recorder.requests();
assert_eq!(
captured[0].uri,
"https://api.deepseek.com/v1/chat/completions"
"https://api.deepseek.com/chat/completions"
);
let body: serde_json::Value = serde_json::from_slice(&captured[0].body).unwrap();
assert_eq!(body["model"], "deepseek-v4-flash");
@@ -911,7 +911,7 @@ mod tests {
let backend = Backend::DeepSeek(
deepseek::Client::builder()
.api_key("sk-test")
.base_url("https://api.deepseek.com/v1")
.base_url("https://api.deepseek.com")
.http_client(MockStreamingClient {
sse_bytes: sse.to_string().into(),
})
@@ -1438,7 +1438,7 @@ mod tests {
let backend = Backend::DeepSeek(
deepseek::Client::builder()
.api_key(&key)
.base_url("https://api.deepseek.com/v1")
.base_url("https://api.deepseek.com")
.http_client(smoke_http())
.build()
.expect("build deepseek client"),

View File

@@ -248,7 +248,7 @@ pub fn get_default_base_url(provider: &str) -> &'static str {
"openai" => "https://api.openai.com/v1",
"anthropic" => "https://api.anthropic.com/v1",
"kimi" => "https://api.moonshot.cn/v1",
"deepseek" => "https://api.deepseek.com/v1",
"deepseek" => "https://api.deepseek.com",
"openrouter" => "https://openrouter.ai/api/v1",
"ollama" => "http://localhost:11434",
_ => "",
@@ -294,10 +294,7 @@ mod tests {
"https://api.anthropic.com/v1"
);
assert_eq!(get_default_base_url("kimi"), "https://api.moonshot.cn/v1");
assert_eq!(
get_default_base_url("deepseek"),
"https://api.deepseek.com/v1"
);
assert_eq!(get_default_base_url("deepseek"), "https://api.deepseek.com");
assert_eq!(
get_default_base_url("openrouter"),
"https://openrouter.ai/api/v1"