From 90ce3f3cbcebd6d8102f51509e8a29e7cdb8d50a Mon Sep 17 00:00:00 2001 From: Ame Date: Fri, 24 Apr 2026 16:50:58 +0800 Subject: [PATCH] feat(ai-providers): add DeepSeek preset (V4 Pro default) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DeepSeek V4 launched early 2026 — 81% SWE-bench Verified, 1M context, hybrid reasoning, and cache_read priced at $0.03/M (90% off fresh input, useful when the system prompt is large and repeated). Routed via DeepSeek's first-class Anthropic-compat endpoint at api.deepseek.com/anthropic, matching the GLM/Kimi/MiniMax shape. Unlike Kimi (where Anthropic-compat is a secondary path behind OpenAI Chat Completions), DeepSeek publishes both endpoints as first-class, so agent-sdk is a blessed route — no cosplay-caveat comment needed. Ships with deepseek-v4-pro as default and deepseek-v4-flash as the cheaper second option. Deprecated aliases (deepseek-chat, deepseek- reasoner) omitted; users who still rely on those can reach them via the Custom preset. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/ai-providers/preset-catalog.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/ai-providers/preset-catalog.ts b/src/ai-providers/preset-catalog.ts index d4b867dc..d1a2d299 100644 --- a/src/ai-providers/preset-catalog.ts +++ b/src/ai-providers/preset-catalog.ts @@ -228,6 +228,32 @@ export const KIMI: PresetDef = { writeOnlyFields: ['apiKey'], } +// ==================== Third-party: DeepSeek ==================== + +export const DEEPSEEK: PresetDef = { + id: 'deepseek', + label: 'DeepSeek', + description: 'DeepSeek models via Claude Agent SDK (Anthropic-compatible)', + category: 'third-party', + defaultName: 'DeepSeek', + hint: 'Get your API key at platform.deepseek.com. Single platform — no regional split. Cached prompt input is heavily discounted ($0.03/M).', + zodSchema: z.object({ + backend: z.literal('agent-sdk'), + loginMethod: z.literal('api-key'), + baseUrl: z.string().default('https://api.deepseek.com/anthropic').describe('API endpoint'), + model: z.string().default('deepseek-v4-pro').describe('Model'), + apiKey: z.string().min(1).describe('DeepSeek API key'), + }), + endpoints: [ + { id: 'https://api.deepseek.com/anthropic', label: 'DeepSeek (api.deepseek.com)' }, + ], + models: [ + { id: 'deepseek-v4-pro', label: 'DeepSeek V4 Pro (flagship)' }, + { id: 'deepseek-v4-flash', label: 'DeepSeek V4 Flash (cheap/fast)' }, + ], + writeOnlyFields: ['apiKey'], +} + // ==================== Custom ==================== export const CUSTOM: PresetDef = { @@ -258,5 +284,6 @@ export const PRESET_CATALOG: PresetDef[] = [ MINIMAX, GLM, KIMI, + DEEPSEEK, CUSTOM, ]