diff --git a/packages/types/src/__tests__/deepseek-v4-pro.test.ts b/packages/types/src/__tests__/deepseek-v4-pro.test.ts new file mode 100644 index 0000000000..4449bfd1f6 --- /dev/null +++ b/packages/types/src/__tests__/deepseek-v4-pro.test.ts @@ -0,0 +1,82 @@ +import { basetenModels, deepSeekModels, fireworksModels, opencodeGoModels } from "../providers/index.js" + +describe("DeepSeek V4 Pro 0813 provider catalogs", () => { + it.each([ + ["DeepSeek", deepSeekModels["deepseek-v4-pro"]], + ["OpenCode Go", opencodeGoModels["deepseek-v4-pro"]], + ])("labels the first-party API checkpoint through %s", (_provider, model) => { + expect(model).toBeDefined() + expect(model?.displayName).toBe("DeepSeek V4 Pro 0813") + expect(model?.contextWindow).toBeGreaterThanOrEqual(1_000_000) + }) + + it("uses peak first-party pricing and unchanged OpenCode Go pricing", () => { + expect(deepSeekModels["deepseek-v4-flash"]).toMatchObject({ + supportsImages: false, + outputPrice: 1.32, + cacheWritesPrice: 0.44, + cacheReadsPrice: 0.014, + }) + expect(deepSeekModels["deepseek-v4-pro"].supportsImages).toBe(false) + expect(deepSeekModels["deepseek-v4-pro"]).toMatchObject({ + outputPrice: 3.96, + cacheWritesPrice: 1.32, + cacheReadsPrice: 0.044, + }) + expect(opencodeGoModels["deepseek-v4-pro"]).toMatchObject({ + inputPrice: 0.435, + outputPrice: 0.87, + cacheReadsPrice: 0.003625, + }) + expect(opencodeGoModels["deepseek-v4-flash"]).toMatchObject({ + inputPrice: 0.14, + outputPrice: 0.28, + cacheReadsPrice: 0.0028, + }) + }) + + // Self-hosted providers retain separate IDs for the preview weights and 0813 checkpoint. + it.each([ + ["Fireworks AI", fireworksModels["accounts/fireworks/models/deepseek-v4-pro"]], + ["Baseten", basetenModels["deepseek-ai/DeepSeek-V4-Pro"]], + ])("does not apply the API checkpoint label to %s", (_provider, model) => { + expect(model).toBeDefined() + expect("displayName" in model && typeof model.displayName === "string" ? model.displayName : "").not.toContain( + "0813", + ) + expect(model?.contextWindow).toBeGreaterThanOrEqual(1_000_000) + }) + + it.each([ + [ + "Fireworks AI", + fireworksModels["accounts/fireworks/models/deepseek-v4-pro-0813"], + { inputPrice: 1.32, outputPrice: 3.96, cacheReadsPrice: 0.044 }, + ], + [ + "Baseten", + basetenModels["deepseek-ai/DeepSeek-V4-Pro-0813"], + { inputPrice: 1.32, outputPrice: 3.96, cacheReadsPrice: 0.132 }, + ], + ])("publishes the dated checkpoint and provider-specific pricing for %s", (_provider, model, pricing) => { + expect(model).toMatchObject({ + displayName: "DeepSeek V4 Pro 0813", + ...pricing, + }) + }) + + it("keeps preview pricing separate and omits unverified cache-write prices", () => { + expect(fireworksModels["accounts/fireworks/models/deepseek-v4-pro"]).toMatchObject({ + inputPrice: 1.74, + outputPrice: 3.48, + cacheReadsPrice: 0.145, + }) + expect(basetenModels["deepseek-ai/DeepSeek-V4-Pro"]).toMatchObject({ + inputPrice: 1.74, + outputPrice: 3.48, + cacheReadsPrice: 0.145, + }) + expect(basetenModels["deepseek-ai/DeepSeek-V4-Pro"]).not.toHaveProperty("cacheWritesPrice") + expect(basetenModels["deepseek-ai/DeepSeek-V4-Pro-0813"]).not.toHaveProperty("cacheWritesPrice") + }) +}) diff --git a/packages/types/src/providers/baseten.ts b/packages/types/src/providers/baseten.ts index 27b8cbff4a..2c1701ab0a 100644 --- a/packages/types/src/providers/baseten.ts +++ b/packages/types/src/providers/baseten.ts @@ -83,6 +83,32 @@ export const basetenModels = { description: "DeepSeek's hybrid reasoning model with efficient long context scaling with GPT-5 level performance", }, + "deepseek-ai/DeepSeek-V4-Pro": { + displayName: "DeepSeek V4 Pro", + maxTokens: 384_000, + contextWindow: 1_000_000, + supportsImages: false, + supportsPromptCache: true, + supportsMaxTokens: true, + inputPrice: 1.74, + outputPrice: 3.48, + cacheReadsPrice: 0.145, + description: + "DeepSeek V4 Pro is a 1.6T-parameter mixture-of-experts model with a 1M context window for advanced reasoning, coding, and agentic workloads.", + }, + "deepseek-ai/DeepSeek-V4-Pro-0813": { + displayName: "DeepSeek V4 Pro 0813", + maxTokens: 384_000, + contextWindow: 1_000_000, + supportsImages: false, + supportsPromptCache: true, + supportsMaxTokens: true, + inputPrice: 1.32, + outputPrice: 3.96, + cacheReadsPrice: 0.132, + description: + "DeepSeek V4 Pro 0813 is a 1.6T-parameter mixture-of-experts model with a 1M context window for advanced reasoning, coding, and agentic workloads.", + }, "openai/gpt-oss-120b": { maxTokens: 16_384, contextWindow: 128_072, diff --git a/packages/types/src/providers/deepseek.ts b/packages/types/src/providers/deepseek.ts index 9387d6a4ae..806a7e162c 100644 --- a/packages/types/src/providers/deepseek.ts +++ b/packages/types/src/providers/deepseek.ts @@ -12,32 +12,33 @@ export const deepSeekModels = { "deepseek-v4-flash": { maxTokens: 384_000, contextWindow: 1_000_000, - supportsImages: true, + supportsImages: false, supportsPromptCache: true, supportsReasoningEffort: ["disable", "low", "high", "max"], // Updated 2026-08-01 preserveReasoning: true, reasoningEffort: "high", inputPrice: 0, // the inputs are priced as cache read/write, so `inputPrice` should be 0 - // the peak/off-peak pricing policy has not been implemented yet - Updated 2026-08-01 - outputPrice: 0.28, // $0.28 per million tokens - Updated 2026-08-01 - cacheWritesPrice: 0.14, // $0.14 per million tokens (cache miss) - Updated 2026-08-01 - cacheReadsPrice: 0.0028, // $0.0028 per million tokens (cache hit) - Updated 2026-08-01 + // Static estimates use peak rates; off-peak rates are 50% lower. Effective 2026-08-16. + outputPrice: 1.32, + cacheWritesPrice: 0.44, + cacheReadsPrice: 0.014, description: `DeepSeek-V4-Flash is DeepSeek's fast, cost-efficient V4 model. It supports thinking and non-thinking modes, JSON output, tool calls, chat prefix completion (beta), and FIM completion (beta) in non-thinking mode.`, }, "deepseek-v4-pro": { + displayName: "DeepSeek V4 Pro 0813", maxTokens: 384_000, contextWindow: 1_000_000, - supportsImages: true, + supportsImages: false, supportsPromptCache: true, supportsReasoningEffort: ["disable", "high", "max"], // Updated 2026-08-01 preserveReasoning: true, reasoningEffort: "high", inputPrice: 0, // the inputs are priced as cache read/write, so `inputPrice` should be 0 - // the peak/off-peak pricing policy has not been implemented yet - Updated 2026-08-01 - outputPrice: 0.87, // $0.87 per million tokens - Updated 2026-08-01 - cacheWritesPrice: 0.435, // $0.435 per million tokens (cache miss) - Updated 2026-08-01 - cacheReadsPrice: 0.003625, // $0.003625 per million tokens (cache hit) - Updated 2026-08-01 - description: `DeepSeek-V4-Pro is DeepSeek's strongest V4 model for reasoning, coding, long-context, and agentic workloads. It supports thinking and non-thinking modes, JSON output, tool calls, chat prefix completion (beta), and FIM completion (beta) in non-thinking mode.`, + // Static estimates use peak rates; off-peak rates are 50% lower. Effective 2026-08-16. + outputPrice: 3.96, + cacheWritesPrice: 1.32, + cacheReadsPrice: 0.044, + description: `DeepSeek-V4-Pro-0813 is DeepSeek's strongest V4 model for reasoning, coding, long-context, and agentic workloads. It supports thinking and non-thinking modes, JSON output, tool calls, chat prefix completion (beta), and FIM completion (beta) in non-thinking mode.`, }, } as const satisfies Record diff --git a/packages/types/src/providers/fireworks.ts b/packages/types/src/providers/fireworks.ts index 3b18ad50b8..993bf1ad8e 100644 --- a/packages/types/src/providers/fireworks.ts +++ b/packages/types/src/providers/fireworks.ts @@ -16,6 +16,7 @@ export type FireworksModelId = | "accounts/fireworks/models/deepseek-v3p1" | "accounts/fireworks/models/deepseek-v3p2" | "accounts/fireworks/models/deepseek-v4-pro" + | "accounts/fireworks/models/deepseek-v4-pro-0813" | "accounts/fireworks/models/glm-4p5" | "accounts/fireworks/models/glm-4p5-air" | "accounts/fireworks/models/glm-4p6" @@ -262,10 +263,23 @@ export const fireworksModels = { supportsPromptCache: true, inputPrice: 1.74, outputPrice: 3.48, - cacheReadsPrice: 0.14, + cacheReadsPrice: 0.145, description: "DeepSeek V4 Pro is the latest iteration of the DeepSeek model family, with improved reasoning, code generation, and instruction following over the V3 series.", }, + "accounts/fireworks/models/deepseek-v4-pro-0813": { + displayName: "DeepSeek V4 Pro 0813", + maxTokens: 384_000, + contextWindow: 1_000_000, + supportsImages: false, + supportsPromptCache: true, + supportsMaxTokens: true, + inputPrice: 1.32, + outputPrice: 3.96, + cacheReadsPrice: 0.044, + description: + "DeepSeek V4 Pro 0813 is DeepSeek's production checkpoint for advanced reasoning, coding, and long-context agentic workloads.", + }, "accounts/fireworks/models/kimi-k2p7-code": { maxTokens: 16384, contextWindow: 262144, diff --git a/packages/types/src/providers/opencode-go.ts b/packages/types/src/providers/opencode-go.ts index bd60c4d349..7381713349 100644 --- a/packages/types/src/providers/opencode-go.ts +++ b/packages/types/src/providers/opencode-go.ts @@ -295,6 +295,7 @@ export const opencodeGoModels: Record = { // --- DeepSeek --- "deepseek-v4-pro": { + displayName: "DeepSeek V4 Pro 0813", maxTokens: 384_000, contextWindow: 1_000_000, supportsImages: false, @@ -308,11 +309,11 @@ export const opencodeGoModels: Record = { supportsReasoningEffort: ["disable", "low", "medium", "high", "xhigh"], preserveReasoning: true, reasoningEffort: "high", - inputPrice: 1.74, - outputPrice: 3.48, - cacheReadsPrice: 0.0145, + inputPrice: 0.435, + outputPrice: 0.87, + cacheReadsPrice: 0.003625, description: - "DeepSeek-V4-Pro is DeepSeek's strongest V4 model for reasoning, coding, long-context, and agentic workloads. Available via the Opencode Go plan.", + "DeepSeek-V4-Pro-0813 is DeepSeek's strongest V4 model for reasoning, coding, long-context, and agentic workloads. Available via the Opencode Go plan.", }, "deepseek-v4-flash": { maxTokens: 384_000, diff --git a/src/api/providers/__tests__/deepseek.spec.ts b/src/api/providers/__tests__/deepseek.spec.ts index 4f3cccdc08..0c9dc1d5c8 100644 --- a/src/api/providers/__tests__/deepseek.spec.ts +++ b/src/api/providers/__tests__/deepseek.spec.ts @@ -214,7 +214,7 @@ describe("DeepSeekHandler", () => { expect(model.info).toBeDefined() expect(model.info.maxTokens).toBe(384_000) expect(model.info.contextWindow).toBe(1_000_000) - expect(model.info.supportsImages).toBe(true) + expect(model.info.supportsImages).toBe(false) expect(model.info.supportsPromptCache).toBe(true) // Should be true now expect((model.info as ModelInfo).preserveReasoning).toBe(true) }) @@ -229,7 +229,7 @@ describe("DeepSeekHandler", () => { expect(model.id).toBe("deepseek-v4-flash") expect(model.info.maxTokens).toBe(384_000) expect(model.info.contextWindow).toBe(1_000_000) - expect(model.info.supportsImages).toBe(true) + expect(model.info.supportsImages).toBe(false) expect((model.info as ModelInfo).supportsReasoningEffort).toContain("max") }) @@ -243,7 +243,7 @@ describe("DeepSeekHandler", () => { expect(model.info).toBeDefined() expect(model.info.maxTokens).toBe(384_000) expect(model.info.contextWindow).toBe(1_000_000) - expect(model.info.supportsImages).toBe(true) + expect(model.info.supportsImages).toBe(false) expect(model.info.supportsPromptCache).toBe(true) expect((model.info as ModelInfo).preserveReasoning).toBe(true) expect((model.info as ModelInfo).reasoningEffort).toBe("high") diff --git a/src/api/providers/__tests__/fireworks.spec.ts b/src/api/providers/__tests__/fireworks.spec.ts index 353ee31552..bde144591d 100644 --- a/src/api/providers/__tests__/fireworks.spec.ts +++ b/src/api/providers/__tests__/fireworks.spec.ts @@ -118,7 +118,14 @@ describe("FireworksHandler", () => { contextWindow: 1048576, inputPrice: 1.74, outputPrice: 3.48, - cacheReadsPrice: 0.14, + cacheReadsPrice: 0.145, + }, + { + modelId: "accounts/fireworks/models/deepseek-v4-pro-0813" as const, + contextWindow: 1_000_000, + inputPrice: 1.32, + outputPrice: 3.96, + cacheReadsPrice: 0.044, }, ])( "should expose newly added model $modelId",