Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

✨ chore: update some models pricing (#8764)

YuTengjing485e6cf47ed2
diff --git a/packages/model-runtime/src/utils/openaiCompatibleFactory/index.test.ts b/packages/model-runtime/src/utils/openaiCompatibleFactory/index.test.ts
index 131a5992d67..31f6ca475c8 100644
--- a/packages/model-runtime/src/utils/openaiCompatibleFactory/index.test.ts
+++ b/packages/model-runtime/src/utils/openaiCompatibleFactory/index.test.ts
@@ -1392,6 +1392,12 @@ describe('LobeOpenAICompatibleFactory', () => {
maxOutput: 4096,
pricing: {
units: [
+ {
+ name: 'textInput_cacheRead',
+ rate: 0.03,
+ strategy: 'fixed',
+ unit: 'millionTokens',
+ },
{
name: 'textInput',
rate: 0.25,
@@ -1404,6 +1410,18 @@ describe('LobeOpenAICompatibleFactory', () => {
strategy: 'fixed',
unit: 'millionTokens',
},
+ {
+ lookup: {
+ prices: {
+ '1h': 0.5,
+ '5m': 0.3,
+ },
+ pricingParams: ['ttl'],
+ },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
],
},
providerId: 'anthropic',
diff --git a/src/config/aiModels/anthropic.ts b/src/config/aiModels/anthropic.ts
index ac52b2c29ce..da5be90694e 100644
--- a/src/config/aiModels/anthropic.ts
+++ b/src/config/aiModels/anthropic.ts
@@ -213,9 +213,9 @@ const anthropicChatModels: AIChatModelCard[] = [
maxOutput: 8192,
pricing: {
units: [
- { name: 'textInput_cacheRead', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheRead', rate: 0.08, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 0.8, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
{
lookup: { prices: { '1h': 1.6, '5m': 1 }, pricingParams: ['ttl'] },
name: 'textInput_cacheWrite',
@@ -243,8 +243,15 @@ const anthropicChatModels: AIChatModelCard[] = [
maxOutput: 4096,
pricing: {
units: [
+ { name: 'textInput_cacheRead', rate: 0.03, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textOutput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: { prices: { '1h': 0.5, '5m': 0.3 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
],
},
releasedAt: '2024-03-07',
@@ -266,8 +273,15 @@ const anthropicChatModels: AIChatModelCard[] = [
maxOutput: 4096,
pricing: {
units: [
+ { name: 'textInput_cacheRead', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textInput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textOutput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: { prices: { '1h': 6, '5m': 3.75 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
],
},
releasedAt: '2024-02-29',
@@ -286,8 +300,15 @@ const anthropicChatModels: AIChatModelCard[] = [
maxOutput: 4096,
pricing: {
units: [
+ { name: 'textInput_cacheRead', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textInput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textOutput', rate: 75, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ lookup: { prices: { '1h': 30, '5m': 18.75 }, pricingParams: ['ttl'] },
+ name: 'textInput_cacheWrite',
+ strategy: 'lookup',
+ unit: 'millionTokens',
+ },
],
},
releasedAt: '2024-02-29',
diff --git a/src/config/aiModels/fal.ts b/src/config/aiModels/fal.ts
index d22dcb403b2..6ed67fa3269 100644
--- a/src/config/aiModels/fal.ts
+++ b/src/config/aiModels/fal.ts
@@ -27,8 +27,6 @@ export const qwenImageParamsSchema: ModelParamsSchema = {
width: { default: 1328, max: 1536, min: 512, step: 1 },
};
-
-
const falImageModels: AIImageModelCard[] = [
{
description: '专注于图像编辑任务的FLUX.1模型,支持文本和图像输入。',
@@ -41,6 +39,9 @@ const falImageModels: AIImageModelCard[] = [
seed: { default: null },
steps: { default: 28, max: 50, min: 10 },
},
+ pricing: {
+ units: [{ name: 'imageGeneration', rate: 0.025, strategy: 'fixed', unit: 'megapixel' }],
+ },
releasedAt: '2025-06-28',
type: 'image',
},
@@ -59,6 +60,9 @@ const falImageModels: AIImageModelCard[] = [
prompt: { default: '' },
seed: { default: null },
},
+ pricing: {
+ units: [{ name: 'imageGeneration', rate: 0.04, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2025-05-01',
type: 'image',
},
@@ -68,6 +72,9 @@ const falImageModels: AIImageModelCard[] = [
enabled: true,
id: 'flux/schnell',
parameters: fluxSchnellParamsSchema,
+ pricing: {
+ units: [{ name: 'imageGeneration', rate: 0.003, strategy: 'fixed', unit: 'megapixel' }],
+ },
releasedAt: '2024-08-01',
type: 'image',
},
@@ -77,6 +84,9 @@ const falImageModels: AIImageModelCard[] = [
enabled: true,
id: 'flux/krea',
parameters: fluxKreaParamsSchema,
+ pricing: {
+ units: [{ name: 'imageGeneration', rate: 0.025, strategy: 'fixed', unit: 'megapixel' }],
+ },
releasedAt: '2025-07-31',
type: 'image',
},
@@ -94,15 +104,22 @@ const falImageModels: AIImageModelCard[] = [
prompt: { default: '' },
seed: { default: null },
},
+ pricing: {
+ units: [{ name: 'imageGeneration', rate: 0.05, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2025-05-21',
type: 'image',
},
{
- description: 'Qwen团队带来的强大生图模型,具有令人印象深刻的中文文字生成能力和多样图片视觉风格。',
+ description:
+ 'Qwen团队带来的强大生图模型,具有令人印象深刻的中文文字生成能力和多样图片视觉风格。',
displayName: 'Qwen Image',
enabled: true,
id: 'qwen-image',
parameters: qwenImageParamsSchema,
+ pricing: {
+ units: [{ name: 'imageGeneration', rate: 0.02, strategy: 'fixed', unit: 'megapixel' }],
+ },
releasedAt: '2025-08-04',
type: 'image',
},
diff --git a/src/config/aiModels/google.ts b/src/config/aiModels/google.ts
index c154dddcfba..0c9ed410331 100644
--- a/src/config/aiModels/google.ts
+++ b/src/config/aiModels/google.ts
@@ -19,8 +19,24 @@ const googleChatModels: AIChatModelCard[] = [
pricing: {
units: [
{ name: 'textInput_cacheRead', rate: 0.31, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ name: 'textInput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 1.25, upTo: 200_000 },
+ { rate: 2.5, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
+ {
+ name: 'textOutput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 10, upTo: 200_000 },
+ { rate: 15, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
],
},
releasedAt: '2025-06-17',
@@ -47,8 +63,24 @@ const googleChatModels: AIChatModelCard[] = [
pricing: {
units: [
{ name: 'textInput_cacheRead', rate: 0.31, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ name: 'textInput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 1.25, upTo: 200_000 },
+ { rate: 2.5, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
+ {
+ name: 'textOutput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 10, upTo: 200_000 },
+ { rate: 15, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
],
},
releasedAt: '2025-06-05',
@@ -75,8 +107,24 @@ const googleChatModels: AIChatModelCard[] = [
pricing: {
units: [
{ name: 'textInput_cacheRead', rate: 0.31, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ {
+ name: 'textInput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 1.25, upTo: 200_000 },
+ { rate: 2.5, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
+ {
+ name: 'textOutput',
+ strategy: 'tiered',
+ tiers: [
+ { rate: 10, upTo: 200_000 },
+ { rate: 15, upTo: 'infinity' },
+ ],
+ unit: 'millionTokens',
+ },
],
},
releasedAt: '2025-05-06',
@@ -544,6 +592,9 @@ const googleImageModels: AIImageModelCard[] = [
id: 'imagen-4.0-generate-preview-06-06',
organization: 'Deepmind',
parameters: imagenBaseParameters,
+ pricing: {
+ units: [{ name: 'imageGeneration', rate: 0.04, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2024-06-06',
type: 'image',
},
@@ -554,6 +605,9 @@ const googleImageModels: AIImageModelCard[] = [
id: 'imagen-4.0-ultra-generate-preview-06-06',
organization: 'Deepmind',
parameters: imagenBaseParameters,
+ pricing: {
+ units: [{ name: 'imageGeneration', rate: 0.06, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2024-06-06',
type: 'image',
},
diff --git a/src/config/aiModels/qwen.ts b/src/config/aiModels/qwen.ts
index cf6712cd91b..e44407109f5 100644
--- a/src/config/aiModels/qwen.ts
+++ b/src/config/aiModels/qwen.ts
@@ -1261,6 +1261,10 @@ const qwenImageModels: AIImageModelCard[] = [
seed: { default: null },
width: { default: 1024, max: 1440, min: 512, step: 1 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0.14, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2025-07-28',
type: 'image',
},
@@ -1279,6 +1283,10 @@ const qwenImageModels: AIImageModelCard[] = [
seed: { default: null },
width: { default: 1024, max: 1440, min: 512, step: 1 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0.2, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2025-07-28',
type: 'image',
},
@@ -1295,6 +1303,10 @@ const qwenImageModels: AIImageModelCard[] = [
seed: { default: null },
width: { default: 1024, max: 1440, min: 512, step: 1 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0.14, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2025-01-08',
type: 'image',
},
@@ -1311,6 +1323,10 @@ const qwenImageModels: AIImageModelCard[] = [
seed: { default: null },
width: { default: 1024, max: 1440, min: 512, step: 1 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0.2, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2025-01-08',
type: 'image',
},
@@ -1327,6 +1343,10 @@ const qwenImageModels: AIImageModelCard[] = [
seed: { default: null },
width: { default: 1024, max: 1440, min: 512, step: 1 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0.04, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2025-01-17',
type: 'image',
},
@@ -1343,6 +1363,10 @@ const qwenImageModels: AIImageModelCard[] = [
seed: { default: null },
width: { default: 1024, max: 1440, min: 512, step: 1 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0.04, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2024-05-22',
type: 'image',
},
@@ -1364,6 +1388,10 @@ const qwenImageModels: AIImageModelCard[] = [
},
steps: { default: 4, max: 12, min: 1 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2024-08-07',
type: 'image',
},
@@ -1385,6 +1413,10 @@ const qwenImageModels: AIImageModelCard[] = [
},
steps: { default: 50, max: 50, min: 1 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2024-08-07',
type: 'image',
},
@@ -1406,6 +1438,10 @@ const qwenImageModels: AIImageModelCard[] = [
},
steps: { default: 30, max: 30, min: 1 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2024-08-22',
type: 'image',
},
@@ -1423,6 +1459,10 @@ const qwenImageModels: AIImageModelCard[] = [
steps: { default: 40, max: 500, min: 1 },
width: { default: 1024, max: 1024, min: 512, step: 128 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2024-10-25',
type: 'image',
},
@@ -1440,6 +1480,10 @@ const qwenImageModels: AIImageModelCard[] = [
steps: { default: 40, max: 500, min: 1 },
width: { default: 1024, max: 1024, min: 512, step: 128 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2024-10-25',
type: 'image',
},
@@ -1457,6 +1501,10 @@ const qwenImageModels: AIImageModelCard[] = [
steps: { default: 50, max: 500, min: 1 },
width: { default: 1024, max: 1024, min: 512, step: 128 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2024-04-09',
type: 'image',
},
@@ -1474,6 +1522,10 @@ const qwenImageModels: AIImageModelCard[] = [
steps: { default: 50, max: 500, min: 1 },
width: { default: 512, max: 1024, min: 512, step: 128 },
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2024-04-09',
type: 'image',
},
diff --git a/src/config/aiModels/zhipu.ts b/src/config/aiModels/zhipu.ts
index 6b83e79ca2a..5461b58ce5f 100644
--- a/src/config/aiModels/zhipu.ts
+++ b/src/config/aiModels/zhipu.ts
@@ -597,6 +597,10 @@ const zhipuImageModels: AIImageModelCard[] = [
enum: ['1024x1024', '768x1344', '864x1152', '1344x768', '1152x864', '1440x720', '720x1440'],
},
},
+ pricing: {
+ currency: 'CNY',
+ units: [{ name: 'imageGeneration', rate: 0.06, strategy: 'fixed', unit: 'image' }],
+ },
releasedAt: '2025-03-04',
type: 'image',
},