自定义 API 选 DeepSeek 模型时,裸模型名 deepseek-v4-flash 报 400 Invalid model name,需手动加 [1m] 后缀
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 401
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: 用户6353
**客户端版本**: 0.1.27
---
## 现象
在 Cindy 中使用自定义 API(Base URL: `https://api.deepseek.com/anthropic`,即 DeepSeek 官方 Anthropic 兼容端点)选择 DeepSeek 模型,模型名填官方标准名 `deepseek-v4-flash` 时,请求被网关以 400 拒绝:
```
API Error: 400 400: {'error': 'anthropic_messages: Invalid model name passed in model=deepseek-v4-flash. Call /v1/models to view available models for your key.'}
```
## 复现步骤
1. 在 Cindy 添加自定义 API,Base URL 填 `https://api.deepseek.com/anthropic`,填入 DeepSeek key
2. 模型名填 `deepseek-v4-flash`
3. 发起对话 → 收到上述 400 错误
4. 把模型名改成 `deepseek-v4-flash[1m]` 后恢复正常
## 期望行为
1. 网关应接受 DeepSeek 官方标准模型名 `deepseek-v4-flash`。DeepSeek 官方端点对模型名是宽容的(官方文档明确:未识别的模型名会自动映射到 flash),这个 400 是网关侧模型名清单校验导致的拦截。
2. 若网关确实要求带 `[1m]` 后缀的 id,报错应明确提示"请使用 `deepseek-v4-flash[1m]`",而不是返回误导性的 `Call /v1/models to view available models for your key`(该提示对普通用户不友好,且 DeepSeek 官方端点并不返回此文案)。
3. 使用自定义 API 时应支持官方原始模型名,而不应强制透传网关内部的 `[1m]` 约定。
## 环境
- Cindy 客户端
- macOS
- DeepSeek 官方 Anthropic 兼容端点
---
**版本区域**: CN
**OS**: darwin x64 (23.6.0)
**界面语言**: zh-CN
Contributor guide
Research direction
No files or tests are named. Start by reproducing the request with the custom DeepSeek Anthropic endpoint and trace how Cindy passes the model name; determine whether the behavior is client-side or gateway-side. Done means the bare official model name works, or the user receives a clear message explaining the required [1m] form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100