fix: pricing

Carlos Alexandro Becker created

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Change summary

cmd/aihubmix/main.go                     |  32 -
internal/providers/configs/aihubmix.json | 473 +++++++++++++++----------
2 files changed, 291 insertions(+), 214 deletions(-)

Detailed changes

cmd/aihubmix/main.go 🔗

@@ -107,14 +107,14 @@ func main() {
 	}
 
 	aiHubMixProvider := catwalk.Provider{
-		Name:        "AIHubMix",
-		ID:          catwalk.InferenceAIHubMix,
-		APIKey:      "$AIHUBMIX_API_KEY",
-		APIEndpoint: "https://aihubmix.com/v1",
-		Type:        catwalk.TypeOpenAICompat,
+		Name:                "AIHubMix",
+		ID:                  catwalk.InferenceAIHubMix,
+		APIKey:              "$AIHUBMIX_API_KEY",
+		APIEndpoint:         "https://aihubmix.com/v1",
+		Type:                catwalk.TypeOpenAICompat,
 		DefaultLargeModelID: "gpt-5",
 		DefaultSmallModelID: "gpt-5-nano",
-		Models:      []catwalk.Model{},
+		Models:              []catwalk.Model{},
 		DefaultHeaders: map[string]string{
 			"APP-Code": "IUFF7106",
 		},
@@ -126,18 +126,6 @@ func main() {
 			continue
 		}
 
-		// Parse pricing - API returns price per 1K tokens in USD
-		// Convert to price per 1M tokens
-		costIn := parseFloat(model.Pricing.Input) * 1000
-		costOut := parseFloat(model.Pricing.Output) * 1000
-		costInCached := parseFloat(model.Pricing.CacheWrite) * 1000
-		costOutCached := parseFloat(model.Pricing.CacheRead) * 1000
-
-		// Skip models with zero pricing or missing pricing
-		if costIn == 0 || costOut == 0 {
-			continue
-		}
-
 		// Check for text I/O support
 		if !hasModality(model.InputModalities, "text") {
 			continue
@@ -166,10 +154,10 @@ func main() {
 		catwalkModel := catwalk.Model{
 			ID:                     model.ModelID,
 			Name:                   model.ModelID,
-			CostPer1MIn:            costIn,
-			CostPer1MOut:           costOut,
-			CostPer1MInCached:      costInCached,
-			CostPer1MOutCached:     costOutCached,
+			CostPer1MIn:            parseFloat(model.Pricing.Input),
+			CostPer1MOut:           parseFloat(model.Pricing.Output),
+			CostPer1MInCached:      parseFloat(model.Pricing.CacheWrite),
+			CostPer1MOutCached:     parseFloat(model.Pricing.CacheRead),
 			ContextWindow:          model.ContextLength,
 			DefaultMaxTokens:       defaultMaxTokens,
 			CanReason:              canReason,

internal/providers/configs/aihubmix.json 🔗

@@ -10,8 +10,8 @@
     {
       "id": "AiHubmix-Phi-4-mini-reasoning",
       "name": "AiHubmix-Phi-4-mini-reasoning",
-      "cost_per_1m_in": 120,
-      "cost_per_1m_out": 120,
+      "cost_per_1m_in": 0.12,
+      "cost_per_1m_out": 0.12,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 128000,
@@ -23,8 +23,8 @@
     {
       "id": "AiHubmix-Phi-4-reasoning",
       "name": "AiHubmix-Phi-4-reasoning",
-      "cost_per_1m_in": 200,
-      "cost_per_1m_out": 200,
+      "cost_per_1m_in": 0.2,
+      "cost_per_1m_out": 0.2,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 128000,
@@ -42,8 +42,8 @@
     {
       "id": "ByteDance-Seed/Seed-OSS-36B-Instruct",
       "name": "ByteDance-Seed/Seed-OSS-36B-Instruct",
-      "cost_per_1m_in": 200,
-      "cost_per_1m_out": 534,
+      "cost_per_1m_in": 0.2,
+      "cost_per_1m_out": 0.534,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 256000,
@@ -55,8 +55,8 @@
     {
       "id": "DeepSeek-R1",
       "name": "DeepSeek-R1",
-      "cost_per_1m_in": 400,
-      "cost_per_1m_out": 2000,
+      "cost_per_1m_in": 0.4,
+      "cost_per_1m_out": 2,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 1638000,
@@ -68,8 +68,8 @@
     {
       "id": "DeepSeek-V3",
       "name": "DeepSeek-V3",
-      "cost_per_1m_in": 272,
-      "cost_per_1m_out": 1088,
+      "cost_per_1m_in": 0.272,
+      "cost_per_1m_out": 1.088,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 1638000,
@@ -81,8 +81,8 @@
     {
       "id": "DeepSeek-V3-Fast",
       "name": "DeepSeek-V3-Fast",
-      "cost_per_1m_in": 560,
-      "cost_per_1m_out": 2240,
+      "cost_per_1m_in": 0.56,
+      "cost_per_1m_out": 2.24,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 32000,
@@ -94,8 +94,8 @@
     {
       "id": "DeepSeek-V3.1-Fast",
       "name": "DeepSeek-V3.1-Fast",
-      "cost_per_1m_in": 1096,
-      "cost_per_1m_out": 3288,
+      "cost_per_1m_in": 1.096,
+      "cost_per_1m_out": 3.288,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 163000,
@@ -107,8 +107,8 @@
     {
       "id": "DeepSeek-V3.1-Terminus",
       "name": "DeepSeek-V3.1-Terminus",
-      "cost_per_1m_in": 560,
-      "cost_per_1m_out": 1680,
+      "cost_per_1m_in": 0.56,
+      "cost_per_1m_out": 1.68,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 160000,
@@ -120,8 +120,8 @@
     {
       "id": "DeepSeek-V3.1-Think",
       "name": "DeepSeek-V3.1-Think",
-      "cost_per_1m_in": 560,
-      "cost_per_1m_out": 1680,
+      "cost_per_1m_in": 0.56,
+      "cost_per_1m_out": 1.68,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 128000,
@@ -139,10 +139,10 @@
     {
       "id": "DeepSeek-V3.2-Exp",
       "name": "DeepSeek-V3.2-Exp",
-      "cost_per_1m_in": 274,
-      "cost_per_1m_out": 411,
+      "cost_per_1m_in": 0.274,
+      "cost_per_1m_out": 0.411,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 27.400000000000002,
+      "cost_per_1m_out_cached": 0.0274,
       "context_window": 163000,
       "default_max_tokens": 16300,
       "can_reason": false,
@@ -152,10 +152,10 @@
     {
       "id": "DeepSeek-V3.2-Exp-Think",
       "name": "DeepSeek-V3.2-Exp-Think",
-      "cost_per_1m_in": 274,
-      "cost_per_1m_out": 411,
+      "cost_per_1m_in": 0.274,
+      "cost_per_1m_out": 0.411,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 27.400000000000002,
+      "cost_per_1m_out_cached": 0.0274,
       "context_window": 131000,
       "default_max_tokens": 64000,
       "can_reason": true,
@@ -171,8 +171,8 @@
     {
       "id": "ERNIE-X1.1-Preview",
       "name": "ERNIE-X1.1-Preview",
-      "cost_per_1m_in": 136,
-      "cost_per_1m_out": 544,
+      "cost_per_1m_in": 0.136,
+      "cost_per_1m_out": 0.544,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 119000,
@@ -190,8 +190,8 @@
     {
       "id": "Kimi-K2-0905",
       "name": "Kimi-K2-0905",
-      "cost_per_1m_in": 548,
-      "cost_per_1m_out": 2192,
+      "cost_per_1m_in": 0.548,
+      "cost_per_1m_out": 2.192,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 262144,
@@ -203,8 +203,8 @@
     {
       "id": "aihub-Phi-4-mini-instruct",
       "name": "aihub-Phi-4-mini-instruct",
-      "cost_per_1m_in": 120,
-      "cost_per_1m_out": 480,
+      "cost_per_1m_in": 0.12,
+      "cost_per_1m_out": 0.48,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 128000,
@@ -216,8 +216,8 @@
     {
       "id": "aihub-Phi-4-multimodal-instruct",
       "name": "aihub-Phi-4-multimodal-instruct",
-      "cost_per_1m_in": 120,
-      "cost_per_1m_out": 480,
+      "cost_per_1m_in": 0.12,
+      "cost_per_1m_out": 0.48,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 128000,
@@ -229,8 +229,8 @@
     {
       "id": "claude-3-5-haiku",
       "name": "claude-3-5-haiku",
-      "cost_per_1m_in": 1100,
-      "cost_per_1m_out": 5500,
+      "cost_per_1m_in": 1.1,
+      "cost_per_1m_out": 5.5,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 200000,
@@ -242,8 +242,8 @@
     {
       "id": "claude-3-5-sonnet",
       "name": "claude-3-5-sonnet",
-      "cost_per_1m_in": 3300,
-      "cost_per_1m_out": 16500,
+      "cost_per_1m_in": 3.3,
+      "cost_per_1m_out": 16.5,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 200000,
@@ -255,8 +255,8 @@
     {
       "id": "claude-3-5-sonnet-20240620",
       "name": "claude-3-5-sonnet-20240620",
-      "cost_per_1m_in": 3300,
-      "cost_per_1m_out": 16500,
+      "cost_per_1m_in": 3.3,
+      "cost_per_1m_out": 16.5,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 200000,
@@ -268,8 +268,8 @@
     {
       "id": "claude-3-7-sonnet",
       "name": "claude-3-7-sonnet",
-      "cost_per_1m_in": 3300,
-      "cost_per_1m_out": 16500,
+      "cost_per_1m_in": 3.3,
+      "cost_per_1m_out": 16.5,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 200000,
@@ -287,10 +287,10 @@
     {
       "id": "claude-haiku-4-5",
       "name": "claude-haiku-4-5",
-      "cost_per_1m_in": 1100,
-      "cost_per_1m_out": 5500,
-      "cost_per_1m_in_cached": 1375,
-      "cost_per_1m_out_cached": 110,
+      "cost_per_1m_in": 1.1,
+      "cost_per_1m_out": 5.5,
+      "cost_per_1m_in_cached": 1.375,
+      "cost_per_1m_out_cached": 0.11,
       "context_window": 204800,
       "default_max_tokens": 20480,
       "can_reason": true,
@@ -306,8 +306,8 @@
     {
       "id": "claude-opus-4-0",
       "name": "claude-opus-4-0",
-      "cost_per_1m_in": 16500,
-      "cost_per_1m_out": 82500,
+      "cost_per_1m_in": 16.5,
+      "cost_per_1m_out": 82.5,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 200000,
@@ -319,8 +319,8 @@
     {
       "id": "claude-opus-4-1",
       "name": "claude-opus-4-1",
-      "cost_per_1m_in": 16500,
-      "cost_per_1m_out": 82500,
+      "cost_per_1m_in": 16.5,
+      "cost_per_1m_out": 82.5,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 200000,
@@ -338,10 +338,10 @@
     {
       "id": "claude-opus-4-5",
       "name": "claude-opus-4-5",
-      "cost_per_1m_in": 5000,
-      "cost_per_1m_out": 25000,
-      "cost_per_1m_in_cached": 6250,
-      "cost_per_1m_out_cached": 500,
+      "cost_per_1m_in": 5,
+      "cost_per_1m_out": 25,
+      "cost_per_1m_in_cached": 6.25,
+      "cost_per_1m_out_cached": 0.5,
       "context_window": 200000,
       "default_max_tokens": 32000,
       "can_reason": true,
@@ -357,10 +357,10 @@
     {
       "id": "claude-opus-4-5-think",
       "name": "claude-opus-4-5-think",
-      "cost_per_1m_in": 5000,
-      "cost_per_1m_out": 25000,
-      "cost_per_1m_in_cached": 6250,
-      "cost_per_1m_out_cached": 500,
+      "cost_per_1m_in": 5,
+      "cost_per_1m_out": 25,
+      "cost_per_1m_in_cached": 6.25,
+      "cost_per_1m_out_cached": 0.5,
       "context_window": 200000,
       "default_max_tokens": 32000,
       "can_reason": true,
@@ -376,10 +376,10 @@
     {
       "id": "claude-sonnet-4-0",
       "name": "claude-sonnet-4-0",
-      "cost_per_1m_in": 3300,
-      "cost_per_1m_out": 16500,
-      "cost_per_1m_in_cached": 4125,
-      "cost_per_1m_out_cached": 330,
+      "cost_per_1m_in": 3.3,
+      "cost_per_1m_out": 16.5,
+      "cost_per_1m_in_cached": 4.125,
+      "cost_per_1m_out_cached": 0.33,
       "context_window": 1000000,
       "default_max_tokens": 64000,
       "can_reason": true,
@@ -395,10 +395,10 @@
     {
       "id": "claude-sonnet-4-5",
       "name": "claude-sonnet-4-5",
-      "cost_per_1m_in": 3300,
-      "cost_per_1m_out": 16500,
-      "cost_per_1m_in_cached": 4125,
-      "cost_per_1m_out_cached": 330,
+      "cost_per_1m_in": 3.3,
+      "cost_per_1m_out": 16.5,
+      "cost_per_1m_in_cached": 4.125,
+      "cost_per_1m_out_cached": 0.33,
       "context_window": 1000000,
       "default_max_tokens": 64000,
       "can_reason": true,
@@ -414,10 +414,10 @@
     {
       "id": "claude-sonnet-4-5-think",
       "name": "claude-sonnet-4-5-think",
-      "cost_per_1m_in": 3300,
-      "cost_per_1m_out": 16500,
-      "cost_per_1m_in_cached": 4125,
-      "cost_per_1m_out_cached": 330,
+      "cost_per_1m_in": 3.3,
+      "cost_per_1m_out": 16.5,
+      "cost_per_1m_in_cached": 4.125,
+      "cost_per_1m_out_cached": 0.33,
       "context_window": 1000000,
       "default_max_tokens": 64000,
       "can_reason": true,
@@ -430,11 +430,49 @@
       "supports_attachments": true,
       "options": {}
     },
+    {
+      "id": "coding-glm-4.6-free",
+      "name": "coding-glm-4.6-free",
+      "cost_per_1m_in": 0,
+      "cost_per_1m_out": 0,
+      "cost_per_1m_in_cached": 0,
+      "cost_per_1m_out_cached": 0,
+      "context_window": 200000,
+      "default_max_tokens": 20000,
+      "can_reason": true,
+      "reasoning_levels": [
+        "low",
+        "medium",
+        "high"
+      ],
+      "default_reasoning_effort": "medium",
+      "supports_attachments": false,
+      "options": {}
+    },
     {
       "id": "coding-minimax-m2",
       "name": "coding-minimax-m2",
-      "cost_per_1m_in": 200,
-      "cost_per_1m_out": 200,
+      "cost_per_1m_in": 0.2,
+      "cost_per_1m_out": 0.2,
+      "cost_per_1m_in_cached": 0,
+      "cost_per_1m_out_cached": 0,
+      "context_window": 204800,
+      "default_max_tokens": 13100,
+      "can_reason": true,
+      "reasoning_levels": [
+        "low",
+        "medium",
+        "high"
+      ],
+      "default_reasoning_effort": "medium",
+      "supports_attachments": false,
+      "options": {}
+    },
+    {
+      "id": "coding-minimax-m2-free",
+      "name": "coding-minimax-m2-free",
+      "cost_per_1m_in": 0,
+      "cost_per_1m_out": 0,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 204800,
@@ -452,8 +490,8 @@
     {
       "id": "coding-minimax-m2.1",
       "name": "coding-minimax-m2.1",
-      "cost_per_1m_in": 200,
-      "cost_per_1m_out": 200,
+      "cost_per_1m_in": 0.2,
+      "cost_per_1m_out": 0.2,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 204800,
@@ -471,10 +509,10 @@
     {
       "id": "deepseek-math-v2",
       "name": "deepseek-math-v2",
-      "cost_per_1m_in": 492,
-      "cost_per_1m_out": 1968,
+      "cost_per_1m_in": 0.492,
+      "cost_per_1m_out": 1.968,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 98.4,
+      "cost_per_1m_out_cached": 0.0984,
       "context_window": 163000,
       "default_max_tokens": 16300,
       "can_reason": true,
@@ -490,10 +528,10 @@
     {
       "id": "deepseek-v3.2",
       "name": "deepseek-v3.2",
-      "cost_per_1m_in": 302,
-      "cost_per_1m_out": 453,
+      "cost_per_1m_in": 0.302,
+      "cost_per_1m_out": 0.453,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 30.200000000000003,
+      "cost_per_1m_out_cached": 0.0302,
       "context_window": 128000,
       "default_max_tokens": 64000,
       "can_reason": false,
@@ -503,10 +541,10 @@
     {
       "id": "deepseek-v3.2-fast",
       "name": "deepseek-v3.2-fast",
-      "cost_per_1m_in": 1096,
-      "cost_per_1m_out": 3288,
+      "cost_per_1m_in": 1.096,
+      "cost_per_1m_out": 3.288,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 1096,
+      "cost_per_1m_out_cached": 1.096,
       "context_window": 128000,
       "default_max_tokens": 12800,
       "can_reason": false,
@@ -516,8 +554,8 @@
     {
       "id": "deepseek-v3.2-speciale",
       "name": "deepseek-v3.2-speciale",
-      "cost_per_1m_in": 580,
-      "cost_per_1m_out": 1680.028,
+      "cost_per_1m_in": 0.58,
+      "cost_per_1m_out": 1.680028,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 128000,
@@ -535,10 +573,10 @@
     {
       "id": "deepseek-v3.2-think",
       "name": "deepseek-v3.2-think",
-      "cost_per_1m_in": 302,
-      "cost_per_1m_out": 453,
+      "cost_per_1m_in": 0.302,
+      "cost_per_1m_out": 0.453,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 30.200000000000003,
+      "cost_per_1m_out_cached": 0.0302,
       "context_window": 128000,
       "default_max_tokens": 64000,
       "can_reason": false,
@@ -548,10 +586,10 @@
     {
       "id": "doubao-seed-1-6",
       "name": "doubao-seed-1-6",
-      "cost_per_1m_in": 180,
-      "cost_per_1m_out": 1800,
+      "cost_per_1m_in": 0.18,
+      "cost_per_1m_out": 1.8,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 36,
+      "cost_per_1m_out_cached": 0.036,
       "context_window": 256000,
       "default_max_tokens": 32000,
       "can_reason": false,
@@ -561,10 +599,10 @@
     {
       "id": "doubao-seed-1-6-flash",
       "name": "doubao-seed-1-6-flash",
-      "cost_per_1m_in": 44,
-      "cost_per_1m_out": 440,
+      "cost_per_1m_in": 0.044,
+      "cost_per_1m_out": 0.44,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 8.8,
+      "cost_per_1m_out_cached": 0.0088,
       "context_window": 256000,
       "default_max_tokens": 33000,
       "can_reason": false,
@@ -574,10 +612,10 @@
     {
       "id": "doubao-seed-1-6-lite",
       "name": "doubao-seed-1-6-lite",
-      "cost_per_1m_in": 82,
-      "cost_per_1m_out": 656,
+      "cost_per_1m_in": 0.082,
+      "cost_per_1m_out": 0.656,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 16.400000000000002,
+      "cost_per_1m_out_cached": 0.0164,
       "context_window": 256000,
       "default_max_tokens": 32000,
       "can_reason": false,
@@ -587,10 +625,10 @@
     {
       "id": "doubao-seed-1-6-thinking",
       "name": "doubao-seed-1-6-thinking",
-      "cost_per_1m_in": 180,
-      "cost_per_1m_out": 1800,
+      "cost_per_1m_in": 0.18,
+      "cost_per_1m_out": 1.8,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 36,
+      "cost_per_1m_out_cached": 0.036,
       "context_window": 256000,
       "default_max_tokens": 32000,
       "can_reason": false,
@@ -600,10 +638,10 @@
     {
       "id": "doubao-seed-1-8",
       "name": "doubao-seed-1-8",
-      "cost_per_1m_in": 109.59,
-      "cost_per_1m_out": 273.975,
+      "cost_per_1m_in": 0.10959,
+      "cost_per_1m_out": 0.273975,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 21.918,
+      "cost_per_1m_out_cached": 0.021918,
       "context_window": 256000,
       "default_max_tokens": 64000,
       "can_reason": true,
@@ -619,8 +657,8 @@
     {
       "id": "ernie-4.5",
       "name": "ernie-4.5",
-      "cost_per_1m_in": 68,
-      "cost_per_1m_out": 272,
+      "cost_per_1m_in": 0.068,
+      "cost_per_1m_out": 0.272,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 160000,
@@ -632,8 +670,8 @@
     {
       "id": "ernie-4.5-turbo-latest",
       "name": "ernie-4.5-turbo-latest",
-      "cost_per_1m_in": 110,
-      "cost_per_1m_out": 440,
+      "cost_per_1m_in": 0.11,
+      "cost_per_1m_out": 0.44,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 135000,
@@ -645,8 +683,8 @@
     {
       "id": "ernie-4.5-turbo-vl",
       "name": "ernie-4.5-turbo-vl",
-      "cost_per_1m_in": 400,
-      "cost_per_1m_out": 1200,
+      "cost_per_1m_in": 0.4,
+      "cost_per_1m_out": 1.2,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 139000,
@@ -658,10 +696,10 @@
     {
       "id": "ernie-5.0-thinking-exp",
       "name": "ernie-5.0-thinking-exp",
-      "cost_per_1m_in": 821.92,
-      "cost_per_1m_out": 3287.68,
+      "cost_per_1m_in": 0.82192,
+      "cost_per_1m_out": 3.28768,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 821.92,
+      "cost_per_1m_out_cached": 0.82192,
       "context_window": 119000,
       "default_max_tokens": 11900,
       "can_reason": true,
@@ -677,10 +715,10 @@
     {
       "id": "ernie-5.0-thinking-preview",
       "name": "ernie-5.0-thinking-preview",
-      "cost_per_1m_in": 822,
-      "cost_per_1m_out": 3288,
+      "cost_per_1m_in": 0.822,
+      "cost_per_1m_out": 3.288,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 822,
+      "cost_per_1m_out_cached": 0.822,
       "context_window": 183000,
       "default_max_tokens": 64000,
       "can_reason": true,
@@ -696,8 +734,8 @@
     {
       "id": "ernie-x1-turbo",
       "name": "ernie-x1-turbo",
-      "cost_per_1m_in": 136,
-      "cost_per_1m_out": 544,
+      "cost_per_1m_in": 0.136,
+      "cost_per_1m_out": 0.544,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 50500,
@@ -715,10 +753,23 @@
     {
       "id": "gemini-2.0-flash",
       "name": "gemini-2.0-flash",
-      "cost_per_1m_in": 100,
-      "cost_per_1m_out": 400,
+      "cost_per_1m_in": 0.1,
+      "cost_per_1m_out": 0.4,
+      "cost_per_1m_in_cached": 0,
+      "cost_per_1m_out_cached": 0.025,
+      "context_window": 1048576,
+      "default_max_tokens": 8192,
+      "can_reason": false,
+      "supports_attachments": true,
+      "options": {}
+    },
+    {
+      "id": "gemini-2.0-flash-free",
+      "name": "gemini-2.0-flash-free",
+      "cost_per_1m_in": 0,
+      "cost_per_1m_out": 0,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 25,
+      "cost_per_1m_out_cached": 0,
       "context_window": 1048576,
       "default_max_tokens": 8192,
       "can_reason": false,
@@ -728,10 +779,10 @@
     {
       "id": "gemini-2.5-flash",
       "name": "gemini-2.5-flash",
-      "cost_per_1m_in": 300,
-      "cost_per_1m_out": 2499,
+      "cost_per_1m_in": 0.3,
+      "cost_per_1m_out": 2.499,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 30,
+      "cost_per_1m_out_cached": 0.03,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": false,
@@ -741,10 +792,10 @@
     {
       "id": "gemini-2.5-flash-lite",
       "name": "gemini-2.5-flash-lite",
-      "cost_per_1m_in": 100,
-      "cost_per_1m_out": 400,
+      "cost_per_1m_in": 0.1,
+      "cost_per_1m_out": 0.4,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 10,
+      "cost_per_1m_out_cached": 0.01,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": false,
@@ -754,10 +805,10 @@
     {
       "id": "gemini-2.5-flash-lite-preview-09-2025",
       "name": "gemini-2.5-flash-lite-preview-09-2025",
-      "cost_per_1m_in": 100,
-      "cost_per_1m_out": 400,
+      "cost_per_1m_in": 0.1,
+      "cost_per_1m_out": 0.4,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 10,
+      "cost_per_1m_out_cached": 0.01,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": false,
@@ -767,10 +818,10 @@
     {
       "id": "gemini-2.5-flash-nothink",
       "name": "gemini-2.5-flash-nothink",
-      "cost_per_1m_in": 300,
-      "cost_per_1m_out": 2499,
+      "cost_per_1m_in": 0.3,
+      "cost_per_1m_out": 2.499,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 30,
+      "cost_per_1m_out_cached": 0.03,
       "context_window": 1047576,
       "default_max_tokens": 65536,
       "can_reason": false,
@@ -780,10 +831,10 @@
     {
       "id": "gemini-2.5-flash-preview-05-20-nothink",
       "name": "gemini-2.5-flash-preview-05-20-nothink",
-      "cost_per_1m_in": 300,
-      "cost_per_1m_out": 2499,
+      "cost_per_1m_in": 0.3,
+      "cost_per_1m_out": 2.499,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 30,
+      "cost_per_1m_out_cached": 0.03,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": false,
@@ -793,10 +844,10 @@
     {
       "id": "gemini-2.5-flash-preview-05-20-search",
       "name": "gemini-2.5-flash-preview-05-20-search",
-      "cost_per_1m_in": 300,
-      "cost_per_1m_out": 2499,
+      "cost_per_1m_in": 0.3,
+      "cost_per_1m_out": 2.499,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 30,
+      "cost_per_1m_out_cached": 0.03,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": false,
@@ -806,10 +857,10 @@
     {
       "id": "gemini-2.5-flash-preview-09-2025",
       "name": "gemini-2.5-flash-preview-09-2025",
-      "cost_per_1m_in": 300,
-      "cost_per_1m_out": 2499,
+      "cost_per_1m_in": 0.3,
+      "cost_per_1m_out": 2.499,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 30,
+      "cost_per_1m_out_cached": 0.03,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": false,
@@ -819,10 +870,10 @@
     {
       "id": "gemini-2.5-flash-search",
       "name": "gemini-2.5-flash-search",
-      "cost_per_1m_in": 300,
-      "cost_per_1m_out": 2499,
+      "cost_per_1m_in": 0.3,
+      "cost_per_1m_out": 2.499,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 30,
+      "cost_per_1m_out_cached": 0.03,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": false,
@@ -832,10 +883,10 @@
     {
       "id": "gemini-2.5-pro",
       "name": "gemini-2.5-pro",
-      "cost_per_1m_in": 1250,
-      "cost_per_1m_out": 10000,
+      "cost_per_1m_in": 1.25,
+      "cost_per_1m_out": 10,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 125,
+      "cost_per_1m_out_cached": 0.125,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": true,
@@ -851,10 +902,10 @@
     {
       "id": "gemini-2.5-pro-preview-05-06",
       "name": "gemini-2.5-pro-preview-05-06",
-      "cost_per_1m_in": 1250,
-      "cost_per_1m_out": 10000,
+      "cost_per_1m_in": 1.25,
+      "cost_per_1m_out": 10,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 125,
+      "cost_per_1m_out_cached": 0.125,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": true,
@@ -870,10 +921,10 @@
     {
       "id": "gemini-2.5-pro-preview-06-05",
       "name": "gemini-2.5-pro-preview-06-05",
-      "cost_per_1m_in": 1250,
-      "cost_per_1m_out": 10000,
+      "cost_per_1m_in": 1.25,
+      "cost_per_1m_out": 10,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 125,
+      "cost_per_1m_out_cached": 0.125,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": true,
@@ -889,10 +940,10 @@
     {
       "id": "gemini-2.5-pro-search",
       "name": "gemini-2.5-pro-search",
-      "cost_per_1m_in": 1250,
-      "cost_per_1m_out": 10000,
+      "cost_per_1m_in": 1.25,
+      "cost_per_1m_out": 10,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 125,
+      "cost_per_1m_out_cached": 0.125,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": true,
@@ -908,10 +959,29 @@
     {
       "id": "gemini-3-flash-preview",
       "name": "gemini-3-flash-preview",
-      "cost_per_1m_in": 500,
-      "cost_per_1m_out": 3000,
+      "cost_per_1m_in": 0.5,
+      "cost_per_1m_out": 3,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 50,
+      "cost_per_1m_out_cached": 0.05,
+      "context_window": 1048576,
+      "default_max_tokens": 65536,
+      "can_reason": true,
+      "reasoning_levels": [
+        "low",
+        "medium",
+        "high"
+      ],
+      "default_reasoning_effort": "medium",
+      "supports_attachments": true,
+      "options": {}
+    },
+    {
+      "id": "gemini-3-flash-preview-free",
+      "name": "gemini-3-flash-preview-free",
+      "cost_per_1m_in": 0,
+      "cost_per_1m_out": 0,
+      "cost_per_1m_in_cached": 0,
+      "cost_per_1m_out_cached": 0,
       "context_window": 1048576,
       "default_max_tokens": 65536,
       "can_reason": true,
@@ -927,23 +997,42 @@
     {
       "id": "glm-4.5v",
       "name": "glm-4.5v",
-      "cost_per_1m_in": 274,
-      "cost_per_1m_out": 822,
+      "cost_per_1m_in": 0.274,
+      "cost_per_1m_out": 0.822,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 274,
+      "cost_per_1m_out_cached": 0.274,
       "context_window": 64000,
       "default_max_tokens": 16384,
       "can_reason": false,
       "supports_attachments": true,
       "options": {}
     },
+    {
+      "id": "glm-4.6",
+      "name": "glm-4.6",
+      "cost_per_1m_in": 0,
+      "cost_per_1m_out": 0,
+      "cost_per_1m_in_cached": 0,
+      "cost_per_1m_out_cached": 0,
+      "context_window": 204800,
+      "default_max_tokens": 20480,
+      "can_reason": true,
+      "reasoning_levels": [
+        "low",
+        "medium",
+        "high"
+      ],
+      "default_reasoning_effort": "medium",
+      "supports_attachments": false,
+      "options": {}
+    },
     {
       "id": "glm-4.6v",
       "name": "glm-4.6v",
-      "cost_per_1m_in": 137,
-      "cost_per_1m_out": 411,
+      "cost_per_1m_in": 0.137,
+      "cost_per_1m_out": 0.411,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 27.400000000000002,
+      "cost_per_1m_out_cached": 0.0274,
       "context_window": 128000,
       "default_max_tokens": 12800,
       "can_reason": false,
@@ -953,10 +1042,10 @@
     {
       "id": "glm-4.7",
       "name": "glm-4.7",
-      "cost_per_1m_in": 273.974,
-      "cost_per_1m_out": 1095.896,
+      "cost_per_1m_in": 0.273974,
+      "cost_per_1m_out": 1.095896,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 54.795,
+      "cost_per_1m_out_cached": 0.054795,
       "context_window": 200000,
       "default_max_tokens": 20000,
       "can_reason": true,
@@ -972,10 +1061,10 @@
     {
       "id": "gpt-4.1",
       "name": "gpt-4.1",
-      "cost_per_1m_in": 2000,
-      "cost_per_1m_out": 8000,
+      "cost_per_1m_in": 2,
+      "cost_per_1m_out": 8,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 500,
+      "cost_per_1m_out_cached": 0.5,
       "context_window": 1047576,
       "default_max_tokens": 32768,
       "can_reason": false,
@@ -985,10 +1074,10 @@
     {
       "id": "gpt-4.1-mini",
       "name": "gpt-4.1-mini",
-      "cost_per_1m_in": 400,
-      "cost_per_1m_out": 1600,
+      "cost_per_1m_in": 0.4,
+      "cost_per_1m_out": 1.6,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 100,
+      "cost_per_1m_out_cached": 0.1,
       "context_window": 1047576,
       "default_max_tokens": 32768,
       "can_reason": false,
@@ -998,10 +1087,10 @@
     {
       "id": "gpt-4.1-nano",
       "name": "gpt-4.1-nano",
-      "cost_per_1m_in": 100,
-      "cost_per_1m_out": 400,
+      "cost_per_1m_in": 0.1,
+      "cost_per_1m_out": 0.4,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 25,
+      "cost_per_1m_out_cached": 0.025,
       "context_window": 1047576,
       "default_max_tokens": 32768,
       "can_reason": false,
@@ -1011,10 +1100,10 @@
     {
       "id": "gpt-4o",
       "name": "gpt-4o",
-      "cost_per_1m_in": 2500,
-      "cost_per_1m_out": 10000,
+      "cost_per_1m_in": 2.5,
+      "cost_per_1m_out": 10,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 1250,
+      "cost_per_1m_out_cached": 1.25,
       "context_window": 128000,
       "default_max_tokens": 16384,
       "can_reason": false,
@@ -1024,10 +1113,10 @@
     {
       "id": "gpt-4o-2024-11-20",
       "name": "gpt-4o-2024-11-20",
-      "cost_per_1m_in": 2500,
-      "cost_per_1m_out": 10000,
+      "cost_per_1m_in": 2.5,
+      "cost_per_1m_out": 10,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 1250,
+      "cost_per_1m_out_cached": 1.25,
       "context_window": 128000,
       "default_max_tokens": 16384,
       "can_reason": false,
@@ -1037,8 +1126,8 @@
     {
       "id": "gpt-4o-audio-preview",
       "name": "gpt-4o-audio-preview",
-      "cost_per_1m_in": 2500,
-      "cost_per_1m_out": 10000,
+      "cost_per_1m_in": 2.5,
+      "cost_per_1m_out": 10,
       "cost_per_1m_in_cached": 0,
       "cost_per_1m_out_cached": 0,
       "context_window": 128000,
@@ -1050,10 +1139,10 @@
     {
       "id": "gpt-4o-mini",
       "name": "gpt-4o-mini",
-      "cost_per_1m_in": 150,
-      "cost_per_1m_out": 600,
+      "cost_per_1m_in": 0.15,
+      "cost_per_1m_out": 0.6,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 75,
+      "cost_per_1m_out_cached": 0.075,
       "context_window": 128000,
       "default_max_tokens": 16384,
       "can_reason": false,
@@ -1063,10 +1152,10 @@
     {
       "id": "gpt-4o-mini-search-preview",
       "name": "gpt-4o-mini-search-preview",
-      "cost_per_1m_in": 150,
-      "cost_per_1m_out": 600,
+      "cost_per_1m_in": 0.15,
+      "cost_per_1m_out": 0.6,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 75,
+      "cost_per_1m_out_cached": 0.075,
       "context_window": 128000,
       "default_max_tokens": 16384,
       "can_reason": false,
@@ -1076,10 +1165,10 @@
     {
       "id": "gpt-4o-search-preview",
       "name": "gpt-4o-search-preview",
-      "cost_per_1m_in": 2500,
-      "cost_per_1m_out": 10000,
+      "cost_per_1m_in": 2.5,
+      "cost_per_1m_out": 10,
       "cost_per_1m_in_cached": 0,
-      "cost_per_1m_out_cached": 1250,
+      "cost_per_1m_out_cached": 1.25,
       "context_window": 128000,
       "default_max_tokens": 16384,
       "can_reason": false,