llm.rb 4.10.0 → 4.11.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +152 -0
- data/README.md +265 -113
- data/data/anthropic.json +209 -242
- data/data/deepseek.json +15 -15
- data/data/google.json +553 -403
- data/data/openai.json +740 -535
- data/data/xai.json +250 -253
- data/data/zai.json +157 -90
- data/lib/llm/context/deserializer.rb +2 -1
- data/lib/llm/context.rb +58 -2
- data/lib/llm/contract/completion.rb +7 -0
- data/lib/llm/error.rb +4 -0
- data/lib/llm/eventhandler.rb +7 -0
- data/lib/llm/function/registry.rb +106 -0
- data/lib/llm/function/task.rb +39 -0
- data/lib/llm/function.rb +12 -7
- data/lib/llm/mcp/transport/http.rb +40 -6
- data/lib/llm/mcp/transport/stdio.rb +7 -0
- data/lib/llm/mcp.rb +54 -24
- data/lib/llm/message.rb +9 -2
- data/lib/llm/provider.rb +10 -0
- data/lib/llm/providers/anthropic/response_adapter/completion.rb +6 -0
- data/lib/llm/providers/anthropic/stream_parser.rb +37 -4
- data/lib/llm/providers/anthropic.rb +1 -1
- data/lib/llm/providers/google/response_adapter/completion.rb +12 -5
- data/lib/llm/providers/google/stream_parser.rb +54 -11
- data/lib/llm/providers/google/utils.rb +30 -0
- data/lib/llm/providers/google.rb +2 -0
- data/lib/llm/providers/ollama/response_adapter/completion.rb +6 -0
- data/lib/llm/providers/ollama/stream_parser.rb +10 -4
- data/lib/llm/providers/ollama.rb +1 -1
- data/lib/llm/providers/openai/response_adapter/completion.rb +7 -0
- data/lib/llm/providers/openai/response_adapter/responds.rb +84 -10
- data/lib/llm/providers/openai/responses/stream_parser.rb +63 -4
- data/lib/llm/providers/openai/responses.rb +1 -1
- data/lib/llm/providers/openai/stream_parser.rb +68 -4
- data/lib/llm/providers/openai.rb +1 -1
- data/lib/llm/stream/queue.rb +51 -0
- data/lib/llm/stream.rb +102 -0
- data/lib/llm/tool.rb +50 -45
- data/lib/llm/tracer/telemetry.rb +2 -2
- data/lib/llm/version.rb +1 -1
- data/lib/llm.rb +3 -2
- data/llm.gemspec +2 -2
- metadata +7 -1
data/data/xai.json
CHANGED
|
@@ -7,20 +7,21 @@
|
|
|
7
7
|
"name": "xAI",
|
|
8
8
|
"doc": "https://docs.x.ai/docs/models",
|
|
9
9
|
"models": {
|
|
10
|
-
"grok-2-1212": {
|
|
11
|
-
"id": "grok-2-1212",
|
|
12
|
-
"name": "Grok 2 (1212)",
|
|
10
|
+
"grok-2-vision-1212": {
|
|
11
|
+
"id": "grok-2-vision-1212",
|
|
12
|
+
"name": "Grok 2 Vision (1212)",
|
|
13
13
|
"family": "grok",
|
|
14
|
-
"attachment":
|
|
14
|
+
"attachment": true,
|
|
15
15
|
"reasoning": false,
|
|
16
16
|
"tool_call": true,
|
|
17
17
|
"temperature": true,
|
|
18
18
|
"knowledge": "2024-08",
|
|
19
|
-
"release_date": "2024-
|
|
19
|
+
"release_date": "2024-08-20",
|
|
20
20
|
"last_updated": "2024-12-12",
|
|
21
21
|
"modalities": {
|
|
22
22
|
"input": [
|
|
23
|
-
"text"
|
|
23
|
+
"text",
|
|
24
|
+
"image"
|
|
24
25
|
],
|
|
25
26
|
"output": [
|
|
26
27
|
"text"
|
|
@@ -33,20 +34,21 @@
|
|
|
33
34
|
"cache_read": 2
|
|
34
35
|
},
|
|
35
36
|
"limit": {
|
|
36
|
-
"context":
|
|
37
|
-
"output":
|
|
37
|
+
"context": 8192,
|
|
38
|
+
"output": 4096
|
|
38
39
|
}
|
|
39
40
|
},
|
|
40
|
-
"grok-4
|
|
41
|
-
"id": "grok-4
|
|
42
|
-
"name": "Grok 4
|
|
41
|
+
"grok-4-fast": {
|
|
42
|
+
"id": "grok-4-fast",
|
|
43
|
+
"name": "Grok 4 Fast",
|
|
43
44
|
"family": "grok",
|
|
44
45
|
"attachment": true,
|
|
45
|
-
"reasoning":
|
|
46
|
+
"reasoning": true,
|
|
46
47
|
"tool_call": true,
|
|
47
48
|
"temperature": true,
|
|
48
|
-
"
|
|
49
|
-
"
|
|
49
|
+
"knowledge": "2025-07",
|
|
50
|
+
"release_date": "2025-09-19",
|
|
51
|
+
"last_updated": "2025-09-19",
|
|
50
52
|
"modalities": {
|
|
51
53
|
"input": [
|
|
52
54
|
"text",
|
|
@@ -58,24 +60,18 @@
|
|
|
58
60
|
},
|
|
59
61
|
"open_weights": false,
|
|
60
62
|
"cost": {
|
|
61
|
-
"input": 2,
|
|
62
|
-
"output":
|
|
63
|
-
"cache_read": 0.
|
|
64
|
-
"context_over_200k": {
|
|
65
|
-
"input": 4,
|
|
66
|
-
"output": 12,
|
|
67
|
-
"cache_read": 0.4
|
|
68
|
-
}
|
|
63
|
+
"input": 0.2,
|
|
64
|
+
"output": 0.5,
|
|
65
|
+
"cache_read": 0.05
|
|
69
66
|
},
|
|
70
67
|
"limit": {
|
|
71
68
|
"context": 2000000,
|
|
72
69
|
"output": 30000
|
|
73
|
-
}
|
|
74
|
-
"status": "beta"
|
|
70
|
+
}
|
|
75
71
|
},
|
|
76
|
-
"grok-2": {
|
|
77
|
-
"id": "grok-2",
|
|
78
|
-
"name": "Grok 2",
|
|
72
|
+
"grok-2-latest": {
|
|
73
|
+
"id": "grok-2-latest",
|
|
74
|
+
"name": "Grok 2 Latest",
|
|
79
75
|
"family": "grok",
|
|
80
76
|
"attachment": false,
|
|
81
77
|
"reasoning": false,
|
|
@@ -83,7 +79,7 @@
|
|
|
83
79
|
"temperature": true,
|
|
84
80
|
"knowledge": "2024-08",
|
|
85
81
|
"release_date": "2024-08-20",
|
|
86
|
-
"last_updated": "2024-
|
|
82
|
+
"last_updated": "2024-12-12",
|
|
87
83
|
"modalities": {
|
|
88
84
|
"input": [
|
|
89
85
|
"text"
|
|
@@ -103,17 +99,48 @@
|
|
|
103
99
|
"output": 8192
|
|
104
100
|
}
|
|
105
101
|
},
|
|
106
|
-
"grok-
|
|
107
|
-
"id": "grok-
|
|
108
|
-
"name": "Grok
|
|
102
|
+
"grok-4-fast-non-reasoning": {
|
|
103
|
+
"id": "grok-4-fast-non-reasoning",
|
|
104
|
+
"name": "Grok 4 Fast (Non-Reasoning)",
|
|
109
105
|
"family": "grok",
|
|
110
|
-
"attachment":
|
|
106
|
+
"attachment": true,
|
|
111
107
|
"reasoning": false,
|
|
112
108
|
"tool_call": true,
|
|
113
109
|
"temperature": true,
|
|
114
|
-
"knowledge": "
|
|
115
|
-
"release_date": "2025-
|
|
116
|
-
"last_updated": "2025-
|
|
110
|
+
"knowledge": "2025-07",
|
|
111
|
+
"release_date": "2025-09-19",
|
|
112
|
+
"last_updated": "2025-09-19",
|
|
113
|
+
"modalities": {
|
|
114
|
+
"input": [
|
|
115
|
+
"text",
|
|
116
|
+
"image"
|
|
117
|
+
],
|
|
118
|
+
"output": [
|
|
119
|
+
"text"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"open_weights": false,
|
|
123
|
+
"cost": {
|
|
124
|
+
"input": 0.2,
|
|
125
|
+
"output": 0.5,
|
|
126
|
+
"cache_read": 0.05
|
|
127
|
+
},
|
|
128
|
+
"limit": {
|
|
129
|
+
"context": 2000000,
|
|
130
|
+
"output": 30000
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"grok-4": {
|
|
134
|
+
"id": "grok-4",
|
|
135
|
+
"name": "Grok 4",
|
|
136
|
+
"family": "grok",
|
|
137
|
+
"attachment": false,
|
|
138
|
+
"reasoning": true,
|
|
139
|
+
"tool_call": true,
|
|
140
|
+
"temperature": true,
|
|
141
|
+
"knowledge": "2025-07",
|
|
142
|
+
"release_date": "2025-07-09",
|
|
143
|
+
"last_updated": "2025-07-09",
|
|
117
144
|
"modalities": {
|
|
118
145
|
"input": [
|
|
119
146
|
"text"
|
|
@@ -124,30 +151,30 @@
|
|
|
124
151
|
},
|
|
125
152
|
"open_weights": false,
|
|
126
153
|
"cost": {
|
|
127
|
-
"input":
|
|
128
|
-
"output":
|
|
129
|
-
"
|
|
154
|
+
"input": 3,
|
|
155
|
+
"output": 15,
|
|
156
|
+
"reasoning": 15,
|
|
157
|
+
"cache_read": 0.75
|
|
130
158
|
},
|
|
131
159
|
"limit": {
|
|
132
|
-
"context":
|
|
133
|
-
"output":
|
|
160
|
+
"context": 256000,
|
|
161
|
+
"output": 64000
|
|
134
162
|
}
|
|
135
163
|
},
|
|
136
|
-
"grok-
|
|
137
|
-
"id": "grok-
|
|
138
|
-
"name": "Grok
|
|
164
|
+
"grok-code-fast-1": {
|
|
165
|
+
"id": "grok-code-fast-1",
|
|
166
|
+
"name": "Grok Code Fast 1",
|
|
139
167
|
"family": "grok",
|
|
140
|
-
"attachment":
|
|
141
|
-
"reasoning":
|
|
168
|
+
"attachment": false,
|
|
169
|
+
"reasoning": true,
|
|
142
170
|
"tool_call": true,
|
|
143
171
|
"temperature": true,
|
|
144
|
-
"knowledge": "
|
|
145
|
-
"release_date": "
|
|
146
|
-
"last_updated": "
|
|
172
|
+
"knowledge": "2023-10",
|
|
173
|
+
"release_date": "2025-08-28",
|
|
174
|
+
"last_updated": "2025-08-28",
|
|
147
175
|
"modalities": {
|
|
148
176
|
"input": [
|
|
149
|
-
"text"
|
|
150
|
-
"image"
|
|
177
|
+
"text"
|
|
151
178
|
],
|
|
152
179
|
"output": [
|
|
153
180
|
"text"
|
|
@@ -155,21 +182,21 @@
|
|
|
155
182
|
},
|
|
156
183
|
"open_weights": false,
|
|
157
184
|
"cost": {
|
|
158
|
-
"input": 2,
|
|
159
|
-
"output":
|
|
160
|
-
"cache_read":
|
|
185
|
+
"input": 0.2,
|
|
186
|
+
"output": 1.5,
|
|
187
|
+
"cache_read": 0.02
|
|
161
188
|
},
|
|
162
189
|
"limit": {
|
|
163
|
-
"context":
|
|
164
|
-
"output":
|
|
190
|
+
"context": 256000,
|
|
191
|
+
"output": 10000
|
|
165
192
|
}
|
|
166
193
|
},
|
|
167
|
-
"grok-3": {
|
|
168
|
-
"id": "grok-3",
|
|
169
|
-
"name": "Grok 3",
|
|
194
|
+
"grok-3-mini-fast": {
|
|
195
|
+
"id": "grok-3-mini-fast",
|
|
196
|
+
"name": "Grok 3 Mini Fast",
|
|
170
197
|
"family": "grok",
|
|
171
198
|
"attachment": false,
|
|
172
|
-
"reasoning":
|
|
199
|
+
"reasoning": true,
|
|
173
200
|
"tool_call": true,
|
|
174
201
|
"temperature": true,
|
|
175
202
|
"knowledge": "2024-11",
|
|
@@ -185,26 +212,27 @@
|
|
|
185
212
|
},
|
|
186
213
|
"open_weights": false,
|
|
187
214
|
"cost": {
|
|
188
|
-
"input":
|
|
189
|
-
"output":
|
|
190
|
-
"
|
|
215
|
+
"input": 0.6,
|
|
216
|
+
"output": 4,
|
|
217
|
+
"reasoning": 4,
|
|
218
|
+
"cache_read": 0.15
|
|
191
219
|
},
|
|
192
220
|
"limit": {
|
|
193
221
|
"context": 131072,
|
|
194
222
|
"output": 8192
|
|
195
223
|
}
|
|
196
224
|
},
|
|
197
|
-
"grok-
|
|
198
|
-
"id": "grok-
|
|
199
|
-
"name": "Grok
|
|
200
|
-
"family": "grok",
|
|
225
|
+
"grok-beta": {
|
|
226
|
+
"id": "grok-beta",
|
|
227
|
+
"name": "Grok Beta",
|
|
228
|
+
"family": "grok-beta",
|
|
201
229
|
"attachment": false,
|
|
202
|
-
"reasoning":
|
|
230
|
+
"reasoning": false,
|
|
203
231
|
"tool_call": true,
|
|
204
232
|
"temperature": true,
|
|
205
|
-
"knowledge": "
|
|
206
|
-
"release_date": "
|
|
207
|
-
"last_updated": "
|
|
233
|
+
"knowledge": "2024-08",
|
|
234
|
+
"release_date": "2024-11-01",
|
|
235
|
+
"last_updated": "2024-11-01",
|
|
208
236
|
"modalities": {
|
|
209
237
|
"input": [
|
|
210
238
|
"text"
|
|
@@ -215,18 +243,18 @@
|
|
|
215
243
|
},
|
|
216
244
|
"open_weights": false,
|
|
217
245
|
"cost": {
|
|
218
|
-
"input":
|
|
219
|
-
"output":
|
|
220
|
-
"cache_read":
|
|
246
|
+
"input": 5,
|
|
247
|
+
"output": 15,
|
|
248
|
+
"cache_read": 5
|
|
221
249
|
},
|
|
222
250
|
"limit": {
|
|
223
|
-
"context":
|
|
224
|
-
"output":
|
|
251
|
+
"context": 131072,
|
|
252
|
+
"output": 4096
|
|
225
253
|
}
|
|
226
254
|
},
|
|
227
|
-
"grok-2-vision-
|
|
228
|
-
"id": "grok-2-vision-
|
|
229
|
-
"name": "Grok 2 Vision
|
|
255
|
+
"grok-2-vision-latest": {
|
|
256
|
+
"id": "grok-2-vision-latest",
|
|
257
|
+
"name": "Grok 2 Vision Latest",
|
|
230
258
|
"family": "grok",
|
|
231
259
|
"attachment": true,
|
|
232
260
|
"reasoning": false,
|
|
@@ -286,17 +314,17 @@
|
|
|
286
314
|
"output": 30000
|
|
287
315
|
}
|
|
288
316
|
},
|
|
289
|
-
"grok-
|
|
290
|
-
"id": "grok-
|
|
291
|
-
"name": "Grok
|
|
292
|
-
"family": "grok
|
|
317
|
+
"grok-2": {
|
|
318
|
+
"id": "grok-2",
|
|
319
|
+
"name": "Grok 2",
|
|
320
|
+
"family": "grok",
|
|
293
321
|
"attachment": false,
|
|
294
322
|
"reasoning": false,
|
|
295
323
|
"tool_call": true,
|
|
296
324
|
"temperature": true,
|
|
297
325
|
"knowledge": "2024-08",
|
|
298
|
-
"release_date": "2024-
|
|
299
|
-
"last_updated": "2024-
|
|
326
|
+
"release_date": "2024-08-20",
|
|
327
|
+
"last_updated": "2024-08-20",
|
|
300
328
|
"modalities": {
|
|
301
329
|
"input": [
|
|
302
330
|
"text"
|
|
@@ -307,21 +335,21 @@
|
|
|
307
335
|
},
|
|
308
336
|
"open_weights": false,
|
|
309
337
|
"cost": {
|
|
310
|
-
"input":
|
|
311
|
-
"output":
|
|
312
|
-
"cache_read":
|
|
338
|
+
"input": 2,
|
|
339
|
+
"output": 10,
|
|
340
|
+
"cache_read": 2
|
|
313
341
|
},
|
|
314
342
|
"limit": {
|
|
315
343
|
"context": 131072,
|
|
316
|
-
"output":
|
|
344
|
+
"output": 8192
|
|
317
345
|
}
|
|
318
346
|
},
|
|
319
|
-
"grok-3-
|
|
320
|
-
"id": "grok-3-
|
|
321
|
-
"name": "Grok 3
|
|
347
|
+
"grok-3-fast-latest": {
|
|
348
|
+
"id": "grok-3-fast-latest",
|
|
349
|
+
"name": "Grok 3 Fast Latest",
|
|
322
350
|
"family": "grok",
|
|
323
351
|
"attachment": false,
|
|
324
|
-
"reasoning":
|
|
352
|
+
"reasoning": false,
|
|
325
353
|
"tool_call": true,
|
|
326
354
|
"temperature": true,
|
|
327
355
|
"knowledge": "2024-11",
|
|
@@ -337,31 +365,29 @@
|
|
|
337
365
|
},
|
|
338
366
|
"open_weights": false,
|
|
339
367
|
"cost": {
|
|
340
|
-
"input":
|
|
341
|
-
"output":
|
|
342
|
-
"
|
|
343
|
-
"cache_read": 0.15
|
|
368
|
+
"input": 5,
|
|
369
|
+
"output": 25,
|
|
370
|
+
"cache_read": 1.25
|
|
344
371
|
},
|
|
345
372
|
"limit": {
|
|
346
373
|
"context": 131072,
|
|
347
374
|
"output": 8192
|
|
348
375
|
}
|
|
349
376
|
},
|
|
350
|
-
"grok-
|
|
351
|
-
"id": "grok-
|
|
352
|
-
"name": "Grok
|
|
377
|
+
"grok-2-1212": {
|
|
378
|
+
"id": "grok-2-1212",
|
|
379
|
+
"name": "Grok 2 (1212)",
|
|
353
380
|
"family": "grok",
|
|
354
|
-
"attachment":
|
|
355
|
-
"reasoning":
|
|
381
|
+
"attachment": false,
|
|
382
|
+
"reasoning": false,
|
|
356
383
|
"tool_call": true,
|
|
357
384
|
"temperature": true,
|
|
358
|
-
"knowledge": "
|
|
359
|
-
"release_date": "
|
|
360
|
-
"last_updated": "
|
|
385
|
+
"knowledge": "2024-08",
|
|
386
|
+
"release_date": "2024-12-12",
|
|
387
|
+
"last_updated": "2024-12-12",
|
|
361
388
|
"modalities": {
|
|
362
389
|
"input": [
|
|
363
|
-
"text"
|
|
364
|
-
"image"
|
|
390
|
+
"text"
|
|
365
391
|
],
|
|
366
392
|
"output": [
|
|
367
393
|
"text"
|
|
@@ -369,26 +395,26 @@
|
|
|
369
395
|
},
|
|
370
396
|
"open_weights": false,
|
|
371
397
|
"cost": {
|
|
372
|
-
"input":
|
|
373
|
-
"output":
|
|
374
|
-
"cache_read":
|
|
398
|
+
"input": 2,
|
|
399
|
+
"output": 10,
|
|
400
|
+
"cache_read": 2
|
|
375
401
|
},
|
|
376
402
|
"limit": {
|
|
377
|
-
"context":
|
|
378
|
-
"output":
|
|
403
|
+
"context": 131072,
|
|
404
|
+
"output": 8192
|
|
379
405
|
}
|
|
380
406
|
},
|
|
381
|
-
"grok-
|
|
382
|
-
"id": "grok-
|
|
383
|
-
"name": "Grok
|
|
407
|
+
"grok-3-mini": {
|
|
408
|
+
"id": "grok-3-mini",
|
|
409
|
+
"name": "Grok 3 Mini",
|
|
384
410
|
"family": "grok",
|
|
385
411
|
"attachment": false,
|
|
386
412
|
"reasoning": true,
|
|
387
413
|
"tool_call": true,
|
|
388
414
|
"temperature": true,
|
|
389
|
-
"knowledge": "
|
|
390
|
-
"release_date": "2025-
|
|
391
|
-
"last_updated": "2025-
|
|
415
|
+
"knowledge": "2024-11",
|
|
416
|
+
"release_date": "2025-02-17",
|
|
417
|
+
"last_updated": "2025-02-17",
|
|
392
418
|
"modalities": {
|
|
393
419
|
"input": [
|
|
394
420
|
"text"
|
|
@@ -399,26 +425,27 @@
|
|
|
399
425
|
},
|
|
400
426
|
"open_weights": false,
|
|
401
427
|
"cost": {
|
|
402
|
-
"input": 3,
|
|
403
|
-
"output":
|
|
404
|
-
"reasoning":
|
|
405
|
-
"cache_read": 0.
|
|
428
|
+
"input": 0.3,
|
|
429
|
+
"output": 0.5,
|
|
430
|
+
"reasoning": 0.5,
|
|
431
|
+
"cache_read": 0.075
|
|
406
432
|
},
|
|
407
433
|
"limit": {
|
|
408
|
-
"context":
|
|
409
|
-
"output":
|
|
434
|
+
"context": 131072,
|
|
435
|
+
"output": 8192
|
|
410
436
|
}
|
|
411
437
|
},
|
|
412
|
-
"grok-
|
|
413
|
-
"id": "grok-
|
|
414
|
-
"name": "Grok
|
|
438
|
+
"grok-2-vision": {
|
|
439
|
+
"id": "grok-2-vision",
|
|
440
|
+
"name": "Grok 2 Vision",
|
|
415
441
|
"family": "grok",
|
|
416
442
|
"attachment": true,
|
|
417
|
-
"reasoning":
|
|
443
|
+
"reasoning": false,
|
|
418
444
|
"tool_call": true,
|
|
419
445
|
"temperature": true,
|
|
420
|
-
"
|
|
421
|
-
"
|
|
446
|
+
"knowledge": "2024-08",
|
|
447
|
+
"release_date": "2024-08-20",
|
|
448
|
+
"last_updated": "2024-08-20",
|
|
422
449
|
"modalities": {
|
|
423
450
|
"input": [
|
|
424
451
|
"text",
|
|
@@ -431,19 +458,13 @@
|
|
|
431
458
|
"open_weights": false,
|
|
432
459
|
"cost": {
|
|
433
460
|
"input": 2,
|
|
434
|
-
"output":
|
|
435
|
-
"cache_read":
|
|
436
|
-
"context_over_200k": {
|
|
437
|
-
"input": 4,
|
|
438
|
-
"output": 12,
|
|
439
|
-
"cache_read": 0.4
|
|
440
|
-
}
|
|
461
|
+
"output": 10,
|
|
462
|
+
"cache_read": 2
|
|
441
463
|
},
|
|
442
464
|
"limit": {
|
|
443
|
-
"context":
|
|
444
|
-
"output":
|
|
445
|
-
}
|
|
446
|
-
"status": "beta"
|
|
465
|
+
"context": 8192,
|
|
466
|
+
"output": 4096
|
|
467
|
+
}
|
|
447
468
|
},
|
|
448
469
|
"grok-3-latest": {
|
|
449
470
|
"id": "grok-3-latest",
|
|
@@ -475,17 +496,16 @@
|
|
|
475
496
|
"output": 8192
|
|
476
497
|
}
|
|
477
498
|
},
|
|
478
|
-
"grok-4-
|
|
479
|
-
"id": "grok-4-
|
|
480
|
-
"name": "Grok 4.
|
|
499
|
+
"grok-4.20-multi-agent-0309": {
|
|
500
|
+
"id": "grok-4.20-multi-agent-0309",
|
|
501
|
+
"name": "Grok 4.20 Multi-Agent",
|
|
481
502
|
"family": "grok",
|
|
482
503
|
"attachment": true,
|
|
483
504
|
"reasoning": true,
|
|
484
|
-
"tool_call":
|
|
505
|
+
"tool_call": false,
|
|
485
506
|
"temperature": true,
|
|
486
|
-
"
|
|
487
|
-
"
|
|
488
|
-
"last_updated": "2025-11-19",
|
|
507
|
+
"release_date": "2026-03-09",
|
|
508
|
+
"last_updated": "2026-03-09",
|
|
489
509
|
"modalities": {
|
|
490
510
|
"input": [
|
|
491
511
|
"text",
|
|
@@ -497,30 +517,34 @@
|
|
|
497
517
|
},
|
|
498
518
|
"open_weights": false,
|
|
499
519
|
"cost": {
|
|
500
|
-
"input":
|
|
501
|
-
"output":
|
|
502
|
-
"cache_read": 0.
|
|
520
|
+
"input": 2,
|
|
521
|
+
"output": 6,
|
|
522
|
+
"cache_read": 0.2,
|
|
523
|
+
"context_over_200k": {
|
|
524
|
+
"input": 4,
|
|
525
|
+
"output": 12,
|
|
526
|
+
"cache_read": 0.4
|
|
527
|
+
}
|
|
503
528
|
},
|
|
504
529
|
"limit": {
|
|
505
530
|
"context": 2000000,
|
|
506
531
|
"output": 30000
|
|
507
532
|
}
|
|
508
533
|
},
|
|
509
|
-
"grok-
|
|
510
|
-
"id": "grok-
|
|
511
|
-
"name": "Grok
|
|
534
|
+
"grok-3-fast": {
|
|
535
|
+
"id": "grok-3-fast",
|
|
536
|
+
"name": "Grok 3 Fast",
|
|
512
537
|
"family": "grok",
|
|
513
|
-
"attachment":
|
|
538
|
+
"attachment": false,
|
|
514
539
|
"reasoning": false,
|
|
515
540
|
"tool_call": true,
|
|
516
541
|
"temperature": true,
|
|
517
|
-
"knowledge": "2024-
|
|
518
|
-
"release_date": "
|
|
519
|
-
"last_updated": "
|
|
542
|
+
"knowledge": "2024-11",
|
|
543
|
+
"release_date": "2025-02-17",
|
|
544
|
+
"last_updated": "2025-02-17",
|
|
520
545
|
"modalities": {
|
|
521
546
|
"input": [
|
|
522
|
-
"text"
|
|
523
|
-
"image"
|
|
547
|
+
"text"
|
|
524
548
|
],
|
|
525
549
|
"output": [
|
|
526
550
|
"text"
|
|
@@ -528,18 +552,18 @@
|
|
|
528
552
|
},
|
|
529
553
|
"open_weights": false,
|
|
530
554
|
"cost": {
|
|
531
|
-
"input":
|
|
532
|
-
"output":
|
|
533
|
-
"cache_read":
|
|
555
|
+
"input": 5,
|
|
556
|
+
"output": 25,
|
|
557
|
+
"cache_read": 1.25
|
|
534
558
|
},
|
|
535
559
|
"limit": {
|
|
536
|
-
"context":
|
|
537
|
-
"output":
|
|
560
|
+
"context": 131072,
|
|
561
|
+
"output": 8192
|
|
538
562
|
}
|
|
539
563
|
},
|
|
540
|
-
"grok-3-mini-latest": {
|
|
541
|
-
"id": "grok-3-mini-latest",
|
|
542
|
-
"name": "Grok 3 Mini Latest",
|
|
564
|
+
"grok-3-mini-fast-latest": {
|
|
565
|
+
"id": "grok-3-mini-fast-latest",
|
|
566
|
+
"name": "Grok 3 Mini Fast Latest",
|
|
543
567
|
"family": "grok",
|
|
544
568
|
"attachment": false,
|
|
545
569
|
"reasoning": true,
|
|
@@ -558,22 +582,22 @@
|
|
|
558
582
|
},
|
|
559
583
|
"open_weights": false,
|
|
560
584
|
"cost": {
|
|
561
|
-
"input": 0.
|
|
562
|
-
"output":
|
|
563
|
-
"reasoning":
|
|
564
|
-
"cache_read": 0.
|
|
585
|
+
"input": 0.6,
|
|
586
|
+
"output": 4,
|
|
587
|
+
"reasoning": 4,
|
|
588
|
+
"cache_read": 0.15
|
|
565
589
|
},
|
|
566
590
|
"limit": {
|
|
567
591
|
"context": 131072,
|
|
568
592
|
"output": 8192
|
|
569
593
|
}
|
|
570
594
|
},
|
|
571
|
-
"grok-3
|
|
572
|
-
"id": "grok-3
|
|
573
|
-
"name": "Grok 3
|
|
595
|
+
"grok-3": {
|
|
596
|
+
"id": "grok-3",
|
|
597
|
+
"name": "Grok 3",
|
|
574
598
|
"family": "grok",
|
|
575
599
|
"attachment": false,
|
|
576
|
-
"reasoning":
|
|
600
|
+
"reasoning": false,
|
|
577
601
|
"tool_call": true,
|
|
578
602
|
"temperature": true,
|
|
579
603
|
"knowledge": "2024-11",
|
|
@@ -589,19 +613,18 @@
|
|
|
589
613
|
},
|
|
590
614
|
"open_weights": false,
|
|
591
615
|
"cost": {
|
|
592
|
-
"input":
|
|
593
|
-
"output":
|
|
594
|
-
"
|
|
595
|
-
"cache_read": 0.075
|
|
616
|
+
"input": 3,
|
|
617
|
+
"output": 15,
|
|
618
|
+
"cache_read": 0.75
|
|
596
619
|
},
|
|
597
620
|
"limit": {
|
|
598
621
|
"context": 131072,
|
|
599
622
|
"output": 8192
|
|
600
623
|
}
|
|
601
624
|
},
|
|
602
|
-
"grok-3-mini-
|
|
603
|
-
"id": "grok-3-mini-
|
|
604
|
-
"name": "Grok 3 Mini
|
|
625
|
+
"grok-3-mini-latest": {
|
|
626
|
+
"id": "grok-3-mini-latest",
|
|
627
|
+
"name": "Grok 3 Mini Latest",
|
|
605
628
|
"family": "grok",
|
|
606
629
|
"attachment": false,
|
|
607
630
|
"reasoning": true,
|
|
@@ -620,30 +643,30 @@
|
|
|
620
643
|
},
|
|
621
644
|
"open_weights": false,
|
|
622
645
|
"cost": {
|
|
623
|
-
"input": 0.
|
|
624
|
-
"output":
|
|
625
|
-
"reasoning":
|
|
626
|
-
"cache_read": 0.
|
|
646
|
+
"input": 0.3,
|
|
647
|
+
"output": 0.5,
|
|
648
|
+
"reasoning": 0.5,
|
|
649
|
+
"cache_read": 0.075
|
|
627
650
|
},
|
|
628
651
|
"limit": {
|
|
629
652
|
"context": 131072,
|
|
630
653
|
"output": 8192
|
|
631
654
|
}
|
|
632
655
|
},
|
|
633
|
-
"grok-
|
|
634
|
-
"id": "grok-
|
|
635
|
-
"name": "Grok
|
|
656
|
+
"grok-4.20-0309-reasoning": {
|
|
657
|
+
"id": "grok-4.20-0309-reasoning",
|
|
658
|
+
"name": "Grok 4.20 (Reasoning)",
|
|
636
659
|
"family": "grok",
|
|
637
|
-
"attachment":
|
|
638
|
-
"reasoning":
|
|
660
|
+
"attachment": true,
|
|
661
|
+
"reasoning": true,
|
|
639
662
|
"tool_call": true,
|
|
640
663
|
"temperature": true,
|
|
641
|
-
"
|
|
642
|
-
"
|
|
643
|
-
"last_updated": "2024-12-12",
|
|
664
|
+
"release_date": "2026-03-09",
|
|
665
|
+
"last_updated": "2026-03-09",
|
|
644
666
|
"modalities": {
|
|
645
667
|
"input": [
|
|
646
|
-
"text"
|
|
668
|
+
"text",
|
|
669
|
+
"image"
|
|
647
670
|
],
|
|
648
671
|
"output": [
|
|
649
672
|
"text"
|
|
@@ -652,25 +675,29 @@
|
|
|
652
675
|
"open_weights": false,
|
|
653
676
|
"cost": {
|
|
654
677
|
"input": 2,
|
|
655
|
-
"output":
|
|
656
|
-
"cache_read": 2
|
|
678
|
+
"output": 6,
|
|
679
|
+
"cache_read": 0.2,
|
|
680
|
+
"context_over_200k": {
|
|
681
|
+
"input": 4,
|
|
682
|
+
"output": 12,
|
|
683
|
+
"cache_read": 0.4
|
|
684
|
+
}
|
|
657
685
|
},
|
|
658
686
|
"limit": {
|
|
659
|
-
"context":
|
|
660
|
-
"output":
|
|
687
|
+
"context": 2000000,
|
|
688
|
+
"output": 30000
|
|
661
689
|
}
|
|
662
690
|
},
|
|
663
|
-
"grok-4-
|
|
664
|
-
"id": "grok-4-
|
|
665
|
-
"name": "Grok 4
|
|
691
|
+
"grok-4.20-0309-non-reasoning": {
|
|
692
|
+
"id": "grok-4.20-0309-non-reasoning",
|
|
693
|
+
"name": "Grok 4.20 (Non-Reasoning)",
|
|
666
694
|
"family": "grok",
|
|
667
695
|
"attachment": true,
|
|
668
696
|
"reasoning": false,
|
|
669
697
|
"tool_call": true,
|
|
670
698
|
"temperature": true,
|
|
671
|
-
"
|
|
672
|
-
"
|
|
673
|
-
"last_updated": "2025-09-19",
|
|
699
|
+
"release_date": "2026-03-09",
|
|
700
|
+
"last_updated": "2026-03-09",
|
|
674
701
|
"modalities": {
|
|
675
702
|
"input": [
|
|
676
703
|
"text",
|
|
@@ -682,9 +709,14 @@
|
|
|
682
709
|
},
|
|
683
710
|
"open_weights": false,
|
|
684
711
|
"cost": {
|
|
685
|
-
"input":
|
|
686
|
-
"output":
|
|
687
|
-
"cache_read": 0.
|
|
712
|
+
"input": 2,
|
|
713
|
+
"output": 6,
|
|
714
|
+
"cache_read": 0.2,
|
|
715
|
+
"context_over_200k": {
|
|
716
|
+
"input": 4,
|
|
717
|
+
"output": 12,
|
|
718
|
+
"cache_read": 0.4
|
|
719
|
+
}
|
|
688
720
|
},
|
|
689
721
|
"limit": {
|
|
690
722
|
"context": 2000000,
|
|
@@ -722,46 +754,17 @@
|
|
|
722
754
|
"output": 4096
|
|
723
755
|
}
|
|
724
756
|
},
|
|
725
|
-
"grok-
|
|
726
|
-
"id": "grok-
|
|
727
|
-
"name": "Grok
|
|
728
|
-
"family": "grok",
|
|
729
|
-
"attachment": false,
|
|
730
|
-
"reasoning": false,
|
|
731
|
-
"tool_call": true,
|
|
732
|
-
"temperature": true,
|
|
733
|
-
"knowledge": "2024-11",
|
|
734
|
-
"release_date": "2025-02-17",
|
|
735
|
-
"last_updated": "2025-02-17",
|
|
736
|
-
"modalities": {
|
|
737
|
-
"input": [
|
|
738
|
-
"text"
|
|
739
|
-
],
|
|
740
|
-
"output": [
|
|
741
|
-
"text"
|
|
742
|
-
]
|
|
743
|
-
},
|
|
744
|
-
"open_weights": false,
|
|
745
|
-
"cost": {
|
|
746
|
-
"input": 5,
|
|
747
|
-
"output": 25,
|
|
748
|
-
"cache_read": 1.25
|
|
749
|
-
},
|
|
750
|
-
"limit": {
|
|
751
|
-
"context": 131072,
|
|
752
|
-
"output": 8192
|
|
753
|
-
}
|
|
754
|
-
},
|
|
755
|
-
"grok-4.20-beta-latest-reasoning": {
|
|
756
|
-
"id": "grok-4.20-beta-latest-reasoning",
|
|
757
|
-
"name": "Grok 4.20 Beta (Reasoning)",
|
|
757
|
+
"grok-4-1-fast": {
|
|
758
|
+
"id": "grok-4-1-fast",
|
|
759
|
+
"name": "Grok 4.1 Fast",
|
|
758
760
|
"family": "grok",
|
|
759
761
|
"attachment": true,
|
|
760
762
|
"reasoning": true,
|
|
761
763
|
"tool_call": true,
|
|
762
764
|
"temperature": true,
|
|
763
|
-
"
|
|
764
|
-
"
|
|
765
|
+
"knowledge": "2025-07",
|
|
766
|
+
"release_date": "2025-11-19",
|
|
767
|
+
"last_updated": "2025-11-19",
|
|
765
768
|
"modalities": {
|
|
766
769
|
"input": [
|
|
767
770
|
"text",
|
|
@@ -773,20 +776,14 @@
|
|
|
773
776
|
},
|
|
774
777
|
"open_weights": false,
|
|
775
778
|
"cost": {
|
|
776
|
-
"input": 2,
|
|
777
|
-
"output":
|
|
778
|
-
"cache_read": 0.
|
|
779
|
-
"context_over_200k": {
|
|
780
|
-
"input": 4,
|
|
781
|
-
"output": 12,
|
|
782
|
-
"cache_read": 0.4
|
|
783
|
-
}
|
|
779
|
+
"input": 0.2,
|
|
780
|
+
"output": 0.5,
|
|
781
|
+
"cache_read": 0.05
|
|
784
782
|
},
|
|
785
783
|
"limit": {
|
|
786
784
|
"context": 2000000,
|
|
787
785
|
"output": 30000
|
|
788
|
-
}
|
|
789
|
-
"status": "beta"
|
|
786
|
+
}
|
|
790
787
|
}
|
|
791
788
|
}
|
|
792
789
|
}
|