@funkai/models 0.1.0
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.
- package/.generated/entries.json +23 -0
- package/.generated/req.txt +1 -0
- package/.turbo/turbo-build.log +145 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/CHANGELOG.md +23 -0
- package/README.md +95 -0
- package/dist/alibaba-B6q4Ng1R.mjs +957 -0
- package/dist/alibaba-B6q4Ng1R.mjs.map +1 -0
- package/dist/amazon-bedrock-Cv9AHQBH.mjs +2070 -0
- package/dist/amazon-bedrock-Cv9AHQBH.mjs.map +1 -0
- package/dist/anthropic-yB7ST97_.mjs +651 -0
- package/dist/anthropic-yB7ST97_.mjs.map +1 -0
- package/dist/cerebras-COfl7XM-.mjs +95 -0
- package/dist/cerebras-COfl7XM-.mjs.map +1 -0
- package/dist/cohere-B7TgO0hT.mjs +271 -0
- package/dist/cohere-B7TgO0hT.mjs.map +1 -0
- package/dist/deepinfra-B0GxUwCG.mjs +636 -0
- package/dist/deepinfra-B0GxUwCG.mjs.map +1 -0
- package/dist/deepseek-D64ZEsvS.mjs +50 -0
- package/dist/deepseek-D64ZEsvS.mjs.map +1 -0
- package/dist/fireworks-ai-DJYvdAi_.mjs +304 -0
- package/dist/fireworks-ai-DJYvdAi_.mjs.map +1 -0
- package/dist/google-BypRl349.mjs +833 -0
- package/dist/google-BypRl349.mjs.map +1 -0
- package/dist/google-vertex-DbS-zTGD.mjs +730 -0
- package/dist/google-vertex-DbS-zTGD.mjs.map +1 -0
- package/dist/groq-ei_PerYi.mjs +381 -0
- package/dist/groq-ei_PerYi.mjs.map +1 -0
- package/dist/huggingface-DaM1EeLP.mjs +456 -0
- package/dist/huggingface-DaM1EeLP.mjs.map +1 -0
- package/dist/inception-CspEzqNV.mjs +101 -0
- package/dist/inception-CspEzqNV.mjs.map +1 -0
- package/dist/index.d.mts +30314 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +271 -0
- package/dist/index.mjs.map +1 -0
- package/dist/llama-Cf3-koap.mjs +161 -0
- package/dist/llama-Cf3-koap.mjs.map +1 -0
- package/dist/mistral-BI9MdAO4.mjs +579 -0
- package/dist/mistral-BI9MdAO4.mjs.map +1 -0
- package/dist/nvidia-COHacuoa.mjs +1625 -0
- package/dist/nvidia-COHacuoa.mjs.map +1 -0
- package/dist/openai-C0nCfZUq.mjs +1023 -0
- package/dist/openai-C0nCfZUq.mjs.map +1 -0
- package/dist/openrouter-DSFzxKQb.mjs +4608 -0
- package/dist/openrouter-DSFzxKQb.mjs.map +1 -0
- package/dist/perplexity-zeZ2WlBU.mjs +96 -0
- package/dist/perplexity-zeZ2WlBU.mjs.map +1 -0
- package/dist/providers/alibaba.d.mts +1795 -0
- package/dist/providers/alibaba.d.mts.map +1 -0
- package/dist/providers/alibaba.mjs +39 -0
- package/dist/providers/alibaba.mjs.map +1 -0
- package/dist/providers/amazon-bedrock.d.mts +3713 -0
- package/dist/providers/amazon-bedrock.d.mts.map +1 -0
- package/dist/providers/amazon-bedrock.mjs +39 -0
- package/dist/providers/amazon-bedrock.mjs.map +1 -0
- package/dist/providers/anthropic.d.mts +1109 -0
- package/dist/providers/anthropic.d.mts.map +1 -0
- package/dist/providers/anthropic.mjs +39 -0
- package/dist/providers/anthropic.mjs.map +1 -0
- package/dist/providers/cerebras.d.mts +219 -0
- package/dist/providers/cerebras.d.mts.map +1 -0
- package/dist/providers/cerebras.mjs +39 -0
- package/dist/providers/cerebras.mjs.map +1 -0
- package/dist/providers/cohere.d.mts +555 -0
- package/dist/providers/cohere.d.mts.map +1 -0
- package/dist/providers/cohere.mjs +39 -0
- package/dist/providers/cohere.mjs.map +1 -0
- package/dist/providers/deepinfra.d.mts +1245 -0
- package/dist/providers/deepinfra.d.mts.map +1 -0
- package/dist/providers/deepinfra.mjs +39 -0
- package/dist/providers/deepinfra.mjs.map +1 -0
- package/dist/providers/deepseek.d.mts +139 -0
- package/dist/providers/deepseek.d.mts.map +1 -0
- package/dist/providers/deepseek.mjs +39 -0
- package/dist/providers/deepseek.mjs.map +1 -0
- package/dist/providers/fireworks-ai.d.mts +611 -0
- package/dist/providers/fireworks-ai.d.mts.map +1 -0
- package/dist/providers/fireworks-ai.mjs +39 -0
- package/dist/providers/fireworks-ai.mjs.map +1 -0
- package/dist/providers/google-vertex.d.mts +1227 -0
- package/dist/providers/google-vertex.d.mts.map +1 -0
- package/dist/providers/google-vertex.mjs +39 -0
- package/dist/providers/google-vertex.mjs.map +1 -0
- package/dist/providers/google.d.mts +1359 -0
- package/dist/providers/google.d.mts.map +1 -0
- package/dist/providers/google.mjs +39 -0
- package/dist/providers/google.mjs.map +1 -0
- package/dist/providers/groq.d.mts +765 -0
- package/dist/providers/groq.d.mts.map +1 -0
- package/dist/providers/groq.mjs +39 -0
- package/dist/providers/groq.mjs.map +1 -0
- package/dist/providers/huggingface.d.mts +901 -0
- package/dist/providers/huggingface.d.mts.map +1 -0
- package/dist/providers/huggingface.mjs +39 -0
- package/dist/providers/huggingface.mjs.map +1 -0
- package/dist/providers/inception.d.mts +231 -0
- package/dist/providers/inception.d.mts.map +1 -0
- package/dist/providers/inception.mjs +39 -0
- package/dist/providers/inception.mjs.map +1 -0
- package/dist/providers/llama.d.mts +345 -0
- package/dist/providers/llama.d.mts.map +1 -0
- package/dist/providers/llama.mjs +39 -0
- package/dist/providers/llama.mjs.map +1 -0
- package/dist/providers/mistral.d.mts +1143 -0
- package/dist/providers/mistral.d.mts.map +1 -0
- package/dist/providers/mistral.mjs +39 -0
- package/dist/providers/mistral.mjs.map +1 -0
- package/dist/providers/nvidia.d.mts +3117 -0
- package/dist/providers/nvidia.d.mts.map +1 -0
- package/dist/providers/nvidia.mjs +39 -0
- package/dist/providers/nvidia.mjs.map +1 -0
- package/dist/providers/openai.d.mts +1963 -0
- package/dist/providers/openai.d.mts.map +1 -0
- package/dist/providers/openai.mjs +39 -0
- package/dist/providers/openai.mjs.map +1 -0
- package/dist/providers/openrouter.d.mts +8531 -0
- package/dist/providers/openrouter.d.mts.map +1 -0
- package/dist/providers/openrouter.mjs +39 -0
- package/dist/providers/openrouter.mjs.map +1 -0
- package/dist/providers/perplexity.d.mts +221 -0
- package/dist/providers/perplexity.d.mts.map +1 -0
- package/dist/providers/perplexity.mjs +39 -0
- package/dist/providers/perplexity.mjs.map +1 -0
- package/dist/providers/togetherai.d.mts +767 -0
- package/dist/providers/togetherai.d.mts.map +1 -0
- package/dist/providers/togetherai.mjs +39 -0
- package/dist/providers/togetherai.mjs.map +1 -0
- package/dist/providers/xai.d.mts +1161 -0
- package/dist/providers/xai.d.mts.map +1 -0
- package/dist/providers/xai.mjs +39 -0
- package/dist/providers/xai.mjs.map +1 -0
- package/dist/togetherai-BvcxUfPE.mjs +382 -0
- package/dist/togetherai-BvcxUfPE.mjs.map +1 -0
- package/dist/types-DjdaZckF.d.mts +71 -0
- package/dist/types-DjdaZckF.d.mts.map +1 -0
- package/dist/xai-fSuAkQJo.mjs +587 -0
- package/dist/xai-fSuAkQJo.mjs.map +1 -0
- package/docs/catalog/filtering.md +102 -0
- package/docs/catalog/overview.md +168 -0
- package/docs/catalog/providers.md +73 -0
- package/docs/cost/overview.md +125 -0
- package/docs/guides/filter-models.md +113 -0
- package/docs/guides/setup-resolver.md +106 -0
- package/docs/guides/track-costs.md +133 -0
- package/docs/overview.md +139 -0
- package/docs/provider/configuration.md +100 -0
- package/docs/provider/openrouter.md +105 -0
- package/docs/provider/overview.md +131 -0
- package/docs/troubleshooting.md +100 -0
- package/package.json +142 -0
- package/providers.json +39 -0
- package/scripts/generate-models.ts +392 -0
- package/src/catalog/index.test.ts +124 -0
- package/src/catalog/index.ts +65 -0
- package/src/catalog/providers/alibaba.ts +468 -0
- package/src/catalog/providers/amazon-bedrock.ts +941 -0
- package/src/catalog/providers/anthropic.ts +270 -0
- package/src/catalog/providers/cerebras.ts +61 -0
- package/src/catalog/providers/cohere.ts +149 -0
- package/src/catalog/providers/deepinfra.ts +325 -0
- package/src/catalog/providers/deepseek.ts +39 -0
- package/src/catalog/providers/fireworks-ai.ts +160 -0
- package/src/catalog/providers/google-vertex.ts +314 -0
- package/src/catalog/providers/google.ts +347 -0
- package/src/catalog/providers/groq.ts +204 -0
- package/src/catalog/providers/huggingface.ts +237 -0
- package/src/catalog/providers/inception.ts +61 -0
- package/src/catalog/providers/index.ts +59 -0
- package/src/catalog/providers/llama.ts +94 -0
- package/src/catalog/providers/mistral.ts +303 -0
- package/src/catalog/providers/nvidia.ts +820 -0
- package/src/catalog/providers/openai.ts +501 -0
- package/src/catalog/providers/openrouter.ts +2201 -0
- package/src/catalog/providers/perplexity.ts +61 -0
- package/src/catalog/providers/togetherai.ts +204 -0
- package/src/catalog/providers/xai.ts +292 -0
- package/src/catalog/types.ts +86 -0
- package/src/cost/calculate.test.ts +157 -0
- package/src/cost/calculate.ts +43 -0
- package/src/cost/index.ts +2 -0
- package/src/cost/types.ts +25 -0
- package/src/index.ts +25 -0
- package/src/provider/index.ts +9 -0
- package/src/provider/openrouter.test.ts +125 -0
- package/src/provider/openrouter.ts +110 -0
- package/src/provider/resolver.test.ts +138 -0
- package/src/provider/resolver.ts +125 -0
- package/src/provider/types.ts +39 -0
- package/src/providers/alibaba.ts +65 -0
- package/src/providers/amazon-bedrock.ts +67 -0
- package/src/providers/anthropic.ts +65 -0
- package/src/providers/cerebras.ts +65 -0
- package/src/providers/cohere.ts +65 -0
- package/src/providers/deepinfra.ts +65 -0
- package/src/providers/deepseek.ts +65 -0
- package/src/providers/fireworks-ai.ts +65 -0
- package/src/providers/google-vertex.ts +67 -0
- package/src/providers/google.ts +65 -0
- package/src/providers/groq.ts +65 -0
- package/src/providers/huggingface.ts +67 -0
- package/src/providers/inception.ts +65 -0
- package/src/providers/llama.ts +65 -0
- package/src/providers/mistral.ts +65 -0
- package/src/providers/nvidia.ts +65 -0
- package/src/providers/openai.ts +65 -0
- package/src/providers/openrouter.ts +67 -0
- package/src/providers/perplexity.ts +67 -0
- package/src/providers/togetherai.ts +65 -0
- package/src/providers/xai.ts +65 -0
- package/tsconfig.json +25 -0
- package/tsdown.config.ts +23 -0
- package/vitest.config.ts +29 -0
|
@@ -0,0 +1,1161 @@
|
|
|
1
|
+
import { n as ModelDefinition } from "../types-DjdaZckF.mjs";
|
|
2
|
+
import { LiteralUnion } from "type-fest";
|
|
3
|
+
|
|
4
|
+
//#region src/catalog/providers/xai.d.ts
|
|
5
|
+
declare const XAI_MODELS: readonly [{
|
|
6
|
+
readonly id: "grok-2-1212";
|
|
7
|
+
readonly name: "Grok 2 (1212)";
|
|
8
|
+
readonly provider: "xai";
|
|
9
|
+
readonly family: "grok";
|
|
10
|
+
readonly pricing: {
|
|
11
|
+
readonly input: 0.000002;
|
|
12
|
+
readonly output: 0.00001;
|
|
13
|
+
readonly cacheRead: 0.000002;
|
|
14
|
+
};
|
|
15
|
+
readonly contextWindow: 131072;
|
|
16
|
+
readonly maxOutput: 8192;
|
|
17
|
+
readonly modalities: {
|
|
18
|
+
readonly input: readonly ["text"];
|
|
19
|
+
readonly output: readonly ["text"];
|
|
20
|
+
};
|
|
21
|
+
readonly capabilities: {
|
|
22
|
+
readonly reasoning: false;
|
|
23
|
+
readonly toolCall: true;
|
|
24
|
+
readonly attachment: false;
|
|
25
|
+
readonly structuredOutput: false;
|
|
26
|
+
};
|
|
27
|
+
}, {
|
|
28
|
+
readonly id: "grok-4.20-beta-latest-non-reasoning";
|
|
29
|
+
readonly name: "Grok 4.20 Beta (Non-Reasoning)";
|
|
30
|
+
readonly provider: "xai";
|
|
31
|
+
readonly family: "grok";
|
|
32
|
+
readonly pricing: {
|
|
33
|
+
readonly input: 0.000002;
|
|
34
|
+
readonly output: 0.000006;
|
|
35
|
+
readonly cacheRead: 2e-7;
|
|
36
|
+
};
|
|
37
|
+
readonly contextWindow: 2000000;
|
|
38
|
+
readonly maxOutput: 30000;
|
|
39
|
+
readonly modalities: {
|
|
40
|
+
readonly input: readonly ["text", "image"];
|
|
41
|
+
readonly output: readonly ["text"];
|
|
42
|
+
};
|
|
43
|
+
readonly capabilities: {
|
|
44
|
+
readonly reasoning: false;
|
|
45
|
+
readonly toolCall: true;
|
|
46
|
+
readonly attachment: true;
|
|
47
|
+
readonly structuredOutput: false;
|
|
48
|
+
};
|
|
49
|
+
}, {
|
|
50
|
+
readonly id: "grok-2";
|
|
51
|
+
readonly name: "Grok 2";
|
|
52
|
+
readonly provider: "xai";
|
|
53
|
+
readonly family: "grok";
|
|
54
|
+
readonly pricing: {
|
|
55
|
+
readonly input: 0.000002;
|
|
56
|
+
readonly output: 0.00001;
|
|
57
|
+
readonly cacheRead: 0.000002;
|
|
58
|
+
};
|
|
59
|
+
readonly contextWindow: 131072;
|
|
60
|
+
readonly maxOutput: 8192;
|
|
61
|
+
readonly modalities: {
|
|
62
|
+
readonly input: readonly ["text"];
|
|
63
|
+
readonly output: readonly ["text"];
|
|
64
|
+
};
|
|
65
|
+
readonly capabilities: {
|
|
66
|
+
readonly reasoning: false;
|
|
67
|
+
readonly toolCall: true;
|
|
68
|
+
readonly attachment: false;
|
|
69
|
+
readonly structuredOutput: false;
|
|
70
|
+
};
|
|
71
|
+
}, {
|
|
72
|
+
readonly id: "grok-3-fast-latest";
|
|
73
|
+
readonly name: "Grok 3 Fast Latest";
|
|
74
|
+
readonly provider: "xai";
|
|
75
|
+
readonly family: "grok";
|
|
76
|
+
readonly pricing: {
|
|
77
|
+
readonly input: 0.000005;
|
|
78
|
+
readonly output: 0.000025;
|
|
79
|
+
readonly cacheRead: 0.00000125;
|
|
80
|
+
};
|
|
81
|
+
readonly contextWindow: 131072;
|
|
82
|
+
readonly maxOutput: 8192;
|
|
83
|
+
readonly modalities: {
|
|
84
|
+
readonly input: readonly ["text"];
|
|
85
|
+
readonly output: readonly ["text"];
|
|
86
|
+
};
|
|
87
|
+
readonly capabilities: {
|
|
88
|
+
readonly reasoning: false;
|
|
89
|
+
readonly toolCall: true;
|
|
90
|
+
readonly attachment: false;
|
|
91
|
+
readonly structuredOutput: false;
|
|
92
|
+
};
|
|
93
|
+
}, {
|
|
94
|
+
readonly id: "grok-2-vision";
|
|
95
|
+
readonly name: "Grok 2 Vision";
|
|
96
|
+
readonly provider: "xai";
|
|
97
|
+
readonly family: "grok";
|
|
98
|
+
readonly pricing: {
|
|
99
|
+
readonly input: 0.000002;
|
|
100
|
+
readonly output: 0.00001;
|
|
101
|
+
readonly cacheRead: 0.000002;
|
|
102
|
+
};
|
|
103
|
+
readonly contextWindow: 8192;
|
|
104
|
+
readonly maxOutput: 4096;
|
|
105
|
+
readonly modalities: {
|
|
106
|
+
readonly input: readonly ["text", "image"];
|
|
107
|
+
readonly output: readonly ["text"];
|
|
108
|
+
};
|
|
109
|
+
readonly capabilities: {
|
|
110
|
+
readonly reasoning: false;
|
|
111
|
+
readonly toolCall: true;
|
|
112
|
+
readonly attachment: true;
|
|
113
|
+
readonly structuredOutput: false;
|
|
114
|
+
};
|
|
115
|
+
}, {
|
|
116
|
+
readonly id: "grok-3";
|
|
117
|
+
readonly name: "Grok 3";
|
|
118
|
+
readonly provider: "xai";
|
|
119
|
+
readonly family: "grok";
|
|
120
|
+
readonly pricing: {
|
|
121
|
+
readonly input: 0.000003;
|
|
122
|
+
readonly output: 0.000015;
|
|
123
|
+
readonly cacheRead: 7.5e-7;
|
|
124
|
+
};
|
|
125
|
+
readonly contextWindow: 131072;
|
|
126
|
+
readonly maxOutput: 8192;
|
|
127
|
+
readonly modalities: {
|
|
128
|
+
readonly input: readonly ["text"];
|
|
129
|
+
readonly output: readonly ["text"];
|
|
130
|
+
};
|
|
131
|
+
readonly capabilities: {
|
|
132
|
+
readonly reasoning: false;
|
|
133
|
+
readonly toolCall: true;
|
|
134
|
+
readonly attachment: false;
|
|
135
|
+
readonly structuredOutput: false;
|
|
136
|
+
};
|
|
137
|
+
}, {
|
|
138
|
+
readonly id: "grok-code-fast-1";
|
|
139
|
+
readonly name: "Grok Code Fast 1";
|
|
140
|
+
readonly provider: "xai";
|
|
141
|
+
readonly family: "grok";
|
|
142
|
+
readonly pricing: {
|
|
143
|
+
readonly input: 2e-7;
|
|
144
|
+
readonly output: 0.0000015;
|
|
145
|
+
readonly cacheRead: 2e-8;
|
|
146
|
+
};
|
|
147
|
+
readonly contextWindow: 256000;
|
|
148
|
+
readonly maxOutput: 10000;
|
|
149
|
+
readonly modalities: {
|
|
150
|
+
readonly input: readonly ["text"];
|
|
151
|
+
readonly output: readonly ["text"];
|
|
152
|
+
};
|
|
153
|
+
readonly capabilities: {
|
|
154
|
+
readonly reasoning: true;
|
|
155
|
+
readonly toolCall: true;
|
|
156
|
+
readonly attachment: false;
|
|
157
|
+
readonly structuredOutput: false;
|
|
158
|
+
};
|
|
159
|
+
}, {
|
|
160
|
+
readonly id: "grok-2-vision-1212";
|
|
161
|
+
readonly name: "Grok 2 Vision (1212)";
|
|
162
|
+
readonly provider: "xai";
|
|
163
|
+
readonly family: "grok";
|
|
164
|
+
readonly pricing: {
|
|
165
|
+
readonly input: 0.000002;
|
|
166
|
+
readonly output: 0.00001;
|
|
167
|
+
readonly cacheRead: 0.000002;
|
|
168
|
+
};
|
|
169
|
+
readonly contextWindow: 8192;
|
|
170
|
+
readonly maxOutput: 4096;
|
|
171
|
+
readonly modalities: {
|
|
172
|
+
readonly input: readonly ["text", "image"];
|
|
173
|
+
readonly output: readonly ["text"];
|
|
174
|
+
};
|
|
175
|
+
readonly capabilities: {
|
|
176
|
+
readonly reasoning: false;
|
|
177
|
+
readonly toolCall: true;
|
|
178
|
+
readonly attachment: true;
|
|
179
|
+
readonly structuredOutput: false;
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
readonly id: "grok-4-1-fast-non-reasoning";
|
|
183
|
+
readonly name: "Grok 4.1 Fast (Non-Reasoning)";
|
|
184
|
+
readonly provider: "xai";
|
|
185
|
+
readonly family: "grok";
|
|
186
|
+
readonly pricing: {
|
|
187
|
+
readonly input: 2e-7;
|
|
188
|
+
readonly output: 5e-7;
|
|
189
|
+
readonly cacheRead: 5e-8;
|
|
190
|
+
};
|
|
191
|
+
readonly contextWindow: 2000000;
|
|
192
|
+
readonly maxOutput: 30000;
|
|
193
|
+
readonly modalities: {
|
|
194
|
+
readonly input: readonly ["text", "image"];
|
|
195
|
+
readonly output: readonly ["text"];
|
|
196
|
+
};
|
|
197
|
+
readonly capabilities: {
|
|
198
|
+
readonly reasoning: false;
|
|
199
|
+
readonly toolCall: true;
|
|
200
|
+
readonly attachment: true;
|
|
201
|
+
readonly structuredOutput: false;
|
|
202
|
+
};
|
|
203
|
+
}, {
|
|
204
|
+
readonly id: "grok-beta";
|
|
205
|
+
readonly name: "Grok Beta";
|
|
206
|
+
readonly provider: "xai";
|
|
207
|
+
readonly family: "grok-beta";
|
|
208
|
+
readonly pricing: {
|
|
209
|
+
readonly input: 0.000005;
|
|
210
|
+
readonly output: 0.000015;
|
|
211
|
+
readonly cacheRead: 0.000005;
|
|
212
|
+
};
|
|
213
|
+
readonly contextWindow: 131072;
|
|
214
|
+
readonly maxOutput: 4096;
|
|
215
|
+
readonly modalities: {
|
|
216
|
+
readonly input: readonly ["text"];
|
|
217
|
+
readonly output: readonly ["text"];
|
|
218
|
+
};
|
|
219
|
+
readonly capabilities: {
|
|
220
|
+
readonly reasoning: false;
|
|
221
|
+
readonly toolCall: true;
|
|
222
|
+
readonly attachment: false;
|
|
223
|
+
readonly structuredOutput: false;
|
|
224
|
+
};
|
|
225
|
+
}, {
|
|
226
|
+
readonly id: "grok-3-mini-fast";
|
|
227
|
+
readonly name: "Grok 3 Mini Fast";
|
|
228
|
+
readonly provider: "xai";
|
|
229
|
+
readonly family: "grok";
|
|
230
|
+
readonly pricing: {
|
|
231
|
+
readonly input: 6e-7;
|
|
232
|
+
readonly output: 0.000004;
|
|
233
|
+
readonly cacheRead: 1.5e-7;
|
|
234
|
+
readonly reasoning: 0.000004;
|
|
235
|
+
};
|
|
236
|
+
readonly contextWindow: 131072;
|
|
237
|
+
readonly maxOutput: 8192;
|
|
238
|
+
readonly modalities: {
|
|
239
|
+
readonly input: readonly ["text"];
|
|
240
|
+
readonly output: readonly ["text"];
|
|
241
|
+
};
|
|
242
|
+
readonly capabilities: {
|
|
243
|
+
readonly reasoning: true;
|
|
244
|
+
readonly toolCall: true;
|
|
245
|
+
readonly attachment: false;
|
|
246
|
+
readonly structuredOutput: false;
|
|
247
|
+
};
|
|
248
|
+
}, {
|
|
249
|
+
readonly id: "grok-4-fast";
|
|
250
|
+
readonly name: "Grok 4 Fast";
|
|
251
|
+
readonly provider: "xai";
|
|
252
|
+
readonly family: "grok";
|
|
253
|
+
readonly pricing: {
|
|
254
|
+
readonly input: 2e-7;
|
|
255
|
+
readonly output: 5e-7;
|
|
256
|
+
readonly cacheRead: 5e-8;
|
|
257
|
+
};
|
|
258
|
+
readonly contextWindow: 2000000;
|
|
259
|
+
readonly maxOutput: 30000;
|
|
260
|
+
readonly modalities: {
|
|
261
|
+
readonly input: readonly ["text", "image"];
|
|
262
|
+
readonly output: readonly ["text"];
|
|
263
|
+
};
|
|
264
|
+
readonly capabilities: {
|
|
265
|
+
readonly reasoning: true;
|
|
266
|
+
readonly toolCall: true;
|
|
267
|
+
readonly attachment: true;
|
|
268
|
+
readonly structuredOutput: false;
|
|
269
|
+
};
|
|
270
|
+
}, {
|
|
271
|
+
readonly id: "grok-4";
|
|
272
|
+
readonly name: "Grok 4";
|
|
273
|
+
readonly provider: "xai";
|
|
274
|
+
readonly family: "grok";
|
|
275
|
+
readonly pricing: {
|
|
276
|
+
readonly input: 0.000003;
|
|
277
|
+
readonly output: 0.000015;
|
|
278
|
+
readonly cacheRead: 7.5e-7;
|
|
279
|
+
readonly reasoning: 0.000015;
|
|
280
|
+
};
|
|
281
|
+
readonly contextWindow: 256000;
|
|
282
|
+
readonly maxOutput: 64000;
|
|
283
|
+
readonly modalities: {
|
|
284
|
+
readonly input: readonly ["text"];
|
|
285
|
+
readonly output: readonly ["text"];
|
|
286
|
+
};
|
|
287
|
+
readonly capabilities: {
|
|
288
|
+
readonly reasoning: true;
|
|
289
|
+
readonly toolCall: true;
|
|
290
|
+
readonly attachment: false;
|
|
291
|
+
readonly structuredOutput: false;
|
|
292
|
+
};
|
|
293
|
+
}, {
|
|
294
|
+
readonly id: "grok-4.20-multi-agent-beta-latest";
|
|
295
|
+
readonly name: "Grok 4.20 Multi-Agent Beta";
|
|
296
|
+
readonly provider: "xai";
|
|
297
|
+
readonly family: "grok";
|
|
298
|
+
readonly pricing: {
|
|
299
|
+
readonly input: 0.000002;
|
|
300
|
+
readonly output: 0.000006;
|
|
301
|
+
readonly cacheRead: 2e-7;
|
|
302
|
+
};
|
|
303
|
+
readonly contextWindow: 2000000;
|
|
304
|
+
readonly maxOutput: 30000;
|
|
305
|
+
readonly modalities: {
|
|
306
|
+
readonly input: readonly ["text", "image"];
|
|
307
|
+
readonly output: readonly ["text"];
|
|
308
|
+
};
|
|
309
|
+
readonly capabilities: {
|
|
310
|
+
readonly reasoning: true;
|
|
311
|
+
readonly toolCall: true;
|
|
312
|
+
readonly attachment: true;
|
|
313
|
+
readonly structuredOutput: false;
|
|
314
|
+
};
|
|
315
|
+
}, {
|
|
316
|
+
readonly id: "grok-3-latest";
|
|
317
|
+
readonly name: "Grok 3 Latest";
|
|
318
|
+
readonly provider: "xai";
|
|
319
|
+
readonly family: "grok";
|
|
320
|
+
readonly pricing: {
|
|
321
|
+
readonly input: 0.000003;
|
|
322
|
+
readonly output: 0.000015;
|
|
323
|
+
readonly cacheRead: 7.5e-7;
|
|
324
|
+
};
|
|
325
|
+
readonly contextWindow: 131072;
|
|
326
|
+
readonly maxOutput: 8192;
|
|
327
|
+
readonly modalities: {
|
|
328
|
+
readonly input: readonly ["text"];
|
|
329
|
+
readonly output: readonly ["text"];
|
|
330
|
+
};
|
|
331
|
+
readonly capabilities: {
|
|
332
|
+
readonly reasoning: false;
|
|
333
|
+
readonly toolCall: true;
|
|
334
|
+
readonly attachment: false;
|
|
335
|
+
readonly structuredOutput: false;
|
|
336
|
+
};
|
|
337
|
+
}, {
|
|
338
|
+
readonly id: "grok-4-1-fast";
|
|
339
|
+
readonly name: "Grok 4.1 Fast";
|
|
340
|
+
readonly provider: "xai";
|
|
341
|
+
readonly family: "grok";
|
|
342
|
+
readonly pricing: {
|
|
343
|
+
readonly input: 2e-7;
|
|
344
|
+
readonly output: 5e-7;
|
|
345
|
+
readonly cacheRead: 5e-8;
|
|
346
|
+
};
|
|
347
|
+
readonly contextWindow: 2000000;
|
|
348
|
+
readonly maxOutput: 30000;
|
|
349
|
+
readonly modalities: {
|
|
350
|
+
readonly input: readonly ["text", "image"];
|
|
351
|
+
readonly output: readonly ["text"];
|
|
352
|
+
};
|
|
353
|
+
readonly capabilities: {
|
|
354
|
+
readonly reasoning: true;
|
|
355
|
+
readonly toolCall: true;
|
|
356
|
+
readonly attachment: true;
|
|
357
|
+
readonly structuredOutput: false;
|
|
358
|
+
};
|
|
359
|
+
}, {
|
|
360
|
+
readonly id: "grok-2-vision-latest";
|
|
361
|
+
readonly name: "Grok 2 Vision Latest";
|
|
362
|
+
readonly provider: "xai";
|
|
363
|
+
readonly family: "grok";
|
|
364
|
+
readonly pricing: {
|
|
365
|
+
readonly input: 0.000002;
|
|
366
|
+
readonly output: 0.00001;
|
|
367
|
+
readonly cacheRead: 0.000002;
|
|
368
|
+
};
|
|
369
|
+
readonly contextWindow: 8192;
|
|
370
|
+
readonly maxOutput: 4096;
|
|
371
|
+
readonly modalities: {
|
|
372
|
+
readonly input: readonly ["text", "image"];
|
|
373
|
+
readonly output: readonly ["text"];
|
|
374
|
+
};
|
|
375
|
+
readonly capabilities: {
|
|
376
|
+
readonly reasoning: false;
|
|
377
|
+
readonly toolCall: true;
|
|
378
|
+
readonly attachment: true;
|
|
379
|
+
readonly structuredOutput: false;
|
|
380
|
+
};
|
|
381
|
+
}, {
|
|
382
|
+
readonly id: "grok-3-mini-latest";
|
|
383
|
+
readonly name: "Grok 3 Mini Latest";
|
|
384
|
+
readonly provider: "xai";
|
|
385
|
+
readonly family: "grok";
|
|
386
|
+
readonly pricing: {
|
|
387
|
+
readonly input: 3e-7;
|
|
388
|
+
readonly output: 5e-7;
|
|
389
|
+
readonly cacheRead: 7.5e-8;
|
|
390
|
+
readonly reasoning: 5e-7;
|
|
391
|
+
};
|
|
392
|
+
readonly contextWindow: 131072;
|
|
393
|
+
readonly maxOutput: 8192;
|
|
394
|
+
readonly modalities: {
|
|
395
|
+
readonly input: readonly ["text"];
|
|
396
|
+
readonly output: readonly ["text"];
|
|
397
|
+
};
|
|
398
|
+
readonly capabilities: {
|
|
399
|
+
readonly reasoning: true;
|
|
400
|
+
readonly toolCall: true;
|
|
401
|
+
readonly attachment: false;
|
|
402
|
+
readonly structuredOutput: false;
|
|
403
|
+
};
|
|
404
|
+
}, {
|
|
405
|
+
readonly id: "grok-3-mini";
|
|
406
|
+
readonly name: "Grok 3 Mini";
|
|
407
|
+
readonly provider: "xai";
|
|
408
|
+
readonly family: "grok";
|
|
409
|
+
readonly pricing: {
|
|
410
|
+
readonly input: 3e-7;
|
|
411
|
+
readonly output: 5e-7;
|
|
412
|
+
readonly cacheRead: 7.5e-8;
|
|
413
|
+
readonly reasoning: 5e-7;
|
|
414
|
+
};
|
|
415
|
+
readonly contextWindow: 131072;
|
|
416
|
+
readonly maxOutput: 8192;
|
|
417
|
+
readonly modalities: {
|
|
418
|
+
readonly input: readonly ["text"];
|
|
419
|
+
readonly output: readonly ["text"];
|
|
420
|
+
};
|
|
421
|
+
readonly capabilities: {
|
|
422
|
+
readonly reasoning: true;
|
|
423
|
+
readonly toolCall: true;
|
|
424
|
+
readonly attachment: false;
|
|
425
|
+
readonly structuredOutput: false;
|
|
426
|
+
};
|
|
427
|
+
}, {
|
|
428
|
+
readonly id: "grok-3-mini-fast-latest";
|
|
429
|
+
readonly name: "Grok 3 Mini Fast Latest";
|
|
430
|
+
readonly provider: "xai";
|
|
431
|
+
readonly family: "grok";
|
|
432
|
+
readonly pricing: {
|
|
433
|
+
readonly input: 6e-7;
|
|
434
|
+
readonly output: 0.000004;
|
|
435
|
+
readonly cacheRead: 1.5e-7;
|
|
436
|
+
readonly reasoning: 0.000004;
|
|
437
|
+
};
|
|
438
|
+
readonly contextWindow: 131072;
|
|
439
|
+
readonly maxOutput: 8192;
|
|
440
|
+
readonly modalities: {
|
|
441
|
+
readonly input: readonly ["text"];
|
|
442
|
+
readonly output: readonly ["text"];
|
|
443
|
+
};
|
|
444
|
+
readonly capabilities: {
|
|
445
|
+
readonly reasoning: true;
|
|
446
|
+
readonly toolCall: true;
|
|
447
|
+
readonly attachment: false;
|
|
448
|
+
readonly structuredOutput: false;
|
|
449
|
+
};
|
|
450
|
+
}, {
|
|
451
|
+
readonly id: "grok-2-latest";
|
|
452
|
+
readonly name: "Grok 2 Latest";
|
|
453
|
+
readonly provider: "xai";
|
|
454
|
+
readonly family: "grok";
|
|
455
|
+
readonly pricing: {
|
|
456
|
+
readonly input: 0.000002;
|
|
457
|
+
readonly output: 0.00001;
|
|
458
|
+
readonly cacheRead: 0.000002;
|
|
459
|
+
};
|
|
460
|
+
readonly contextWindow: 131072;
|
|
461
|
+
readonly maxOutput: 8192;
|
|
462
|
+
readonly modalities: {
|
|
463
|
+
readonly input: readonly ["text"];
|
|
464
|
+
readonly output: readonly ["text"];
|
|
465
|
+
};
|
|
466
|
+
readonly capabilities: {
|
|
467
|
+
readonly reasoning: false;
|
|
468
|
+
readonly toolCall: true;
|
|
469
|
+
readonly attachment: false;
|
|
470
|
+
readonly structuredOutput: false;
|
|
471
|
+
};
|
|
472
|
+
}, {
|
|
473
|
+
readonly id: "grok-4-fast-non-reasoning";
|
|
474
|
+
readonly name: "Grok 4 Fast (Non-Reasoning)";
|
|
475
|
+
readonly provider: "xai";
|
|
476
|
+
readonly family: "grok";
|
|
477
|
+
readonly pricing: {
|
|
478
|
+
readonly input: 2e-7;
|
|
479
|
+
readonly output: 5e-7;
|
|
480
|
+
readonly cacheRead: 5e-8;
|
|
481
|
+
};
|
|
482
|
+
readonly contextWindow: 2000000;
|
|
483
|
+
readonly maxOutput: 30000;
|
|
484
|
+
readonly modalities: {
|
|
485
|
+
readonly input: readonly ["text", "image"];
|
|
486
|
+
readonly output: readonly ["text"];
|
|
487
|
+
};
|
|
488
|
+
readonly capabilities: {
|
|
489
|
+
readonly reasoning: false;
|
|
490
|
+
readonly toolCall: true;
|
|
491
|
+
readonly attachment: true;
|
|
492
|
+
readonly structuredOutput: false;
|
|
493
|
+
};
|
|
494
|
+
}, {
|
|
495
|
+
readonly id: "grok-vision-beta";
|
|
496
|
+
readonly name: "Grok Vision Beta";
|
|
497
|
+
readonly provider: "xai";
|
|
498
|
+
readonly family: "grok-vision";
|
|
499
|
+
readonly pricing: {
|
|
500
|
+
readonly input: 0.000005;
|
|
501
|
+
readonly output: 0.000015;
|
|
502
|
+
readonly cacheRead: 0.000005;
|
|
503
|
+
};
|
|
504
|
+
readonly contextWindow: 8192;
|
|
505
|
+
readonly maxOutput: 4096;
|
|
506
|
+
readonly modalities: {
|
|
507
|
+
readonly input: readonly ["text", "image"];
|
|
508
|
+
readonly output: readonly ["text"];
|
|
509
|
+
};
|
|
510
|
+
readonly capabilities: {
|
|
511
|
+
readonly reasoning: false;
|
|
512
|
+
readonly toolCall: true;
|
|
513
|
+
readonly attachment: true;
|
|
514
|
+
readonly structuredOutput: false;
|
|
515
|
+
};
|
|
516
|
+
}, {
|
|
517
|
+
readonly id: "grok-3-fast";
|
|
518
|
+
readonly name: "Grok 3 Fast";
|
|
519
|
+
readonly provider: "xai";
|
|
520
|
+
readonly family: "grok";
|
|
521
|
+
readonly pricing: {
|
|
522
|
+
readonly input: 0.000005;
|
|
523
|
+
readonly output: 0.000025;
|
|
524
|
+
readonly cacheRead: 0.00000125;
|
|
525
|
+
};
|
|
526
|
+
readonly contextWindow: 131072;
|
|
527
|
+
readonly maxOutput: 8192;
|
|
528
|
+
readonly modalities: {
|
|
529
|
+
readonly input: readonly ["text"];
|
|
530
|
+
readonly output: readonly ["text"];
|
|
531
|
+
};
|
|
532
|
+
readonly capabilities: {
|
|
533
|
+
readonly reasoning: false;
|
|
534
|
+
readonly toolCall: true;
|
|
535
|
+
readonly attachment: false;
|
|
536
|
+
readonly structuredOutput: false;
|
|
537
|
+
};
|
|
538
|
+
}, {
|
|
539
|
+
readonly id: "grok-4.20-beta-latest-reasoning";
|
|
540
|
+
readonly name: "Grok 4.20 Beta (Reasoning)";
|
|
541
|
+
readonly provider: "xai";
|
|
542
|
+
readonly family: "grok";
|
|
543
|
+
readonly pricing: {
|
|
544
|
+
readonly input: 0.000002;
|
|
545
|
+
readonly output: 0.000006;
|
|
546
|
+
readonly cacheRead: 2e-7;
|
|
547
|
+
};
|
|
548
|
+
readonly contextWindow: 2000000;
|
|
549
|
+
readonly maxOutput: 30000;
|
|
550
|
+
readonly modalities: {
|
|
551
|
+
readonly input: readonly ["text", "image"];
|
|
552
|
+
readonly output: readonly ["text"];
|
|
553
|
+
};
|
|
554
|
+
readonly capabilities: {
|
|
555
|
+
readonly reasoning: true;
|
|
556
|
+
readonly toolCall: true;
|
|
557
|
+
readonly attachment: true;
|
|
558
|
+
readonly structuredOutput: false;
|
|
559
|
+
};
|
|
560
|
+
}];
|
|
561
|
+
//#endregion
|
|
562
|
+
//#region src/providers/xai.d.ts
|
|
563
|
+
/**
|
|
564
|
+
* Known model identifiers for xAI.
|
|
565
|
+
*
|
|
566
|
+
* @example
|
|
567
|
+
* ```typescript
|
|
568
|
+
* import type { XAIModelId } from '@funkai/models/xai'
|
|
569
|
+
*
|
|
570
|
+
* const id: XAIModelId = 'grok-2-1212'
|
|
571
|
+
* ```
|
|
572
|
+
*/
|
|
573
|
+
type XAIModelId = (typeof XAI_MODELS)[number]["id"];
|
|
574
|
+
/**
|
|
575
|
+
* All xAI models in the catalog.
|
|
576
|
+
*
|
|
577
|
+
* @example
|
|
578
|
+
* ```typescript
|
|
579
|
+
* import { xAIModels } from '@funkai/models/xai'
|
|
580
|
+
*
|
|
581
|
+
* for (const m of xAIModels) {
|
|
582
|
+
* console.log(m.id, m.pricing.input)
|
|
583
|
+
* }
|
|
584
|
+
* ```
|
|
585
|
+
*/
|
|
586
|
+
declare const xAIModels: readonly [{
|
|
587
|
+
readonly id: "grok-2-1212";
|
|
588
|
+
readonly name: "Grok 2 (1212)";
|
|
589
|
+
readonly provider: "xai";
|
|
590
|
+
readonly family: "grok";
|
|
591
|
+
readonly pricing: {
|
|
592
|
+
readonly input: 0.000002;
|
|
593
|
+
readonly output: 0.00001;
|
|
594
|
+
readonly cacheRead: 0.000002;
|
|
595
|
+
};
|
|
596
|
+
readonly contextWindow: 131072;
|
|
597
|
+
readonly maxOutput: 8192;
|
|
598
|
+
readonly modalities: {
|
|
599
|
+
readonly input: readonly ["text"];
|
|
600
|
+
readonly output: readonly ["text"];
|
|
601
|
+
};
|
|
602
|
+
readonly capabilities: {
|
|
603
|
+
readonly reasoning: false;
|
|
604
|
+
readonly toolCall: true;
|
|
605
|
+
readonly attachment: false;
|
|
606
|
+
readonly structuredOutput: false;
|
|
607
|
+
};
|
|
608
|
+
}, {
|
|
609
|
+
readonly id: "grok-4.20-beta-latest-non-reasoning";
|
|
610
|
+
readonly name: "Grok 4.20 Beta (Non-Reasoning)";
|
|
611
|
+
readonly provider: "xai";
|
|
612
|
+
readonly family: "grok";
|
|
613
|
+
readonly pricing: {
|
|
614
|
+
readonly input: 0.000002;
|
|
615
|
+
readonly output: 0.000006;
|
|
616
|
+
readonly cacheRead: 2e-7;
|
|
617
|
+
};
|
|
618
|
+
readonly contextWindow: 2000000;
|
|
619
|
+
readonly maxOutput: 30000;
|
|
620
|
+
readonly modalities: {
|
|
621
|
+
readonly input: readonly ["text", "image"];
|
|
622
|
+
readonly output: readonly ["text"];
|
|
623
|
+
};
|
|
624
|
+
readonly capabilities: {
|
|
625
|
+
readonly reasoning: false;
|
|
626
|
+
readonly toolCall: true;
|
|
627
|
+
readonly attachment: true;
|
|
628
|
+
readonly structuredOutput: false;
|
|
629
|
+
};
|
|
630
|
+
}, {
|
|
631
|
+
readonly id: "grok-2";
|
|
632
|
+
readonly name: "Grok 2";
|
|
633
|
+
readonly provider: "xai";
|
|
634
|
+
readonly family: "grok";
|
|
635
|
+
readonly pricing: {
|
|
636
|
+
readonly input: 0.000002;
|
|
637
|
+
readonly output: 0.00001;
|
|
638
|
+
readonly cacheRead: 0.000002;
|
|
639
|
+
};
|
|
640
|
+
readonly contextWindow: 131072;
|
|
641
|
+
readonly maxOutput: 8192;
|
|
642
|
+
readonly modalities: {
|
|
643
|
+
readonly input: readonly ["text"];
|
|
644
|
+
readonly output: readonly ["text"];
|
|
645
|
+
};
|
|
646
|
+
readonly capabilities: {
|
|
647
|
+
readonly reasoning: false;
|
|
648
|
+
readonly toolCall: true;
|
|
649
|
+
readonly attachment: false;
|
|
650
|
+
readonly structuredOutput: false;
|
|
651
|
+
};
|
|
652
|
+
}, {
|
|
653
|
+
readonly id: "grok-3-fast-latest";
|
|
654
|
+
readonly name: "Grok 3 Fast Latest";
|
|
655
|
+
readonly provider: "xai";
|
|
656
|
+
readonly family: "grok";
|
|
657
|
+
readonly pricing: {
|
|
658
|
+
readonly input: 0.000005;
|
|
659
|
+
readonly output: 0.000025;
|
|
660
|
+
readonly cacheRead: 0.00000125;
|
|
661
|
+
};
|
|
662
|
+
readonly contextWindow: 131072;
|
|
663
|
+
readonly maxOutput: 8192;
|
|
664
|
+
readonly modalities: {
|
|
665
|
+
readonly input: readonly ["text"];
|
|
666
|
+
readonly output: readonly ["text"];
|
|
667
|
+
};
|
|
668
|
+
readonly capabilities: {
|
|
669
|
+
readonly reasoning: false;
|
|
670
|
+
readonly toolCall: true;
|
|
671
|
+
readonly attachment: false;
|
|
672
|
+
readonly structuredOutput: false;
|
|
673
|
+
};
|
|
674
|
+
}, {
|
|
675
|
+
readonly id: "grok-2-vision";
|
|
676
|
+
readonly name: "Grok 2 Vision";
|
|
677
|
+
readonly provider: "xai";
|
|
678
|
+
readonly family: "grok";
|
|
679
|
+
readonly pricing: {
|
|
680
|
+
readonly input: 0.000002;
|
|
681
|
+
readonly output: 0.00001;
|
|
682
|
+
readonly cacheRead: 0.000002;
|
|
683
|
+
};
|
|
684
|
+
readonly contextWindow: 8192;
|
|
685
|
+
readonly maxOutput: 4096;
|
|
686
|
+
readonly modalities: {
|
|
687
|
+
readonly input: readonly ["text", "image"];
|
|
688
|
+
readonly output: readonly ["text"];
|
|
689
|
+
};
|
|
690
|
+
readonly capabilities: {
|
|
691
|
+
readonly reasoning: false;
|
|
692
|
+
readonly toolCall: true;
|
|
693
|
+
readonly attachment: true;
|
|
694
|
+
readonly structuredOutput: false;
|
|
695
|
+
};
|
|
696
|
+
}, {
|
|
697
|
+
readonly id: "grok-3";
|
|
698
|
+
readonly name: "Grok 3";
|
|
699
|
+
readonly provider: "xai";
|
|
700
|
+
readonly family: "grok";
|
|
701
|
+
readonly pricing: {
|
|
702
|
+
readonly input: 0.000003;
|
|
703
|
+
readonly output: 0.000015;
|
|
704
|
+
readonly cacheRead: 7.5e-7;
|
|
705
|
+
};
|
|
706
|
+
readonly contextWindow: 131072;
|
|
707
|
+
readonly maxOutput: 8192;
|
|
708
|
+
readonly modalities: {
|
|
709
|
+
readonly input: readonly ["text"];
|
|
710
|
+
readonly output: readonly ["text"];
|
|
711
|
+
};
|
|
712
|
+
readonly capabilities: {
|
|
713
|
+
readonly reasoning: false;
|
|
714
|
+
readonly toolCall: true;
|
|
715
|
+
readonly attachment: false;
|
|
716
|
+
readonly structuredOutput: false;
|
|
717
|
+
};
|
|
718
|
+
}, {
|
|
719
|
+
readonly id: "grok-code-fast-1";
|
|
720
|
+
readonly name: "Grok Code Fast 1";
|
|
721
|
+
readonly provider: "xai";
|
|
722
|
+
readonly family: "grok";
|
|
723
|
+
readonly pricing: {
|
|
724
|
+
readonly input: 2e-7;
|
|
725
|
+
readonly output: 0.0000015;
|
|
726
|
+
readonly cacheRead: 2e-8;
|
|
727
|
+
};
|
|
728
|
+
readonly contextWindow: 256000;
|
|
729
|
+
readonly maxOutput: 10000;
|
|
730
|
+
readonly modalities: {
|
|
731
|
+
readonly input: readonly ["text"];
|
|
732
|
+
readonly output: readonly ["text"];
|
|
733
|
+
};
|
|
734
|
+
readonly capabilities: {
|
|
735
|
+
readonly reasoning: true;
|
|
736
|
+
readonly toolCall: true;
|
|
737
|
+
readonly attachment: false;
|
|
738
|
+
readonly structuredOutput: false;
|
|
739
|
+
};
|
|
740
|
+
}, {
|
|
741
|
+
readonly id: "grok-2-vision-1212";
|
|
742
|
+
readonly name: "Grok 2 Vision (1212)";
|
|
743
|
+
readonly provider: "xai";
|
|
744
|
+
readonly family: "grok";
|
|
745
|
+
readonly pricing: {
|
|
746
|
+
readonly input: 0.000002;
|
|
747
|
+
readonly output: 0.00001;
|
|
748
|
+
readonly cacheRead: 0.000002;
|
|
749
|
+
};
|
|
750
|
+
readonly contextWindow: 8192;
|
|
751
|
+
readonly maxOutput: 4096;
|
|
752
|
+
readonly modalities: {
|
|
753
|
+
readonly input: readonly ["text", "image"];
|
|
754
|
+
readonly output: readonly ["text"];
|
|
755
|
+
};
|
|
756
|
+
readonly capabilities: {
|
|
757
|
+
readonly reasoning: false;
|
|
758
|
+
readonly toolCall: true;
|
|
759
|
+
readonly attachment: true;
|
|
760
|
+
readonly structuredOutput: false;
|
|
761
|
+
};
|
|
762
|
+
}, {
|
|
763
|
+
readonly id: "grok-4-1-fast-non-reasoning";
|
|
764
|
+
readonly name: "Grok 4.1 Fast (Non-Reasoning)";
|
|
765
|
+
readonly provider: "xai";
|
|
766
|
+
readonly family: "grok";
|
|
767
|
+
readonly pricing: {
|
|
768
|
+
readonly input: 2e-7;
|
|
769
|
+
readonly output: 5e-7;
|
|
770
|
+
readonly cacheRead: 5e-8;
|
|
771
|
+
};
|
|
772
|
+
readonly contextWindow: 2000000;
|
|
773
|
+
readonly maxOutput: 30000;
|
|
774
|
+
readonly modalities: {
|
|
775
|
+
readonly input: readonly ["text", "image"];
|
|
776
|
+
readonly output: readonly ["text"];
|
|
777
|
+
};
|
|
778
|
+
readonly capabilities: {
|
|
779
|
+
readonly reasoning: false;
|
|
780
|
+
readonly toolCall: true;
|
|
781
|
+
readonly attachment: true;
|
|
782
|
+
readonly structuredOutput: false;
|
|
783
|
+
};
|
|
784
|
+
}, {
|
|
785
|
+
readonly id: "grok-beta";
|
|
786
|
+
readonly name: "Grok Beta";
|
|
787
|
+
readonly provider: "xai";
|
|
788
|
+
readonly family: "grok-beta";
|
|
789
|
+
readonly pricing: {
|
|
790
|
+
readonly input: 0.000005;
|
|
791
|
+
readonly output: 0.000015;
|
|
792
|
+
readonly cacheRead: 0.000005;
|
|
793
|
+
};
|
|
794
|
+
readonly contextWindow: 131072;
|
|
795
|
+
readonly maxOutput: 4096;
|
|
796
|
+
readonly modalities: {
|
|
797
|
+
readonly input: readonly ["text"];
|
|
798
|
+
readonly output: readonly ["text"];
|
|
799
|
+
};
|
|
800
|
+
readonly capabilities: {
|
|
801
|
+
readonly reasoning: false;
|
|
802
|
+
readonly toolCall: true;
|
|
803
|
+
readonly attachment: false;
|
|
804
|
+
readonly structuredOutput: false;
|
|
805
|
+
};
|
|
806
|
+
}, {
|
|
807
|
+
readonly id: "grok-3-mini-fast";
|
|
808
|
+
readonly name: "Grok 3 Mini Fast";
|
|
809
|
+
readonly provider: "xai";
|
|
810
|
+
readonly family: "grok";
|
|
811
|
+
readonly pricing: {
|
|
812
|
+
readonly input: 6e-7;
|
|
813
|
+
readonly output: 0.000004;
|
|
814
|
+
readonly cacheRead: 1.5e-7;
|
|
815
|
+
readonly reasoning: 0.000004;
|
|
816
|
+
};
|
|
817
|
+
readonly contextWindow: 131072;
|
|
818
|
+
readonly maxOutput: 8192;
|
|
819
|
+
readonly modalities: {
|
|
820
|
+
readonly input: readonly ["text"];
|
|
821
|
+
readonly output: readonly ["text"];
|
|
822
|
+
};
|
|
823
|
+
readonly capabilities: {
|
|
824
|
+
readonly reasoning: true;
|
|
825
|
+
readonly toolCall: true;
|
|
826
|
+
readonly attachment: false;
|
|
827
|
+
readonly structuredOutput: false;
|
|
828
|
+
};
|
|
829
|
+
}, {
|
|
830
|
+
readonly id: "grok-4-fast";
|
|
831
|
+
readonly name: "Grok 4 Fast";
|
|
832
|
+
readonly provider: "xai";
|
|
833
|
+
readonly family: "grok";
|
|
834
|
+
readonly pricing: {
|
|
835
|
+
readonly input: 2e-7;
|
|
836
|
+
readonly output: 5e-7;
|
|
837
|
+
readonly cacheRead: 5e-8;
|
|
838
|
+
};
|
|
839
|
+
readonly contextWindow: 2000000;
|
|
840
|
+
readonly maxOutput: 30000;
|
|
841
|
+
readonly modalities: {
|
|
842
|
+
readonly input: readonly ["text", "image"];
|
|
843
|
+
readonly output: readonly ["text"];
|
|
844
|
+
};
|
|
845
|
+
readonly capabilities: {
|
|
846
|
+
readonly reasoning: true;
|
|
847
|
+
readonly toolCall: true;
|
|
848
|
+
readonly attachment: true;
|
|
849
|
+
readonly structuredOutput: false;
|
|
850
|
+
};
|
|
851
|
+
}, {
|
|
852
|
+
readonly id: "grok-4";
|
|
853
|
+
readonly name: "Grok 4";
|
|
854
|
+
readonly provider: "xai";
|
|
855
|
+
readonly family: "grok";
|
|
856
|
+
readonly pricing: {
|
|
857
|
+
readonly input: 0.000003;
|
|
858
|
+
readonly output: 0.000015;
|
|
859
|
+
readonly cacheRead: 7.5e-7;
|
|
860
|
+
readonly reasoning: 0.000015;
|
|
861
|
+
};
|
|
862
|
+
readonly contextWindow: 256000;
|
|
863
|
+
readonly maxOutput: 64000;
|
|
864
|
+
readonly modalities: {
|
|
865
|
+
readonly input: readonly ["text"];
|
|
866
|
+
readonly output: readonly ["text"];
|
|
867
|
+
};
|
|
868
|
+
readonly capabilities: {
|
|
869
|
+
readonly reasoning: true;
|
|
870
|
+
readonly toolCall: true;
|
|
871
|
+
readonly attachment: false;
|
|
872
|
+
readonly structuredOutput: false;
|
|
873
|
+
};
|
|
874
|
+
}, {
|
|
875
|
+
readonly id: "grok-4.20-multi-agent-beta-latest";
|
|
876
|
+
readonly name: "Grok 4.20 Multi-Agent Beta";
|
|
877
|
+
readonly provider: "xai";
|
|
878
|
+
readonly family: "grok";
|
|
879
|
+
readonly pricing: {
|
|
880
|
+
readonly input: 0.000002;
|
|
881
|
+
readonly output: 0.000006;
|
|
882
|
+
readonly cacheRead: 2e-7;
|
|
883
|
+
};
|
|
884
|
+
readonly contextWindow: 2000000;
|
|
885
|
+
readonly maxOutput: 30000;
|
|
886
|
+
readonly modalities: {
|
|
887
|
+
readonly input: readonly ["text", "image"];
|
|
888
|
+
readonly output: readonly ["text"];
|
|
889
|
+
};
|
|
890
|
+
readonly capabilities: {
|
|
891
|
+
readonly reasoning: true;
|
|
892
|
+
readonly toolCall: true;
|
|
893
|
+
readonly attachment: true;
|
|
894
|
+
readonly structuredOutput: false;
|
|
895
|
+
};
|
|
896
|
+
}, {
|
|
897
|
+
readonly id: "grok-3-latest";
|
|
898
|
+
readonly name: "Grok 3 Latest";
|
|
899
|
+
readonly provider: "xai";
|
|
900
|
+
readonly family: "grok";
|
|
901
|
+
readonly pricing: {
|
|
902
|
+
readonly input: 0.000003;
|
|
903
|
+
readonly output: 0.000015;
|
|
904
|
+
readonly cacheRead: 7.5e-7;
|
|
905
|
+
};
|
|
906
|
+
readonly contextWindow: 131072;
|
|
907
|
+
readonly maxOutput: 8192;
|
|
908
|
+
readonly modalities: {
|
|
909
|
+
readonly input: readonly ["text"];
|
|
910
|
+
readonly output: readonly ["text"];
|
|
911
|
+
};
|
|
912
|
+
readonly capabilities: {
|
|
913
|
+
readonly reasoning: false;
|
|
914
|
+
readonly toolCall: true;
|
|
915
|
+
readonly attachment: false;
|
|
916
|
+
readonly structuredOutput: false;
|
|
917
|
+
};
|
|
918
|
+
}, {
|
|
919
|
+
readonly id: "grok-4-1-fast";
|
|
920
|
+
readonly name: "Grok 4.1 Fast";
|
|
921
|
+
readonly provider: "xai";
|
|
922
|
+
readonly family: "grok";
|
|
923
|
+
readonly pricing: {
|
|
924
|
+
readonly input: 2e-7;
|
|
925
|
+
readonly output: 5e-7;
|
|
926
|
+
readonly cacheRead: 5e-8;
|
|
927
|
+
};
|
|
928
|
+
readonly contextWindow: 2000000;
|
|
929
|
+
readonly maxOutput: 30000;
|
|
930
|
+
readonly modalities: {
|
|
931
|
+
readonly input: readonly ["text", "image"];
|
|
932
|
+
readonly output: readonly ["text"];
|
|
933
|
+
};
|
|
934
|
+
readonly capabilities: {
|
|
935
|
+
readonly reasoning: true;
|
|
936
|
+
readonly toolCall: true;
|
|
937
|
+
readonly attachment: true;
|
|
938
|
+
readonly structuredOutput: false;
|
|
939
|
+
};
|
|
940
|
+
}, {
|
|
941
|
+
readonly id: "grok-2-vision-latest";
|
|
942
|
+
readonly name: "Grok 2 Vision Latest";
|
|
943
|
+
readonly provider: "xai";
|
|
944
|
+
readonly family: "grok";
|
|
945
|
+
readonly pricing: {
|
|
946
|
+
readonly input: 0.000002;
|
|
947
|
+
readonly output: 0.00001;
|
|
948
|
+
readonly cacheRead: 0.000002;
|
|
949
|
+
};
|
|
950
|
+
readonly contextWindow: 8192;
|
|
951
|
+
readonly maxOutput: 4096;
|
|
952
|
+
readonly modalities: {
|
|
953
|
+
readonly input: readonly ["text", "image"];
|
|
954
|
+
readonly output: readonly ["text"];
|
|
955
|
+
};
|
|
956
|
+
readonly capabilities: {
|
|
957
|
+
readonly reasoning: false;
|
|
958
|
+
readonly toolCall: true;
|
|
959
|
+
readonly attachment: true;
|
|
960
|
+
readonly structuredOutput: false;
|
|
961
|
+
};
|
|
962
|
+
}, {
|
|
963
|
+
readonly id: "grok-3-mini-latest";
|
|
964
|
+
readonly name: "Grok 3 Mini Latest";
|
|
965
|
+
readonly provider: "xai";
|
|
966
|
+
readonly family: "grok";
|
|
967
|
+
readonly pricing: {
|
|
968
|
+
readonly input: 3e-7;
|
|
969
|
+
readonly output: 5e-7;
|
|
970
|
+
readonly cacheRead: 7.5e-8;
|
|
971
|
+
readonly reasoning: 5e-7;
|
|
972
|
+
};
|
|
973
|
+
readonly contextWindow: 131072;
|
|
974
|
+
readonly maxOutput: 8192;
|
|
975
|
+
readonly modalities: {
|
|
976
|
+
readonly input: readonly ["text"];
|
|
977
|
+
readonly output: readonly ["text"];
|
|
978
|
+
};
|
|
979
|
+
readonly capabilities: {
|
|
980
|
+
readonly reasoning: true;
|
|
981
|
+
readonly toolCall: true;
|
|
982
|
+
readonly attachment: false;
|
|
983
|
+
readonly structuredOutput: false;
|
|
984
|
+
};
|
|
985
|
+
}, {
|
|
986
|
+
readonly id: "grok-3-mini";
|
|
987
|
+
readonly name: "Grok 3 Mini";
|
|
988
|
+
readonly provider: "xai";
|
|
989
|
+
readonly family: "grok";
|
|
990
|
+
readonly pricing: {
|
|
991
|
+
readonly input: 3e-7;
|
|
992
|
+
readonly output: 5e-7;
|
|
993
|
+
readonly cacheRead: 7.5e-8;
|
|
994
|
+
readonly reasoning: 5e-7;
|
|
995
|
+
};
|
|
996
|
+
readonly contextWindow: 131072;
|
|
997
|
+
readonly maxOutput: 8192;
|
|
998
|
+
readonly modalities: {
|
|
999
|
+
readonly input: readonly ["text"];
|
|
1000
|
+
readonly output: readonly ["text"];
|
|
1001
|
+
};
|
|
1002
|
+
readonly capabilities: {
|
|
1003
|
+
readonly reasoning: true;
|
|
1004
|
+
readonly toolCall: true;
|
|
1005
|
+
readonly attachment: false;
|
|
1006
|
+
readonly structuredOutput: false;
|
|
1007
|
+
};
|
|
1008
|
+
}, {
|
|
1009
|
+
readonly id: "grok-3-mini-fast-latest";
|
|
1010
|
+
readonly name: "Grok 3 Mini Fast Latest";
|
|
1011
|
+
readonly provider: "xai";
|
|
1012
|
+
readonly family: "grok";
|
|
1013
|
+
readonly pricing: {
|
|
1014
|
+
readonly input: 6e-7;
|
|
1015
|
+
readonly output: 0.000004;
|
|
1016
|
+
readonly cacheRead: 1.5e-7;
|
|
1017
|
+
readonly reasoning: 0.000004;
|
|
1018
|
+
};
|
|
1019
|
+
readonly contextWindow: 131072;
|
|
1020
|
+
readonly maxOutput: 8192;
|
|
1021
|
+
readonly modalities: {
|
|
1022
|
+
readonly input: readonly ["text"];
|
|
1023
|
+
readonly output: readonly ["text"];
|
|
1024
|
+
};
|
|
1025
|
+
readonly capabilities: {
|
|
1026
|
+
readonly reasoning: true;
|
|
1027
|
+
readonly toolCall: true;
|
|
1028
|
+
readonly attachment: false;
|
|
1029
|
+
readonly structuredOutput: false;
|
|
1030
|
+
};
|
|
1031
|
+
}, {
|
|
1032
|
+
readonly id: "grok-2-latest";
|
|
1033
|
+
readonly name: "Grok 2 Latest";
|
|
1034
|
+
readonly provider: "xai";
|
|
1035
|
+
readonly family: "grok";
|
|
1036
|
+
readonly pricing: {
|
|
1037
|
+
readonly input: 0.000002;
|
|
1038
|
+
readonly output: 0.00001;
|
|
1039
|
+
readonly cacheRead: 0.000002;
|
|
1040
|
+
};
|
|
1041
|
+
readonly contextWindow: 131072;
|
|
1042
|
+
readonly maxOutput: 8192;
|
|
1043
|
+
readonly modalities: {
|
|
1044
|
+
readonly input: readonly ["text"];
|
|
1045
|
+
readonly output: readonly ["text"];
|
|
1046
|
+
};
|
|
1047
|
+
readonly capabilities: {
|
|
1048
|
+
readonly reasoning: false;
|
|
1049
|
+
readonly toolCall: true;
|
|
1050
|
+
readonly attachment: false;
|
|
1051
|
+
readonly structuredOutput: false;
|
|
1052
|
+
};
|
|
1053
|
+
}, {
|
|
1054
|
+
readonly id: "grok-4-fast-non-reasoning";
|
|
1055
|
+
readonly name: "Grok 4 Fast (Non-Reasoning)";
|
|
1056
|
+
readonly provider: "xai";
|
|
1057
|
+
readonly family: "grok";
|
|
1058
|
+
readonly pricing: {
|
|
1059
|
+
readonly input: 2e-7;
|
|
1060
|
+
readonly output: 5e-7;
|
|
1061
|
+
readonly cacheRead: 5e-8;
|
|
1062
|
+
};
|
|
1063
|
+
readonly contextWindow: 2000000;
|
|
1064
|
+
readonly maxOutput: 30000;
|
|
1065
|
+
readonly modalities: {
|
|
1066
|
+
readonly input: readonly ["text", "image"];
|
|
1067
|
+
readonly output: readonly ["text"];
|
|
1068
|
+
};
|
|
1069
|
+
readonly capabilities: {
|
|
1070
|
+
readonly reasoning: false;
|
|
1071
|
+
readonly toolCall: true;
|
|
1072
|
+
readonly attachment: true;
|
|
1073
|
+
readonly structuredOutput: false;
|
|
1074
|
+
};
|
|
1075
|
+
}, {
|
|
1076
|
+
readonly id: "grok-vision-beta";
|
|
1077
|
+
readonly name: "Grok Vision Beta";
|
|
1078
|
+
readonly provider: "xai";
|
|
1079
|
+
readonly family: "grok-vision";
|
|
1080
|
+
readonly pricing: {
|
|
1081
|
+
readonly input: 0.000005;
|
|
1082
|
+
readonly output: 0.000015;
|
|
1083
|
+
readonly cacheRead: 0.000005;
|
|
1084
|
+
};
|
|
1085
|
+
readonly contextWindow: 8192;
|
|
1086
|
+
readonly maxOutput: 4096;
|
|
1087
|
+
readonly modalities: {
|
|
1088
|
+
readonly input: readonly ["text", "image"];
|
|
1089
|
+
readonly output: readonly ["text"];
|
|
1090
|
+
};
|
|
1091
|
+
readonly capabilities: {
|
|
1092
|
+
readonly reasoning: false;
|
|
1093
|
+
readonly toolCall: true;
|
|
1094
|
+
readonly attachment: true;
|
|
1095
|
+
readonly structuredOutput: false;
|
|
1096
|
+
};
|
|
1097
|
+
}, {
|
|
1098
|
+
readonly id: "grok-3-fast";
|
|
1099
|
+
readonly name: "Grok 3 Fast";
|
|
1100
|
+
readonly provider: "xai";
|
|
1101
|
+
readonly family: "grok";
|
|
1102
|
+
readonly pricing: {
|
|
1103
|
+
readonly input: 0.000005;
|
|
1104
|
+
readonly output: 0.000025;
|
|
1105
|
+
readonly cacheRead: 0.00000125;
|
|
1106
|
+
};
|
|
1107
|
+
readonly contextWindow: 131072;
|
|
1108
|
+
readonly maxOutput: 8192;
|
|
1109
|
+
readonly modalities: {
|
|
1110
|
+
readonly input: readonly ["text"];
|
|
1111
|
+
readonly output: readonly ["text"];
|
|
1112
|
+
};
|
|
1113
|
+
readonly capabilities: {
|
|
1114
|
+
readonly reasoning: false;
|
|
1115
|
+
readonly toolCall: true;
|
|
1116
|
+
readonly attachment: false;
|
|
1117
|
+
readonly structuredOutput: false;
|
|
1118
|
+
};
|
|
1119
|
+
}, {
|
|
1120
|
+
readonly id: "grok-4.20-beta-latest-reasoning";
|
|
1121
|
+
readonly name: "Grok 4.20 Beta (Reasoning)";
|
|
1122
|
+
readonly provider: "xai";
|
|
1123
|
+
readonly family: "grok";
|
|
1124
|
+
readonly pricing: {
|
|
1125
|
+
readonly input: 0.000002;
|
|
1126
|
+
readonly output: 0.000006;
|
|
1127
|
+
readonly cacheRead: 2e-7;
|
|
1128
|
+
};
|
|
1129
|
+
readonly contextWindow: 2000000;
|
|
1130
|
+
readonly maxOutput: 30000;
|
|
1131
|
+
readonly modalities: {
|
|
1132
|
+
readonly input: readonly ["text", "image"];
|
|
1133
|
+
readonly output: readonly ["text"];
|
|
1134
|
+
};
|
|
1135
|
+
readonly capabilities: {
|
|
1136
|
+
readonly reasoning: true;
|
|
1137
|
+
readonly toolCall: true;
|
|
1138
|
+
readonly attachment: true;
|
|
1139
|
+
readonly structuredOutput: false;
|
|
1140
|
+
};
|
|
1141
|
+
}];
|
|
1142
|
+
/**
|
|
1143
|
+
* Look up a xAI model by ID.
|
|
1144
|
+
*
|
|
1145
|
+
* @param id - The provider-native model identifier.
|
|
1146
|
+
* @returns The matching model definition, or `null`.
|
|
1147
|
+
*
|
|
1148
|
+
* @example
|
|
1149
|
+
* ```typescript
|
|
1150
|
+
* import { xAIModel } from '@funkai/models/xai'
|
|
1151
|
+
*
|
|
1152
|
+
* const m = xAIModel('grok-2-1212')
|
|
1153
|
+
* if (m) {
|
|
1154
|
+
* console.log(m.pricing.input)
|
|
1155
|
+
* }
|
|
1156
|
+
* ```
|
|
1157
|
+
*/
|
|
1158
|
+
declare function xAIModel(id: LiteralUnion<XAIModelId, string>): ModelDefinition | null;
|
|
1159
|
+
//#endregion
|
|
1160
|
+
export { XAIModelId, xAIModel, xAIModels };
|
|
1161
|
+
//# sourceMappingURL=xai.d.mts.map
|