From aec3f1184ca71d3b39d53e983504cc2808c42b0c Mon Sep 17 00:00:00 2001 From: RISC-1145 Date: Fri, 24 Apr 2026 19:51:15 +0800 Subject: [PATCH] fix: correct DeepSeek V4 model pricing to accurate USD values --- packages/types/src/providers/baseten.ts | 16 ++++++++-------- packages/types/src/providers/deepseek.ts | 16 ++++++++-------- packages/types/src/providers/fireworks.ts | 16 ++++++++-------- packages/types/src/providers/sambanova.ts | 16 ++++++++-------- src/api/providers/__tests__/fireworks.spec.ts | 16 ++++++++-------- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/packages/types/src/providers/baseten.ts b/packages/types/src/providers/baseten.ts index dbb9dcb2d7..6c275cda2c 100644 --- a/packages/types/src/providers/baseten.ts +++ b/packages/types/src/providers/baseten.ts @@ -88,10 +88,10 @@ export const basetenModels = { contextWindow: 1_000_000, supportsImages: false, supportsPromptCache: true, - inputPrice: 12, - outputPrice: 24, - cacheWritesPrice: 0, - cacheReadsPrice: 1, + inputPrice: 1.74, + outputPrice: 3.48, + cacheWritesPrice: 1.74, + cacheReadsPrice: 0.145, description: "DeepSeek V4 Pro", }, "deepseek-ai/DeepSeek-V4-Flash": { @@ -99,10 +99,10 @@ export const basetenModels = { contextWindow: 1_000_000, supportsImages: false, supportsPromptCache: true, - inputPrice: 0.2, - outputPrice: 1, - cacheWritesPrice: 0, - cacheReadsPrice: 1, + inputPrice: 0.14, + outputPrice: 0.28, + cacheWritesPrice: 0.14, + cacheReadsPrice: 0.028, description: "DeepSeek V4 Flash", }, "openai/gpt-oss-120b": { diff --git a/packages/types/src/providers/deepseek.ts b/packages/types/src/providers/deepseek.ts index 449a4c299e..0e7267a3aa 100644 --- a/packages/types/src/providers/deepseek.ts +++ b/packages/types/src/providers/deepseek.ts @@ -38,10 +38,10 @@ export const deepSeekModels = { supportsImages: false, supportsPromptCache: true, preserveReasoning: true, - inputPrice: 12, - outputPrice: 24, - cacheWritesPrice: 0, - cacheReadsPrice: 1, + inputPrice: 1.74, // $1.74 per million tokens (cache miss) + outputPrice: 3.48, // $3.48 per million tokens + cacheWritesPrice: 1.74, // $1.74 per million tokens (cache miss) + cacheReadsPrice: 0.145, // $0.145 per million tokens (cache hit) description: `DeepSeek V4 Pro`, }, "deepseek-v4-flash": { @@ -50,10 +50,10 @@ export const deepSeekModels = { supportsImages: false, supportsPromptCache: true, preserveReasoning: true, - inputPrice: 0.2, - outputPrice: 1, - cacheWritesPrice: 0, - cacheReadsPrice: 1, + inputPrice: 0.14, // $0.14 per million tokens (cache miss) + outputPrice: 0.28, // $0.28 per million tokens + cacheWritesPrice: 0.14, // $0.14 per million tokens (cache miss) + cacheReadsPrice: 0.028, // $0.028 per million tokens (cache hit) description: `DeepSeek V4 Flash`, }, } as const satisfies Record diff --git a/packages/types/src/providers/fireworks.ts b/packages/types/src/providers/fireworks.ts index c7d794e970..fb839c07e1 100644 --- a/packages/types/src/providers/fireworks.ts +++ b/packages/types/src/providers/fireworks.ts @@ -207,10 +207,10 @@ export const fireworksModels = { contextWindow: 1_000_000, supportsImages: false, supportsPromptCache: true, - inputPrice: 12, - outputPrice: 24, - cacheWritesPrice: 0, - cacheReadsPrice: 1, + inputPrice: 1.74, + outputPrice: 3.48, + cacheWritesPrice: 1.74, + cacheReadsPrice: 0.145, description: "DeepSeek V4 Pro", }, "accounts/fireworks/models/deepseek-v4-flash": { @@ -218,10 +218,10 @@ export const fireworksModels = { contextWindow: 1_000_000, supportsImages: false, supportsPromptCache: true, - inputPrice: 0.2, - outputPrice: 1, - cacheWritesPrice: 0, - cacheReadsPrice: 1, + inputPrice: 0.14, + outputPrice: 0.28, + cacheWritesPrice: 0.14, + cacheReadsPrice: 0.028, description: "DeepSeek V4 Flash", }, "accounts/fireworks/models/glm-4p7": { diff --git a/packages/types/src/providers/sambanova.ts b/packages/types/src/providers/sambanova.ts index 426204800c..8b2f88ea58 100644 --- a/packages/types/src/providers/sambanova.ts +++ b/packages/types/src/providers/sambanova.ts @@ -66,10 +66,10 @@ export const sambaNovaModels = { contextWindow: 1_000_000, supportsImages: false, supportsPromptCache: true, - inputPrice: 12, - outputPrice: 24, - cacheWritesPrice: 0, - cacheReadsPrice: 1, + inputPrice: 1.74, + outputPrice: 3.48, + cacheWritesPrice: 1.74, + cacheReadsPrice: 0.145, description: "DeepSeek V4 Pro", }, "deepseek-ai/DeepSeek-V4-Flash": { @@ -77,10 +77,10 @@ export const sambaNovaModels = { contextWindow: 1_000_000, supportsImages: false, supportsPromptCache: true, - inputPrice: 0.2, - outputPrice: 1, - cacheWritesPrice: 0, - cacheReadsPrice: 1, + inputPrice: 0.14, + outputPrice: 0.28, + cacheWritesPrice: 0.14, + cacheReadsPrice: 0.028, description: "DeepSeek V4 Flash", }, "Llama-4-Maverick-17B-128E-Instruct": { diff --git a/src/api/providers/__tests__/fireworks.spec.ts b/src/api/providers/__tests__/fireworks.spec.ts index 898297353d..6641292f53 100644 --- a/src/api/providers/__tests__/fireworks.spec.ts +++ b/src/api/providers/__tests__/fireworks.spec.ts @@ -259,10 +259,10 @@ describe("FireworksHandler", () => { contextWindow: 1_000_000, supportsImages: false, supportsPromptCache: true, - inputPrice: 12, - outputPrice: 24, - cacheWritesPrice: 0, - cacheReadsPrice: 1, + inputPrice: 1.74, + outputPrice: 3.48, + cacheWritesPrice: 1.74, + cacheReadsPrice: 0.145, description: expect.stringContaining("DeepSeek V4 Pro"), }), ) @@ -282,10 +282,10 @@ describe("FireworksHandler", () => { contextWindow: 1_000_000, supportsImages: false, supportsPromptCache: true, - inputPrice: 0.2, - outputPrice: 1, - cacheWritesPrice: 0, - cacheReadsPrice: 1, + inputPrice: 0.14, + outputPrice: 0.28, + cacheWritesPrice: 0.14, + cacheReadsPrice: 0.028, description: expect.stringContaining("DeepSeek V4 Flash"), }), )