2026-06-20 10:09:50 +07:00
|
|
|
import { CLAUDE_API_HEADERS } from "../shared.js";
|
|
|
|
|
|
2026-06-13 21:08:37 +07:00
|
|
|
export default {
|
2026-06-14 14:32:59 +07:00
|
|
|
id: "deepseek",
|
2026-06-14 18:49:38 +07:00
|
|
|
priority: 110,
|
2026-06-14 14:32:59 +07:00
|
|
|
alias: "deepseek",
|
|
|
|
|
aliases: [
|
|
|
|
|
"ds",
|
|
|
|
|
],
|
|
|
|
|
uiAlias: "ds",
|
2026-06-14 13:15:48 +07:00
|
|
|
display: {
|
2026-06-14 14:32:59 +07:00
|
|
|
name: "DeepSeek",
|
|
|
|
|
icon: "bolt",
|
|
|
|
|
color: "#4D6BFE",
|
|
|
|
|
textIcon: "DS",
|
|
|
|
|
website: "https://deepseek.com",
|
|
|
|
|
notice: {
|
|
|
|
|
apiKeyUrl: "https://platform.deepseek.com/api_keys",
|
|
|
|
|
},
|
2026-06-14 13:15:48 +07:00
|
|
|
},
|
|
|
|
|
category: "apikey",
|
2026-06-14 14:32:59 +07:00
|
|
|
transport: {
|
|
|
|
|
baseUrl: "https://api.deepseek.com/chat/completions",
|
|
|
|
|
validateUrl: "https://api.deepseek.com/models",
|
|
|
|
|
reasoningInject: {
|
|
|
|
|
scope: "all",
|
|
|
|
|
},
|
2026-09-10 22:26:15 +07:00
|
|
|
quirks: {
|
|
|
|
|
// DeepSeek's Anthropic-compatible endpoint
|
|
|
|
|
// (https://api.deepseek.com/anthropic/v1/messages) accepts ONLY the
|
|
|
|
|
// built-in web_search_* tools and rejects client-defined `custom` tools
|
|
|
|
|
// (MCP / Read / Bash / etc.) with HTTP 400
|
|
|
|
|
// "tools[0]: unknown variant `custom`, expected
|
|
|
|
|
// `web_search_20250305` or `web_search_20260209`".
|
|
|
|
|
//
|
|
|
|
|
// Declaring this whitelist makes prepareClaudeRequest() forward only
|
|
|
|
|
// web_search_* tools and strip everything else before sending, so MCP /
|
|
|
|
|
// function tools are dropped instead of failing the whole request.
|
|
|
|
|
// DeepSeek's OpenAI-compatible transport is unaffected (targetFormat
|
|
|
|
|
// there is "openai", not "claude", so prepareClaudeRequest is not run).
|
|
|
|
|
claudeSupportedToolTypes: ["web_search_20250305", "web_search_20260209"],
|
|
|
|
|
},
|
2026-06-13 21:08:37 +07:00
|
|
|
},
|
2026-06-20 10:09:50 +07:00
|
|
|
// Multi-endpoint: pick the transport matching client sourceFormat to skip translation.
|
|
|
|
|
transports: [
|
|
|
|
|
{
|
|
|
|
|
format: "openai",
|
|
|
|
|
baseUrl: "https://api.deepseek.com/chat/completions",
|
|
|
|
|
auth: { combined: true, header: "Authorization", scheme: "bearer" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
format: "claude",
|
|
|
|
|
baseUrl: "https://api.deepseek.com/anthropic/v1/messages",
|
|
|
|
|
headers: { ...CLAUDE_API_HEADERS },
|
|
|
|
|
auth: { combined: true, header: "x-api-key", scheme: "raw" },
|
|
|
|
|
},
|
|
|
|
|
],
|
2026-06-14 14:32:59 +07:00
|
|
|
models: [
|
|
|
|
|
{ id: "deepseek-v4-pro", name: "DeepSeek V4 Pro" },
|
|
|
|
|
{ id: "deepseek-v4-pro-max", name: "DeepSeek V4 Pro Max", upstreamModelId: "deepseek-v4-pro" },
|
|
|
|
|
{ id: "deepseek-v4-pro-none", name: "DeepSeek V4 Pro No Thinking", upstreamModelId: "deepseek-v4-pro" },
|
2026-09-18 18:09:32 +07:00
|
|
|
{ id: "deepseek-v4.1-flash", name: "DeepSeek V4.1 Flash" },
|
2026-06-14 14:32:59 +07:00
|
|
|
{ id: "deepseek-v4-flash", name: "DeepSeek V4 Flash" },
|
2026-08-27 17:52:01 +07:00
|
|
|
{ id: "deepseek-v4-flash-vision-exp", name: "DeepSeek V4 Flash Vision (Exp)" },
|
2026-06-14 14:32:59 +07:00
|
|
|
{ id: "deepseek-chat", name: "DeepSeek V3.2 Chat" },
|
|
|
|
|
{ id: "deepseek-reasoner", name: "DeepSeek V3.2 Reasoner" },
|
|
|
|
|
],
|
2026-07-29 18:09:35 +07:00
|
|
|
features: {
|
|
|
|
|
usage: true,
|
|
|
|
|
usageApikey: true,
|
|
|
|
|
},
|
2026-06-13 21:08:37 +07:00
|
|
|
};
|