Files
9router/open-sse/providers/registry/deepseek.js
T
decoluaandClaude Fable 5 6eaa9f8369 feat(usage): add Kimi and DeepSeek usage handlers
Wire /v1/usages for Kimi (OAuth + API key) and balance API for DeepSeek,
flag both providers with usage/usageApikey, and normalize their quotas
in the dashboard ProviderLimits parser.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 18:09:35 +07:00

56 lines
1.6 KiB
JavaScript

import { CLAUDE_API_HEADERS } from "../shared.js";
export default {
id: "deepseek",
priority: 110,
alias: "deepseek",
aliases: [
"ds",
],
uiAlias: "ds",
display: {
name: "DeepSeek",
icon: "bolt",
color: "#4D6BFE",
textIcon: "DS",
website: "https://deepseek.com",
notice: {
apiKeyUrl: "https://platform.deepseek.com/api_keys",
},
},
category: "apikey",
transport: {
baseUrl: "https://api.deepseek.com/chat/completions",
validateUrl: "https://api.deepseek.com/models",
reasoningInject: {
scope: "all",
},
},
// 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" },
},
],
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" },
{ id: "deepseek-v4-flash", name: "DeepSeek V4 Flash" },
{ id: "deepseek-chat", name: "DeepSeek V3.2 Chat" },
{ id: "deepseek-reasoner", name: "DeepSeek V3.2 Reasoner" },
],
features: {
usage: true,
usageApikey: true,
},
};