@funkai/models 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/.turbo/turbo-build.log +33 -33
  2. package/CHANGELOG.md +6 -0
  3. package/dist/alibaba-B6q4Ng1R.mjs.map +1 -1
  4. package/dist/amazon-bedrock-Cv9AHQBH.mjs.map +1 -1
  5. package/dist/anthropic-yB7ST97_.mjs.map +1 -1
  6. package/dist/cerebras-COfl7XM-.mjs.map +1 -1
  7. package/dist/cohere-B7TgO0hT.mjs.map +1 -1
  8. package/dist/deepinfra-B0GxUwCG.mjs.map +1 -1
  9. package/dist/deepseek-D64ZEsvS.mjs.map +1 -1
  10. package/dist/fireworks-ai-DJYvdAi_.mjs.map +1 -1
  11. package/dist/google-BypRl349.mjs.map +1 -1
  12. package/dist/google-vertex-DbS-zTGD.mjs.map +1 -1
  13. package/dist/groq-ei_PerYi.mjs.map +1 -1
  14. package/dist/huggingface-DaM1EeLP.mjs.map +1 -1
  15. package/dist/inception-CspEzqNV.mjs.map +1 -1
  16. package/dist/index.d.mts +1 -1
  17. package/dist/index.d.mts.map +1 -1
  18. package/dist/index.mjs +2 -1
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/llama-Cf3-koap.mjs.map +1 -1
  21. package/dist/mistral-BI9MdAO4.mjs.map +1 -1
  22. package/dist/nvidia-COHacuoa.mjs.map +1 -1
  23. package/dist/openai-C0nCfZUq.mjs.map +1 -1
  24. package/dist/openrouter-DSFzxKQb.mjs.map +1 -1
  25. package/dist/perplexity-zeZ2WlBU.mjs.map +1 -1
  26. package/dist/providers/alibaba.d.mts +1 -1
  27. package/dist/providers/amazon-bedrock.d.mts +1 -1
  28. package/dist/providers/anthropic.d.mts +1 -1
  29. package/dist/providers/cerebras.d.mts +1 -1
  30. package/dist/providers/cohere.d.mts +1 -1
  31. package/dist/providers/deepinfra.d.mts +1 -1
  32. package/dist/providers/deepseek.d.mts +1 -1
  33. package/dist/providers/fireworks-ai.d.mts +1 -1
  34. package/dist/providers/google-vertex.d.mts +1 -1
  35. package/dist/providers/google.d.mts +1 -1
  36. package/dist/providers/groq.d.mts +1 -1
  37. package/dist/providers/huggingface.d.mts +1 -1
  38. package/dist/providers/inception.d.mts +1 -1
  39. package/dist/providers/llama.d.mts +1 -1
  40. package/dist/providers/mistral.d.mts +1 -1
  41. package/dist/providers/nvidia.d.mts +1 -1
  42. package/dist/providers/openai.d.mts +1 -1
  43. package/dist/providers/openrouter.d.mts +1 -1
  44. package/dist/providers/perplexity.d.mts +1 -1
  45. package/dist/providers/togetherai.d.mts +1 -1
  46. package/dist/providers/xai.d.mts +1 -1
  47. package/dist/togetherai-BvcxUfPE.mjs.map +1 -1
  48. package/dist/{types-DjdaZckF.d.mts → types-DIzolT_s.d.mts} +61 -21
  49. package/dist/types-DIzolT_s.d.mts.map +1 -0
  50. package/dist/xai-fSuAkQJo.mjs.map +1 -1
  51. package/package.json +6 -3
  52. package/scripts/generate-models.ts +152 -63
  53. package/src/catalog/index.test.ts +8 -8
  54. package/src/catalog/index.ts +4 -1
  55. package/src/catalog/providers/alibaba.ts +91 -91
  56. package/src/catalog/providers/amazon-bedrock.ts +205 -185
  57. package/src/catalog/providers/anthropic.ts +87 -62
  58. package/src/catalog/providers/cerebras.ts +9 -9
  59. package/src/catalog/providers/cohere.ts +16 -16
  60. package/src/catalog/providers/deepinfra.ts +71 -71
  61. package/src/catalog/providers/deepseek.ts +3 -3
  62. package/src/catalog/providers/fireworks-ai.ts +36 -36
  63. package/src/catalog/providers/google-vertex.ts +62 -62
  64. package/src/catalog/providers/google.ts +69 -69
  65. package/src/catalog/providers/groq.ts +24 -24
  66. package/src/catalog/providers/huggingface.ts +52 -52
  67. package/src/catalog/providers/inception.ts +9 -9
  68. package/src/catalog/providers/index.ts +1 -0
  69. package/src/catalog/providers/llama.ts +7 -7
  70. package/src/catalog/providers/mistral.ts +60 -60
  71. package/src/catalog/providers/nvidia.ts +84 -84
  72. package/src/catalog/providers/openai.ts +115 -115
  73. package/src/catalog/providers/openrouter.ts +448 -433
  74. package/src/catalog/providers/perplexity.ts +9 -9
  75. package/src/catalog/providers/togetherai.ts +47 -47
  76. package/src/catalog/providers/xai.ts +49 -49
  77. package/src/catalog/types.ts +60 -20
  78. package/src/cost/calculate.test.ts +11 -11
  79. package/src/provider/registry.ts +1 -1
  80. package/src/provider/types.ts +1 -1
  81. package/tsconfig.json +2 -1
  82. package/tsdown.config.ts +7 -3
  83. package/dist/types-DjdaZckF.d.mts.map +0 -1
@@ -19,8 +19,8 @@ export const PERPLEXITY_MODELS = [
19
19
  name: "Sonar Reasoning Pro",
20
20
  provider: "perplexity",
21
21
  family: "sonar-reasoning",
22
- pricing: { input: 0.000002, output: 0.000008 },
23
- contextWindow: 128000,
22
+ pricing: { input: 0.000_002, output: 0.000_008 },
23
+ contextWindow: 128_000,
24
24
  maxOutput: 4096,
25
25
  modalities: { input: ["text", "image"], output: ["text"] },
26
26
  capabilities: { reasoning: true, toolCall: false, attachment: true, structuredOutput: false },
@@ -30,8 +30,8 @@ export const PERPLEXITY_MODELS = [
30
30
  name: "Sonar",
31
31
  provider: "perplexity",
32
32
  family: "sonar",
33
- pricing: { input: 0.000001, output: 0.000001 },
34
- contextWindow: 128000,
33
+ pricing: { input: 0.000_001, output: 0.000_001 },
34
+ contextWindow: 128_000,
35
35
  maxOutput: 4096,
36
36
  modalities: { input: ["text"], output: ["text"] },
37
37
  capabilities: { reasoning: false, toolCall: false, attachment: false, structuredOutput: false },
@@ -41,9 +41,9 @@ export const PERPLEXITY_MODELS = [
41
41
  name: "Perplexity Sonar Deep Research",
42
42
  provider: "perplexity",
43
43
  family: "",
44
- pricing: { input: 0.000002, output: 0.000008, reasoning: 0.000003 },
45
- contextWindow: 128000,
46
- maxOutput: 32768,
44
+ pricing: { input: 0.000_002, output: 0.000_008, reasoning: 0.000_003 },
45
+ contextWindow: 128_000,
46
+ maxOutput: 32_768,
47
47
  modalities: { input: ["text"], output: ["text"] },
48
48
  capabilities: { reasoning: true, toolCall: false, attachment: false, structuredOutput: false },
49
49
  },
@@ -52,8 +52,8 @@ export const PERPLEXITY_MODELS = [
52
52
  name: "Sonar Pro",
53
53
  provider: "perplexity",
54
54
  family: "sonar-pro",
55
- pricing: { input: 0.000003, output: 0.000015 },
56
- contextWindow: 200000,
55
+ pricing: { input: 0.000_003, output: 0.000_015 },
56
+ contextWindow: 200_000,
57
57
  maxOutput: 8192,
58
58
  modalities: { input: ["text", "image"], output: ["text"] },
59
59
  capabilities: { reasoning: false, toolCall: false, attachment: true, structuredOutput: false },
@@ -19,9 +19,9 @@ export const TOGETHERAI_MODELS = [
19
19
  name: "GLM 4.6",
20
20
  provider: "togetherai",
21
21
  family: "glm",
22
- pricing: { input: 6e-7, output: 0.0000022 },
23
- contextWindow: 200000,
24
- maxOutput: 200000,
22
+ pricing: { input: 6e-7, output: 0.000_002_2 },
23
+ contextWindow: 200_000,
24
+ maxOutput: 200_000,
25
25
  modalities: { input: ["text"], output: ["text"] },
26
26
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
27
27
  },
@@ -30,9 +30,9 @@ export const TOGETHERAI_MODELS = [
30
30
  name: "GLM-4.7",
31
31
  provider: "togetherai",
32
32
  family: "glm",
33
- pricing: { input: 4.5e-7, output: 0.000002 },
34
- contextWindow: 200000,
35
- maxOutput: 200000,
33
+ pricing: { input: 4.5e-7, output: 0.000_002 },
34
+ contextWindow: 200_000,
35
+ maxOutput: 200_000,
36
36
  modalities: { input: ["text"], output: ["text"] },
37
37
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
38
38
  },
@@ -41,9 +41,9 @@ export const TOGETHERAI_MODELS = [
41
41
  name: "GLM-5",
42
42
  provider: "togetherai",
43
43
  family: "glm",
44
- pricing: { input: 0.000001, output: 0.0000032 },
45
- contextWindow: 202752,
46
- maxOutput: 131072,
44
+ pricing: { input: 0.000_001, output: 0.000_003_2 },
45
+ contextWindow: 202_752,
46
+ maxOutput: 131_072,
47
47
  modalities: { input: ["text"], output: ["text"] },
48
48
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: true },
49
49
  },
@@ -53,8 +53,8 @@ export const TOGETHERAI_MODELS = [
53
53
  provider: "togetherai",
54
54
  family: "rnj",
55
55
  pricing: { input: 1.5e-7, output: 1.5e-7 },
56
- contextWindow: 32768,
57
- maxOutput: 32768,
56
+ contextWindow: 32_768,
57
+ maxOutput: 32_768,
58
58
  modalities: { input: ["text"], output: ["text"] },
59
59
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
60
60
  },
@@ -63,9 +63,9 @@ export const TOGETHERAI_MODELS = [
63
63
  name: "MiniMax-M2.5",
64
64
  provider: "togetherai",
65
65
  family: "minimax",
66
- pricing: { input: 3e-7, output: 0.0000012, cacheRead: 6e-8 },
67
- contextWindow: 204800,
68
- maxOutput: 131072,
66
+ pricing: { input: 3e-7, output: 0.000_001_2, cacheRead: 6e-8 },
67
+ contextWindow: 204_800,
68
+ maxOutput: 131_072,
69
69
  modalities: { input: ["text"], output: ["text"] },
70
70
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
71
71
  },
@@ -74,9 +74,9 @@ export const TOGETHERAI_MODELS = [
74
74
  name: "DeepSeek V3.1",
75
75
  provider: "togetherai",
76
76
  family: "deepseek",
77
- pricing: { input: 6e-7, output: 0.0000017 },
78
- contextWindow: 131072,
79
- maxOutput: 131072,
77
+ pricing: { input: 6e-7, output: 0.000_001_7 },
78
+ contextWindow: 131_072,
79
+ maxOutput: 131_072,
80
80
  modalities: { input: ["text"], output: ["text"] },
81
81
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
82
82
  },
@@ -85,9 +85,9 @@ export const TOGETHERAI_MODELS = [
85
85
  name: "DeepSeek R1",
86
86
  provider: "togetherai",
87
87
  family: "deepseek-thinking",
88
- pricing: { input: 0.000003, output: 0.000007 },
89
- contextWindow: 163839,
90
- maxOutput: 163839,
88
+ pricing: { input: 0.000_003, output: 0.000_007 },
89
+ contextWindow: 163_839,
90
+ maxOutput: 163_839,
91
91
  modalities: { input: ["text"], output: ["text"] },
92
92
  capabilities: { reasoning: true, toolCall: false, attachment: false, structuredOutput: false },
93
93
  },
@@ -96,9 +96,9 @@ export const TOGETHERAI_MODELS = [
96
96
  name: "DeepSeek V3",
97
97
  provider: "togetherai",
98
98
  family: "deepseek",
99
- pricing: { input: 0.00000125, output: 0.00000125 },
100
- contextWindow: 131072,
101
- maxOutput: 131072,
99
+ pricing: { input: 0.000_001_25, output: 0.000_001_25 },
100
+ contextWindow: 131_072,
101
+ maxOutput: 131_072,
102
102
  modalities: { input: ["text"], output: ["text"] },
103
103
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
104
104
  },
@@ -107,9 +107,9 @@ export const TOGETHERAI_MODELS = [
107
107
  name: "Kimi K2 Instruct",
108
108
  provider: "togetherai",
109
109
  family: "kimi",
110
- pricing: { input: 0.000001, output: 0.000003 },
111
- contextWindow: 131072,
112
- maxOutput: 131072,
110
+ pricing: { input: 0.000_001, output: 0.000_003 },
111
+ contextWindow: 131_072,
112
+ maxOutput: 131_072,
113
113
  modalities: { input: ["text"], output: ["text"] },
114
114
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
115
115
  },
@@ -118,9 +118,9 @@ export const TOGETHERAI_MODELS = [
118
118
  name: "Kimi K2.5",
119
119
  provider: "togetherai",
120
120
  family: "kimi",
121
- pricing: { input: 5e-7, output: 0.0000028 },
122
- contextWindow: 262144,
123
- maxOutput: 262144,
121
+ pricing: { input: 5e-7, output: 0.000_002_8 },
122
+ contextWindow: 262_144,
123
+ maxOutput: 262_144,
124
124
  modalities: { input: ["text", "image"], output: ["text"] },
125
125
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
126
126
  },
@@ -130,8 +130,8 @@ export const TOGETHERAI_MODELS = [
130
130
  provider: "togetherai",
131
131
  family: "llama",
132
132
  pricing: { input: 8.8e-7, output: 8.8e-7 },
133
- contextWindow: 131072,
134
- maxOutput: 131072,
133
+ contextWindow: 131_072,
134
+ maxOutput: 131_072,
135
135
  modalities: { input: ["text"], output: ["text"] },
136
136
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
137
137
  },
@@ -140,9 +140,9 @@ export const TOGETHERAI_MODELS = [
140
140
  name: "Qwen3-Next-80B-A3B-Instruct",
141
141
  provider: "togetherai",
142
142
  family: "qwen",
143
- pricing: { input: 1.5e-7, output: 0.0000015 },
144
- contextWindow: 262144,
145
- maxOutput: 262144,
143
+ pricing: { input: 1.5e-7, output: 0.000_001_5 },
144
+ contextWindow: 262_144,
145
+ maxOutput: 262_144,
146
146
  modalities: { input: ["text"], output: ["text"] },
147
147
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
148
148
  },
@@ -152,8 +152,8 @@ export const TOGETHERAI_MODELS = [
152
152
  provider: "togetherai",
153
153
  family: "qwen",
154
154
  pricing: { input: 2e-7, output: 6e-7 },
155
- contextWindow: 262144,
156
- maxOutput: 262144,
155
+ contextWindow: 262_144,
156
+ maxOutput: 262_144,
157
157
  modalities: { input: ["text"], output: ["text"] },
158
158
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
159
159
  },
@@ -162,9 +162,9 @@ export const TOGETHERAI_MODELS = [
162
162
  name: "Qwen3.5 397B A17B",
163
163
  provider: "togetherai",
164
164
  family: "qwen",
165
- pricing: { input: 6e-7, output: 0.0000036 },
166
- contextWindow: 262144,
167
- maxOutput: 130000,
165
+ pricing: { input: 6e-7, output: 0.000_003_6 },
166
+ contextWindow: 262_144,
167
+ maxOutput: 130_000,
168
168
  modalities: { input: ["text", "image"], output: ["text"] },
169
169
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
170
170
  },
@@ -173,9 +173,9 @@ export const TOGETHERAI_MODELS = [
173
173
  name: "Qwen3 Coder Next FP8",
174
174
  provider: "togetherai",
175
175
  family: "qwen",
176
- pricing: { input: 5e-7, output: 0.0000012 },
177
- contextWindow: 262144,
178
- maxOutput: 262144,
176
+ pricing: { input: 5e-7, output: 0.000_001_2 },
177
+ contextWindow: 262_144,
178
+ maxOutput: 262_144,
179
179
  modalities: { input: ["text"], output: ["text"] },
180
180
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
181
181
  },
@@ -184,9 +184,9 @@ export const TOGETHERAI_MODELS = [
184
184
  name: "Qwen3 Coder 480B A35B Instruct",
185
185
  provider: "togetherai",
186
186
  family: "qwen",
187
- pricing: { input: 0.000002, output: 0.000002 },
188
- contextWindow: 262144,
189
- maxOutput: 262144,
187
+ pricing: { input: 0.000_002, output: 0.000_002 },
188
+ contextWindow: 262_144,
189
+ maxOutput: 262_144,
190
190
  modalities: { input: ["text"], output: ["text"] },
191
191
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
192
192
  },
@@ -196,8 +196,8 @@ export const TOGETHERAI_MODELS = [
196
196
  provider: "togetherai",
197
197
  family: "gpt-oss",
198
198
  pricing: { input: 1.5e-7, output: 6e-7 },
199
- contextWindow: 131072,
200
- maxOutput: 131072,
199
+ contextWindow: 131_072,
200
+ maxOutput: 131_072,
201
201
  modalities: { input: ["text"], output: ["text"] },
202
202
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
203
203
  },
@@ -19,8 +19,8 @@ export const XAI_MODELS = [
19
19
  name: "Grok 2 (1212)",
20
20
  provider: "xai",
21
21
  family: "grok",
22
- pricing: { input: 0.000002, output: 0.00001, cacheRead: 0.000002 },
23
- contextWindow: 131072,
22
+ pricing: { input: 0.000_002, output: 0.000_01, cacheRead: 0.000_002 },
23
+ contextWindow: 131_072,
24
24
  maxOutput: 8192,
25
25
  modalities: { input: ["text"], output: ["text"] },
26
26
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
@@ -30,9 +30,9 @@ export const XAI_MODELS = [
30
30
  name: "Grok 4.20 Beta (Non-Reasoning)",
31
31
  provider: "xai",
32
32
  family: "grok",
33
- pricing: { input: 0.000002, output: 0.000006, cacheRead: 2e-7 },
34
- contextWindow: 2000000,
35
- maxOutput: 30000,
33
+ pricing: { input: 0.000_002, output: 0.000_006, cacheRead: 2e-7 },
34
+ contextWindow: 2_000_000,
35
+ maxOutput: 30_000,
36
36
  modalities: { input: ["text", "image"], output: ["text"] },
37
37
  capabilities: { reasoning: false, toolCall: true, attachment: true, structuredOutput: false },
38
38
  },
@@ -41,8 +41,8 @@ export const XAI_MODELS = [
41
41
  name: "Grok 2",
42
42
  provider: "xai",
43
43
  family: "grok",
44
- pricing: { input: 0.000002, output: 0.00001, cacheRead: 0.000002 },
45
- contextWindow: 131072,
44
+ pricing: { input: 0.000_002, output: 0.000_01, cacheRead: 0.000_002 },
45
+ contextWindow: 131_072,
46
46
  maxOutput: 8192,
47
47
  modalities: { input: ["text"], output: ["text"] },
48
48
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
@@ -52,8 +52,8 @@ export const XAI_MODELS = [
52
52
  name: "Grok 3 Fast Latest",
53
53
  provider: "xai",
54
54
  family: "grok",
55
- pricing: { input: 0.000005, output: 0.000025, cacheRead: 0.00000125 },
56
- contextWindow: 131072,
55
+ pricing: { input: 0.000_005, output: 0.000_025, cacheRead: 0.000_001_25 },
56
+ contextWindow: 131_072,
57
57
  maxOutput: 8192,
58
58
  modalities: { input: ["text"], output: ["text"] },
59
59
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
@@ -63,7 +63,7 @@ export const XAI_MODELS = [
63
63
  name: "Grok 2 Vision",
64
64
  provider: "xai",
65
65
  family: "grok",
66
- pricing: { input: 0.000002, output: 0.00001, cacheRead: 0.000002 },
66
+ pricing: { input: 0.000_002, output: 0.000_01, cacheRead: 0.000_002 },
67
67
  contextWindow: 8192,
68
68
  maxOutput: 4096,
69
69
  modalities: { input: ["text", "image"], output: ["text"] },
@@ -74,8 +74,8 @@ export const XAI_MODELS = [
74
74
  name: "Grok 3",
75
75
  provider: "xai",
76
76
  family: "grok",
77
- pricing: { input: 0.000003, output: 0.000015, cacheRead: 7.5e-7 },
78
- contextWindow: 131072,
77
+ pricing: { input: 0.000_003, output: 0.000_015, cacheRead: 7.5e-7 },
78
+ contextWindow: 131_072,
79
79
  maxOutput: 8192,
80
80
  modalities: { input: ["text"], output: ["text"] },
81
81
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
@@ -85,9 +85,9 @@ export const XAI_MODELS = [
85
85
  name: "Grok Code Fast 1",
86
86
  provider: "xai",
87
87
  family: "grok",
88
- pricing: { input: 2e-7, output: 0.0000015, cacheRead: 2e-8 },
89
- contextWindow: 256000,
90
- maxOutput: 10000,
88
+ pricing: { input: 2e-7, output: 0.000_001_5, cacheRead: 2e-8 },
89
+ contextWindow: 256_000,
90
+ maxOutput: 10_000,
91
91
  modalities: { input: ["text"], output: ["text"] },
92
92
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
93
93
  },
@@ -96,7 +96,7 @@ export const XAI_MODELS = [
96
96
  name: "Grok 2 Vision (1212)",
97
97
  provider: "xai",
98
98
  family: "grok",
99
- pricing: { input: 0.000002, output: 0.00001, cacheRead: 0.000002 },
99
+ pricing: { input: 0.000_002, output: 0.000_01, cacheRead: 0.000_002 },
100
100
  contextWindow: 8192,
101
101
  maxOutput: 4096,
102
102
  modalities: { input: ["text", "image"], output: ["text"] },
@@ -108,8 +108,8 @@ export const XAI_MODELS = [
108
108
  provider: "xai",
109
109
  family: "grok",
110
110
  pricing: { input: 2e-7, output: 5e-7, cacheRead: 5e-8 },
111
- contextWindow: 2000000,
112
- maxOutput: 30000,
111
+ contextWindow: 2_000_000,
112
+ maxOutput: 30_000,
113
113
  modalities: { input: ["text", "image"], output: ["text"] },
114
114
  capabilities: { reasoning: false, toolCall: true, attachment: true, structuredOutput: false },
115
115
  },
@@ -118,8 +118,8 @@ export const XAI_MODELS = [
118
118
  name: "Grok Beta",
119
119
  provider: "xai",
120
120
  family: "grok-beta",
121
- pricing: { input: 0.000005, output: 0.000015, cacheRead: 0.000005 },
122
- contextWindow: 131072,
121
+ pricing: { input: 0.000_005, output: 0.000_015, cacheRead: 0.000_005 },
122
+ contextWindow: 131_072,
123
123
  maxOutput: 4096,
124
124
  modalities: { input: ["text"], output: ["text"] },
125
125
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
@@ -129,8 +129,8 @@ export const XAI_MODELS = [
129
129
  name: "Grok 3 Mini Fast",
130
130
  provider: "xai",
131
131
  family: "grok",
132
- pricing: { input: 6e-7, output: 0.000004, cacheRead: 1.5e-7, reasoning: 0.000004 },
133
- contextWindow: 131072,
132
+ pricing: { input: 6e-7, output: 0.000_004, cacheRead: 1.5e-7, reasoning: 0.000_004 },
133
+ contextWindow: 131_072,
134
134
  maxOutput: 8192,
135
135
  modalities: { input: ["text"], output: ["text"] },
136
136
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
@@ -141,8 +141,8 @@ export const XAI_MODELS = [
141
141
  provider: "xai",
142
142
  family: "grok",
143
143
  pricing: { input: 2e-7, output: 5e-7, cacheRead: 5e-8 },
144
- contextWindow: 2000000,
145
- maxOutput: 30000,
144
+ contextWindow: 2_000_000,
145
+ maxOutput: 30_000,
146
146
  modalities: { input: ["text", "image"], output: ["text"] },
147
147
  capabilities: { reasoning: true, toolCall: true, attachment: true, structuredOutput: false },
148
148
  },
@@ -151,9 +151,9 @@ export const XAI_MODELS = [
151
151
  name: "Grok 4",
152
152
  provider: "xai",
153
153
  family: "grok",
154
- pricing: { input: 0.000003, output: 0.000015, cacheRead: 7.5e-7, reasoning: 0.000015 },
155
- contextWindow: 256000,
156
- maxOutput: 64000,
154
+ pricing: { input: 0.000_003, output: 0.000_015, cacheRead: 7.5e-7, reasoning: 0.000_015 },
155
+ contextWindow: 256_000,
156
+ maxOutput: 64_000,
157
157
  modalities: { input: ["text"], output: ["text"] },
158
158
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
159
159
  },
@@ -162,9 +162,9 @@ export const XAI_MODELS = [
162
162
  name: "Grok 4.20 Multi-Agent Beta",
163
163
  provider: "xai",
164
164
  family: "grok",
165
- pricing: { input: 0.000002, output: 0.000006, cacheRead: 2e-7 },
166
- contextWindow: 2000000,
167
- maxOutput: 30000,
165
+ pricing: { input: 0.000_002, output: 0.000_006, cacheRead: 2e-7 },
166
+ contextWindow: 2_000_000,
167
+ maxOutput: 30_000,
168
168
  modalities: { input: ["text", "image"], output: ["text"] },
169
169
  capabilities: { reasoning: true, toolCall: true, attachment: true, structuredOutput: false },
170
170
  },
@@ -173,8 +173,8 @@ export const XAI_MODELS = [
173
173
  name: "Grok 3 Latest",
174
174
  provider: "xai",
175
175
  family: "grok",
176
- pricing: { input: 0.000003, output: 0.000015, cacheRead: 7.5e-7 },
177
- contextWindow: 131072,
176
+ pricing: { input: 0.000_003, output: 0.000_015, cacheRead: 7.5e-7 },
177
+ contextWindow: 131_072,
178
178
  maxOutput: 8192,
179
179
  modalities: { input: ["text"], output: ["text"] },
180
180
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
@@ -185,8 +185,8 @@ export const XAI_MODELS = [
185
185
  provider: "xai",
186
186
  family: "grok",
187
187
  pricing: { input: 2e-7, output: 5e-7, cacheRead: 5e-8 },
188
- contextWindow: 2000000,
189
- maxOutput: 30000,
188
+ contextWindow: 2_000_000,
189
+ maxOutput: 30_000,
190
190
  modalities: { input: ["text", "image"], output: ["text"] },
191
191
  capabilities: { reasoning: true, toolCall: true, attachment: true, structuredOutput: false },
192
192
  },
@@ -195,7 +195,7 @@ export const XAI_MODELS = [
195
195
  name: "Grok 2 Vision Latest",
196
196
  provider: "xai",
197
197
  family: "grok",
198
- pricing: { input: 0.000002, output: 0.00001, cacheRead: 0.000002 },
198
+ pricing: { input: 0.000_002, output: 0.000_01, cacheRead: 0.000_002 },
199
199
  contextWindow: 8192,
200
200
  maxOutput: 4096,
201
201
  modalities: { input: ["text", "image"], output: ["text"] },
@@ -207,7 +207,7 @@ export const XAI_MODELS = [
207
207
  provider: "xai",
208
208
  family: "grok",
209
209
  pricing: { input: 3e-7, output: 5e-7, cacheRead: 7.5e-8, reasoning: 5e-7 },
210
- contextWindow: 131072,
210
+ contextWindow: 131_072,
211
211
  maxOutput: 8192,
212
212
  modalities: { input: ["text"], output: ["text"] },
213
213
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
@@ -218,7 +218,7 @@ export const XAI_MODELS = [
218
218
  provider: "xai",
219
219
  family: "grok",
220
220
  pricing: { input: 3e-7, output: 5e-7, cacheRead: 7.5e-8, reasoning: 5e-7 },
221
- contextWindow: 131072,
221
+ contextWindow: 131_072,
222
222
  maxOutput: 8192,
223
223
  modalities: { input: ["text"], output: ["text"] },
224
224
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
@@ -228,8 +228,8 @@ export const XAI_MODELS = [
228
228
  name: "Grok 3 Mini Fast Latest",
229
229
  provider: "xai",
230
230
  family: "grok",
231
- pricing: { input: 6e-7, output: 0.000004, cacheRead: 1.5e-7, reasoning: 0.000004 },
232
- contextWindow: 131072,
231
+ pricing: { input: 6e-7, output: 0.000_004, cacheRead: 1.5e-7, reasoning: 0.000_004 },
232
+ contextWindow: 131_072,
233
233
  maxOutput: 8192,
234
234
  modalities: { input: ["text"], output: ["text"] },
235
235
  capabilities: { reasoning: true, toolCall: true, attachment: false, structuredOutput: false },
@@ -239,8 +239,8 @@ export const XAI_MODELS = [
239
239
  name: "Grok 2 Latest",
240
240
  provider: "xai",
241
241
  family: "grok",
242
- pricing: { input: 0.000002, output: 0.00001, cacheRead: 0.000002 },
243
- contextWindow: 131072,
242
+ pricing: { input: 0.000_002, output: 0.000_01, cacheRead: 0.000_002 },
243
+ contextWindow: 131_072,
244
244
  maxOutput: 8192,
245
245
  modalities: { input: ["text"], output: ["text"] },
246
246
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
@@ -251,8 +251,8 @@ export const XAI_MODELS = [
251
251
  provider: "xai",
252
252
  family: "grok",
253
253
  pricing: { input: 2e-7, output: 5e-7, cacheRead: 5e-8 },
254
- contextWindow: 2000000,
255
- maxOutput: 30000,
254
+ contextWindow: 2_000_000,
255
+ maxOutput: 30_000,
256
256
  modalities: { input: ["text", "image"], output: ["text"] },
257
257
  capabilities: { reasoning: false, toolCall: true, attachment: true, structuredOutput: false },
258
258
  },
@@ -261,7 +261,7 @@ export const XAI_MODELS = [
261
261
  name: "Grok Vision Beta",
262
262
  provider: "xai",
263
263
  family: "grok-vision",
264
- pricing: { input: 0.000005, output: 0.000015, cacheRead: 0.000005 },
264
+ pricing: { input: 0.000_005, output: 0.000_015, cacheRead: 0.000_005 },
265
265
  contextWindow: 8192,
266
266
  maxOutput: 4096,
267
267
  modalities: { input: ["text", "image"], output: ["text"] },
@@ -272,8 +272,8 @@ export const XAI_MODELS = [
272
272
  name: "Grok 3 Fast",
273
273
  provider: "xai",
274
274
  family: "grok",
275
- pricing: { input: 0.000005, output: 0.000025, cacheRead: 0.00000125 },
276
- contextWindow: 131072,
275
+ pricing: { input: 0.000_005, output: 0.000_025, cacheRead: 0.000_001_25 },
276
+ contextWindow: 131_072,
277
277
  maxOutput: 8192,
278
278
  modalities: { input: ["text"], output: ["text"] },
279
279
  capabilities: { reasoning: false, toolCall: true, attachment: false, structuredOutput: false },
@@ -283,9 +283,9 @@ export const XAI_MODELS = [
283
283
  name: "Grok 4.20 Beta (Reasoning)",
284
284
  provider: "xai",
285
285
  family: "grok",
286
- pricing: { input: 0.000002, output: 0.000006, cacheRead: 2e-7 },
287
- contextWindow: 2000000,
288
- maxOutput: 30000,
286
+ pricing: { input: 0.000_002, output: 0.000_006, cacheRead: 2e-7 },
287
+ contextWindow: 2_000_000,
288
+ maxOutput: 30_000,
289
289
  modalities: { input: ["text", "image"], output: ["text"] },
290
290
  capabilities: { reasoning: true, toolCall: true, attachment: true, structuredOutput: false },
291
291
  },
@@ -6,19 +6,29 @@
6
6
  * can multiply directly.
7
7
  */
8
8
  export interface ModelPricing {
9
- /** Cost per input token. */
9
+ /**
10
+ * Cost per input token.
11
+ */
10
12
  readonly input: number;
11
13
 
12
- /** Cost per output token. */
14
+ /**
15
+ * Cost per output token.
16
+ */
13
17
  readonly output: number;
14
18
 
15
- /** Cost per cached input token (read). */
19
+ /**
20
+ * Cost per cached input token (read).
21
+ */
16
22
  readonly cacheRead?: number;
17
23
 
18
- /** Cost per cached input token (write). */
24
+ /**
25
+ * Cost per cached input token (write).
26
+ */
19
27
  readonly cacheWrite?: number;
20
28
 
21
- /** Cost per reasoning token. */
29
+ /**
30
+ * Cost per reasoning token.
31
+ */
22
32
  readonly reasoning?: number;
23
33
  }
24
34
 
@@ -29,10 +39,14 @@ export interface ModelPricing {
29
39
  * `"image"`, `"audio"`, `"video"`, `"pdf"`).
30
40
  */
31
41
  export interface ModelModalities {
32
- /** Accepted input modalities. */
42
+ /**
43
+ * Accepted input modalities.
44
+ */
33
45
  readonly input: readonly string[];
34
46
 
35
- /** Produced output modalities. */
47
+ /**
48
+ * Produced output modalities.
49
+ */
36
50
  readonly output: readonly string[];
37
51
  }
38
52
 
@@ -40,16 +54,24 @@ export interface ModelModalities {
40
54
  * Boolean capability flags for a model.
41
55
  */
42
56
  export interface ModelCapabilities {
43
- /** Supports chain-of-thought / extended thinking. */
57
+ /**
58
+ * Supports chain-of-thought / extended thinking.
59
+ */
44
60
  readonly reasoning: boolean;
45
61
 
46
- /** Supports tool (function) calling. */
62
+ /**
63
+ * Supports tool (function) calling.
64
+ */
47
65
  readonly toolCall: boolean;
48
66
 
49
- /** Supports file/image attachments. */
67
+ /**
68
+ * Supports file/image attachments.
69
+ */
50
70
  readonly attachment: boolean;
51
71
 
52
- /** Supports structured (JSON) output. */
72
+ /**
73
+ * Supports structured (JSON) output.
74
+ */
53
75
  readonly structuredOutput: boolean;
54
76
  }
55
77
 
@@ -57,30 +79,48 @@ export interface ModelCapabilities {
57
79
  * Model definition with metadata, pricing, and capabilities.
58
80
  */
59
81
  export interface ModelDefinition {
60
- /** Provider-native model identifier (e.g. `"gpt-4.1"`, `"claude-sonnet-4"`). */
82
+ /**
83
+ * Provider-native model identifier (e.g. `"gpt-4.1"`, `"claude-sonnet-4"`).
84
+ */
61
85
  readonly id: string;
62
86
 
63
- /** Human-readable display name (e.g. `"GPT-4.1"`). */
87
+ /**
88
+ * Human-readable display name (e.g. `"GPT-4.1"`).
89
+ */
64
90
  readonly name: string;
65
91
 
66
- /** Provider slug matching the key in `providers.json` (e.g. `"openai"`). */
92
+ /**
93
+ * Provider slug matching the key in `providers.json` (e.g. `"openai"`).
94
+ */
67
95
  readonly provider: string;
68
96
 
69
- /** Model family (e.g. `"gpt"`, `"claude-sonnet"`). */
97
+ /**
98
+ * Model family (e.g. `"gpt"`, `"claude-sonnet"`).
99
+ */
70
100
  readonly family: string;
71
101
 
72
- /** Token pricing rates (per-token, converted from per-million at generation time). */
102
+ /**
103
+ * Token pricing rates (per-token, converted from per-million at generation time).
104
+ */
73
105
  readonly pricing: ModelPricing;
74
106
 
75
- /** Maximum context window size in tokens. */
107
+ /**
108
+ * Maximum context window size in tokens.
109
+ */
76
110
  readonly contextWindow: number;
77
111
 
78
- /** Maximum output tokens. */
112
+ /**
113
+ * Maximum output tokens.
114
+ */
79
115
  readonly maxOutput: number;
80
116
 
81
- /** Supported input/output modalities. */
117
+ /**
118
+ * Supported input/output modalities.
119
+ */
82
120
  readonly modalities: ModelModalities;
83
121
 
84
- /** Model capability flags. */
122
+ /**
123
+ * Model capability flags.
124
+ */
85
125
  readonly capabilities: ModelCapabilities;
86
126
  }