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.6.75 0.0.7 1.6.76 0.0.8 1.6.77 0.0.9 1.6.78 0.1.0 1.6.79 0.1.1 1.6.81 0.1.2 1.6.82 0.1.3 1.6.83 0.1.4 1.6.84 0.1.5 1.6.85 0.1.6 1.6.86 0.1.7 1.6.87 0.1.8 1.6.88 0.1.9 1.6.89 0.2.0 1.6.90
ai-engine / constants / models.php
ai-engine / constants Last commit date
engines.php 3 months ago init.php 1 week ago models.php 1 day ago types.php 1 year ago
models.php
1653 lines
1 <?php
2
3 // Price as of June 2024: https://openai.com/api/pricing/
4
5 // TODO: After 2027-02 (OpenAI ends fine-tune job creation on 2027-01-06), drop the `finetune` key from every model entry below and remove 'finetune' from every model's `tags` array.
6
7 define( 'MWAI_OPENAI_MODELS', [
8 /*
9 GPT-6 Astra
10 OpenAI's flagship, released 2026-09-03. Tool calling only works through the
11 Responses API, which the 'responses' tag already forces for this model.
12 https://developers.openai.com/api/docs/models/gpt-6-astra
13 */
14 [
15 'model' => 'gpt-6-astra',
16 'name' => 'GPT-6 Astra',
17 'family' => 'gpt-6',
18 'features' => ['completion'],
19 'price' => [
20 'in' => 10.00,
21 'out' => 50.00,
22 'cached' => 1.00,
23 ],
24 'type' => 'token',
25 'unit' => 1 / 1000000,
26 'maxCompletionTokens' => 128000,
27 'maxContextualTokens' => 1050000,
28 'finetune' => false,
29 // No 'verbosity': unlike the GPT-5.6 line, the model page does not document it.
30 // 'no-temperature': the API answers 400 "Unsupported parameter: 'temperature'" for this
31 // model. The GPT-5 line is caught by a name check in the engines, which a gpt-6 id does
32 // not match, so the tag is what stops us sending it (verified live 2026-09-05).
33 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'no-temperature', 'latest'],
34 'tools' => ['web_search', 'code_interpreter'],
35 'params' => [
36 // 'max' is new with this model; the effort dropdown reads this list.
37 'reasoning' => ['none', 'low', 'medium', 'high', 'xhigh', 'max']
38 ]
39 ],
40 /*
41 GPT-5.6 Sol
42 Frontier tier of the GPT-5.6 family; the bare gpt-5.6 alias points here.
43 https://developers.openai.com/api/docs/models/gpt-5.6-sol
44 */
45 [
46 'model' => 'gpt-5.6-sol',
47 'name' => 'GPT-5.6 Sol',
48 'family' => 'gpt-5',
49 'features' => ['completion'],
50 // Price cut by OpenAI on 2026-08-21 (was 5.00 / 30.00 / 0.50). Announced as
51 // promotional "at least through 2026-11-21", so re-check it after that date.
52 'price' => [
53 'in' => 4.00,
54 'out' => 20.00,
55 'cached' => 0.40,
56 ],
57 'type' => 'token',
58 'unit' => 1 / 1000000,
59 'maxCompletionTokens' => 128000,
60 'maxContextualTokens' => 1050000,
61 'finetune' => false,
62 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity', 'latest'],
63 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
64 'params' => [
65 'reasoning' => ['none', 'low', 'medium', 'high', 'xhigh'],
66 'verbosity' => ['low', 'medium', 'high']
67 ]
68 ],
69 /*
70 GPT-5.6 Terra
71 Balanced tier: strong intelligence at mid pricing.
72 https://developers.openai.com/api/docs/models/gpt-5.6-terra
73 */
74 [
75 'model' => 'gpt-5.6-terra',
76 'name' => 'GPT-5.6 Terra',
77 'family' => 'gpt-5',
78 'features' => ['completion'],
79 // Price cut by OpenAI on 2026-07-30 (was 2.50 / 15.00 / 0.25).
80 'price' => [
81 'in' => 2.00,
82 'out' => 12.00,
83 'cached' => 0.20,
84 ],
85 'type' => 'token',
86 'unit' => 1 / 1000000,
87 'maxCompletionTokens' => 128000,
88 'maxContextualTokens' => 1050000,
89 'finetune' => false,
90 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'],
91 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
92 'params' => [
93 'reasoning' => ['none', 'low', 'medium', 'high', 'xhigh'],
94 'verbosity' => ['low', 'medium', 'high']
95 ]
96 ],
97 /*
98 GPT-5.6 Luna
99 Efficient, high-volume tier of the GPT-5.6 family.
100 https://developers.openai.com/api/docs/models/gpt-5.6-luna
101 */
102 [
103 'model' => 'gpt-5.6-luna',
104 'name' => 'GPT-5.6 Luna',
105 'family' => 'gpt-5',
106 'features' => ['completion'],
107 // Price cut by OpenAI on 2026-07-30 (was 1.00 / 6.00 / 0.10).
108 'price' => [
109 'in' => 0.20,
110 'out' => 1.20,
111 'cached' => 0.02,
112 ],
113 'type' => 'token',
114 'unit' => 1 / 1000000,
115 'maxCompletionTokens' => 128000,
116 'maxContextualTokens' => 1050000,
117 'finetune' => false,
118 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'],
119 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
120 'params' => [
121 'reasoning' => ['none', 'low', 'medium', 'high', 'xhigh'],
122 'verbosity' => ['low', 'medium', 'high']
123 ]
124 ],
125 /*
126 GPT-5.5
127 Previous flagship: tool-heavy agents, grounded assistants, long-context retrieval
128 https://developers.openai.com/api/docs/models/gpt-5.5
129 */
130 [
131 'model' => 'gpt-5.5',
132 'name' => 'GPT-5.5',
133 'family' => 'gpt-5',
134 'features' => ['completion'],
135 'price' => [
136 'in' => 5.00,
137 'out' => 30.00,
138 'cached' => 0.50,
139 ],
140 'type' => 'token',
141 'unit' => 1 / 1000000,
142 'maxCompletionTokens' => 128000,
143 'maxContextualTokens' => 1050000,
144 'finetune' => false,
145 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'],
146 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
147 'params' => [
148 'reasoning' => ['none', 'low', 'medium', 'high', 'xhigh'],
149 'verbosity' => ['low', 'medium', 'high']
150 ]
151 ],
152 /*
153 GPT-5.4
154 Our most capable model for professional work
155 https://platform.openai.com/docs/models/gpt-5.4
156 */
157 [
158 'model' => 'gpt-5.4',
159 'name' => 'GPT-5.4',
160 'family' => 'gpt-5',
161 'features' => ['completion'],
162 'price' => [
163 'in' => 2.50,
164 'out' => 15.00,
165 ],
166 'type' => 'token',
167 'unit' => 1 / 1000000,
168 'maxCompletionTokens' => 128000,
169 'maxContextualTokens' => 1050000,
170 'finetune' => false,
171 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'],
172 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
173 'params' => [
174 'reasoning' => ['none', 'low', 'medium', 'high', 'xhigh'],
175 'verbosity' => ['low', 'medium', 'high']
176 ]
177 ],
178 /*
179 GPT-5.4 Pro
180 Most advanced model with enhanced reasoning for complex tasks
181 https://developers.openai.com/api/docs/models/gpt-5.4-pro
182 */
183 [
184 'model' => 'gpt-5.4-pro',
185 'name' => 'GPT-5.4 Pro',
186 'family' => 'gpt-5',
187 'features' => ['completion'],
188 'price' => [
189 'in' => 30.00,
190 'out' => 180.00,
191 ],
192 'type' => 'token',
193 'unit' => 1 / 1000000,
194 'maxCompletionTokens' => 128000,
195 'maxContextualTokens' => 1050000,
196 'finetune' => false,
197 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'responses', 'mcp', 'reasoning'],
198 'tools' => ['web_search', 'image_generation', 'file_search'],
199 'params' => [
200 'reasoning' => ['medium', 'high', 'xhigh'],
201 ]
202 ],
203 /*
204 GPT-5.4 Mini
205 Fast and cost-effective GPT-5.4 variant
206 https://developers.openai.com/api/docs/models/gpt-5.4-mini
207 */
208 [
209 'model' => 'gpt-5.4-mini',
210 'name' => 'GPT-5.4 Mini',
211 'family' => 'gpt-5',
212 'features' => ['completion'],
213 'price' => [
214 'in' => 0.75,
215 'out' => 4.50,
216 ],
217 'type' => 'token',
218 'unit' => 1 / 1000000,
219 'maxCompletionTokens' => 128000,
220 'maxContextualTokens' => 400000,
221 'finetune' => false,
222 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'],
223 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
224 'params' => [
225 'reasoning' => ['none', 'low', 'medium', 'high', 'xhigh'],
226 'verbosity' => ['low', 'medium', 'high']
227 ]
228 ],
229 /*
230 GPT-5.4 Nano
231 Ultra-fast and lightweight GPT-5.4 model
232 https://developers.openai.com/api/docs/models/gpt-5.4-nano
233 */
234 [
235 'model' => 'gpt-5.4-nano',
236 'name' => 'GPT-5.4 Nano',
237 'family' => 'gpt-5',
238 'features' => ['completion'],
239 'price' => [
240 'in' => 0.20,
241 'out' => 1.25,
242 ],
243 'type' => 'token',
244 'unit' => 1 / 1000000,
245 'maxCompletionTokens' => 128000,
246 'maxContextualTokens' => 400000,
247 'finetune' => false,
248 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'],
249 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
250 'params' => [
251 'reasoning' => ['none', 'low', 'medium', 'high', 'xhigh'],
252 'verbosity' => ['low', 'medium', 'high']
253 ]
254 ],
255 /*
256 GPT-5.3 Chat
257 GPT-5.3 model used in ChatGPT
258 https://developers.openai.com/api/docs/models/gpt-5.3-chat-latest
259 Shutdown: August 10, 2026.
260 */
261 [
262 'model' => 'gpt-5.3-chat-latest',
263 'name' => 'GPT-5.3 Chat',
264 'family' => 'gpt-5',
265 'features' => ['completion'],
266 'price' => [
267 'in' => 1.75,
268 'out' => 14.00,
269 ],
270 'type' => 'token',
271 'unit' => 1 / 1000000,
272 'maxCompletionTokens' => 16384,
273 'maxContextualTokens' => 128000,
274 'finetune' => false,
275 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'deprecated'],
276 'tools' => ['image_generation', 'code_interpreter']
277 ],
278 /*
279 GPT-5.2
280 The best model for coding and agentic tasks across industries
281 https://platform.openai.com/docs/models/gpt-5.2
282 */
283 [
284 'model' => 'gpt-5.2',
285 'name' => 'GPT-5.2',
286 'family' => 'gpt-5',
287 'features' => ['completion'],
288 'price' => [
289 'in' => 1.75,
290 'out' => 14.00,
291 ],
292 'type' => 'token',
293 'unit' => 1 / 1000000,
294 'maxCompletionTokens' => 128000,
295 'maxContextualTokens' => 400000,
296 'finetune' => false,
297 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'],
298 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
299 'params' => [
300 'reasoning' => ['none', 'low', 'medium', 'high', 'xhigh'],
301 'verbosity' => ['low', 'medium', 'high']
302 ]
303 ],
304 /*
305 GPT-5.2 Chat
306 GPT-5.2 model used in ChatGPT
307 https://platform.openai.com/docs/models/gpt-5.2
308 Shutdown: August 10, 2026.
309 */
310 [
311 'model' => 'gpt-5.2-chat-latest',
312 'name' => 'GPT-5.2 Chat',
313 'family' => 'gpt-5',
314 'features' => ['completion'],
315 'price' => [
316 'in' => 1.75,
317 'out' => 14.00,
318 ],
319 'type' => 'token',
320 'unit' => 1 / 1000000,
321 'maxCompletionTokens' => 128000,
322 'maxContextualTokens' => 400000,
323 'finetune' => false,
324 'tags' => ['core', 'chat', 'vision', 'files', 'responses', 'mcp', 'deprecated'],
325 'tools' => ['web_search', 'file_search', 'code_interpreter']
326 ],
327 /*
328 GPT-5.2 Pro
329 Version of GPT-5.2 that produces smarter and more precise responses
330 https://platform.openai.com/docs/models/gpt-5.2-pro
331 */
332 [
333 'model' => 'gpt-5.2-pro',
334 'name' => 'GPT-5.2 Pro',
335 'family' => 'gpt-5',
336 'features' => ['completion'],
337 'price' => [
338 'in' => 21.00,
339 'out' => 168.00,
340 ],
341 'type' => 'token',
342 'unit' => 1 / 1000000,
343 'maxCompletionTokens' => 128000,
344 'maxContextualTokens' => 400000,
345 'finetune' => false,
346 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'],
347 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
348 'params' => [
349 'reasoning' => ['medium', 'high', 'xhigh'],
350 'verbosity' => ['low', 'medium', 'high']
351 ]
352 ],
353 /*
354 GPT-5.1
355 Demo model with enhanced capabilities
356 https://platform.openai.com/docs/models/gpt-5.1
357 */
358 [
359 'model' => 'gpt-5.1',
360 'name' => 'GPT-5.1',
361 'family' => 'gpt-5',
362 'features' => ['completion'],
363 'price' => [
364 'in' => 1.25,
365 'out' => 10.00,
366 ],
367 'type' => 'token',
368 'unit' => 1 / 1000000,
369 'maxCompletionTokens' => 128000,
370 'maxContextualTokens' => 400000,
371 'finetune' => false,
372 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity'],
373 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
374 'params' => [
375 'reasoning' => ['none', 'minimal', 'low', 'medium', 'high'],
376 'verbosity' => ['low', 'medium', 'high']
377 ]
378 ],
379 /*
380 GPT-5
381 The best model for coding and agentic tasks across domains
382 https://platform.openai.com/docs/models/gpt-5
383 */
384 [
385 'model' => 'gpt-5',
386 'name' => 'GPT-5',
387 'family' => 'gpt-5',
388 'features' => ['completion'],
389 'price' => [
390 'in' => 1.25,
391 'out' => 10.00,
392 ],
393 'type' => 'token',
394 'unit' => 1 / 1000000,
395 'maxCompletionTokens' => 128000,
396 'maxContextualTokens' => 400000,
397 'finetune' => false,
398 // Shutdown: December 10, 2026.
399 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity', 'deprecated'],
400 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
401 'params' => [
402 'reasoning' => ['none', 'minimal', 'low', 'medium', 'high'],
403 'verbosity' => ['low', 'medium', 'high']
404 ]
405 ],
406 /*
407 GPT-5 Mini
408 Efficient and cost-effective GPT-5 variant
409 https://platform.openai.com/docs/models/gpt-5-mini
410 */
411 [
412 'model' => 'gpt-5-mini',
413 'name' => 'GPT-5 Mini',
414 'family' => 'gpt-5',
415 'features' => ['completion'],
416 'price' => [
417 'in' => 0.25,
418 'out' => 2.00,
419 ],
420 'type' => 'token',
421 'unit' => 1 / 1000000,
422 'maxCompletionTokens' => 128000,
423 'maxContextualTokens' => 400000,
424 'finetune' => false,
425 // Shutdown: December 10, 2026.
426 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity', 'deprecated'],
427 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
428 'params' => [
429 'reasoning' => ['none', 'minimal', 'low', 'medium', 'high'],
430 'verbosity' => ['low', 'medium', 'high']
431 ]
432 ],
433 /*
434 GPT-5 Nano
435 Ultra-fast and lightweight GPT-5 model
436 https://platform.openai.com/docs/models/gpt-5-nano
437 */
438 [
439 'model' => 'gpt-5-nano',
440 'name' => 'GPT-5 Nano',
441 'family' => 'gpt-5',
442 'features' => ['completion'],
443 'price' => [
444 'in' => 0.05,
445 'out' => 0.40,
446 ],
447 'type' => 'token',
448 'unit' => 1 / 1000000,
449 'maxCompletionTokens' => 128000,
450 'maxContextualTokens' => 400000,
451 'finetune' => false,
452 // Shutdown: December 10, 2026.
453 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity', 'deprecated'],
454 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
455 'params' => [
456 'reasoning' => ['none', 'minimal', 'low', 'medium', 'high'],
457 'verbosity' => ['low', 'medium', 'high']
458 ]
459 ],
460 /*
461 GPT-5 Chat
462 GPT-5 model used in ChatGPT
463 https://platform.openai.com/docs/models/gpt-5
464 */
465 [
466 'model' => 'gpt-5-chat-latest',
467 'name' => 'GPT-5 Chat',
468 'family' => 'gpt-5',
469 'features' => ['completion'],
470 'price' => [
471 'in' => 1.25,
472 'out' => 10.00,
473 ],
474 'type' => 'token',
475 'unit' => 1 / 1000000,
476 'maxCompletionTokens' => 16384,
477 'maxContextualTokens' => 128000,
478 'finetune' => false,
479 // Shutdown: July 23, 2026.
480 'tags' => ['core', 'chat', 'vision', 'files', 'responses', 'mcp', 'deprecated'],
481 'tools' => ['web_search', 'file_search', 'code_interpreter'],
482 'params' => [
483 'verbosity' => ['low', 'medium', 'high']
484 ]
485 ],
486 /*
487 GPT-5 Pro
488 Version of GPT-5 that produces smarter and more precise responses
489 https://platform.openai.com/docs/models/gpt-5
490 */
491 [
492 'model' => 'gpt-5-pro',
493 'name' => 'GPT-5 Pro',
494 'family' => 'gpt-5',
495 'features' => ['completion'],
496 'price' => [
497 'in' => 15.00,
498 'out' => 120.00,
499 ],
500 'type' => 'token',
501 'unit' => 1 / 1000000,
502 'maxCompletionTokens' => 272000,
503 'maxContextualTokens' => 400000,
504 'finetune' => false,
505 // Shutdown: December 10, 2026.
506 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'json', 'responses', 'mcp', 'reasoning', 'verbosity', 'deprecated'],
507 'tools' => ['web_search', 'image_generation', 'file_search', 'code_interpreter'],
508 'params' => [
509 'reasoning' => ['none', 'minimal', 'low', 'medium', 'high'],
510 'verbosity' => ['low', 'medium', 'high']
511 ]
512 ],
513 /*
514 GPT 4.1
515 Flagship GPT model for complex tasks
516 https://platform.openai.com/docs/models/gpt-4.1
517 */
518 [
519 'model' => 'gpt-4.1',
520 'name' => 'GPT-4.1',
521 'family' => 'gpt-4',
522 'features' => ['completion'],
523 'price' => [
524 'in' => 2.00,
525 'out' => 8.00,
526 ],
527 'type' => 'token',
528 'unit' => 1 / 1000000,
529 'maxCompletionTokens' => 32768,
530 'maxContextualTokens' => 1047576,
531 'finetune' => false,
532 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'finetune', 'responses', 'mcp', 'deprecated'],
533 'tools' => ['web_search', 'image_generation', 'code_interpreter']
534 ],
535 /*
536 GPT-4.1 mini
537 Balanced for intelligence, speed, and cost
538 https://platform.openai.com/docs/models/gpt-4.1-mini
539 */
540 [
541 'model' => 'gpt-4.1-mini',
542 'name' => 'GPT-4.1 Mini',
543 'family' => 'gpt-4',
544 'features' => ['completion'],
545 'price' => [
546 'in' => 0.40,
547 'out' => 1.60,
548 ],
549 'type' => 'token',
550 'unit' => 1 / 1000000,
551 'maxCompletionTokens' => 32768,
552 'maxContextualTokens' => 1047576,
553 'finetune' => false,
554 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'finetune', 'responses', 'mcp', 'deprecated'],
555 'tools' => ['web_search', 'image_generation', 'code_interpreter']
556 ],
557 /*
558 GPT-4.1 nano
559 Fastest, most cost-effective GPT-4.1 model
560 https://platform.openai.com/docs/models/gpt-4.1-nano
561 */
562 [
563 'model' => 'gpt-4.1-nano',
564 'name' => 'GPT-4.1 Nano',
565 'family' => 'gpt-4',
566 'features' => ['completion'],
567 'price' => [
568 'in' => 0.10,
569 'out' => 0.40,
570 ],
571 'type' => 'token',
572 'unit' => 1 / 1000000,
573 'maxCompletionTokens' => 32768,
574 'maxContextualTokens' => 1047576,
575 'finetune' => false,
576 // Shutdown: October 23, 2026.
577 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'finetune', 'responses', 'mcp', 'deprecated'],
578 'tools' => ['image_generation']
579 ],
580 /*
581 GPT-4o
582 Fast, intelligent, flexible GPT model
583 https://platform.openai.com/docs/models/gpt-4o
584 */
585 [
586 'model' => 'gpt-4o',
587 'name' => 'GPT-4o',
588 'family' => 'gpt-4',
589 'features' => ['completion'],
590 'price' => [
591 'in' => 2.50,
592 'out' => 10.00,
593 ],
594 'type' => 'token',
595 'unit' => 1 / 1000000,
596 'maxCompletionTokens' => 16384,
597 'maxContextualTokens' => 128000,
598 'finetune' => false,
599 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'finetune', 'mcp', 'responses', 'deprecated'],
600 'tools' => ['web_search', 'image_generation', 'code_interpreter']
601 ],
602 /*
603 GPT-4o mini
604 Fast, affordable small model for focused tasks
605 https://platform.openai.com/docs/models/gpt-4o-mini
606 */
607 [
608 'model' => 'gpt-4o-mini',
609 'name' => 'GPT-4o Mini',
610 'family' => 'gpt-4',
611 'features' => ['completion'],
612 'price' => [
613 'in' => 0.15,
614 'out' => 0.60,
615 ],
616 'type' => 'token',
617 'unit' => 1 / 1000000,
618 'maxCompletionTokens' => 16384,
619 'maxContextualTokens' => 128000,
620 'finetune' => [
621 'in' => 0.15,
622 'out' => 0.60,
623 'train' => 3.00
624 ],
625 'tags' => ['core', 'chat', 'vision', 'functions', 'json', 'finetune', 'mcp', 'responses', 'deprecated'],
626 'tools' => ['web_search', 'image_generation', 'code_interpreter']
627 ],
628 /*
629 o3
630 Advanced reasoning model
631 https://platform.openai.com/docs/models/o3
632 */
633 [
634 'model' => 'o3',
635 'name' => 'o3',
636 'family' => 'o3',
637 'features' => ['completion'],
638 // We were still on o3's launch-era pricing, so every o3 query was costed 7.5x too high.
639 'price' => [
640 'in' => 2.00,
641 'out' => 8.00,
642 ],
643 'type' => 'token',
644 'unit' => 1 / 1000000,
645 'maxCompletionTokens' => 100000,
646 'maxContextualTokens' => 200000,
647 'tags' => ['core', 'chat', 'o1-model', 'reasoning', 'responses', 'mcp'],
648 'tools' => ['web_search', 'image_generation', 'code_interpreter']
649 ],
650 /*
651 o3-mini
652 Fast, flexible, intelligent reasoning model
653 https://platform.openai.com/docs/models/o3-mini
654 */
655 [
656 'model' => 'o3-mini',
657 'name' => 'o3 Mini',
658 'family' => 'o3',
659 'features' => ['completion'],
660 'price' => [
661 'in' => 1.10,
662 'out' => 4.40,
663 ],
664 'type' => 'token',
665 'unit' => 1 / 1000000,
666 'maxCompletionTokens' => 100000,
667 'maxContextualTokens' => 200000,
668 // Shutdown: October 23, 2026.
669 'tags' => ['core', 'chat', 'o1-model', 'reasoning', 'responses', 'mcp', 'deprecated'],
670 'tools' => ['web_search', 'image_generation', 'code_interpreter']
671 ],
672 /*
673 GPT Realtime 2
674 Voice model with GPT-5-class reasoning, stronger instruction following, and multilingual support.
675 https://platform.openai.com/docs/models/gpt-realtime-2
676 */
677 [
678 'model' => 'gpt-realtime-2',
679 'name' => 'GPT Realtime 2',
680 'family' => 'realtime',
681 'features' => ['core', 'realtime', 'functions'],
682 'price' => [
683 'text' => [
684 'in' => 4.00,
685 'cache' => 0.40,
686 'out' => 16.00,
687 ],
688 'audio' => [
689 'in' => 32.00,
690 'cache' => 0.40,
691 'out' => 64.00,
692 ],
693 'image' => [
694 'in' => 5.00,
695 'cache' => 0.50,
696 ]
697 ],
698 'type' => 'token',
699 'unit' => 1 / 1000000,
700 'maxCompletionTokens' => 4096,
701 'maxContextualTokens' => 128000,
702 'finetune' => false,
703 'tags' => ['core', 'realtime', 'functions', 'vision', 'mcp']
704 ],
705 /*
706 GPT Realtime
707 Production-ready speech-to-speech model with MCP, image input, and SIP support
708 https://platform.openai.com/docs/models/gpt-realtime
709 */
710 [
711 'model' => 'gpt-realtime',
712 'name' => 'GPT Realtime',
713 'family' => 'realtime',
714 'features' => ['core', 'realtime', 'functions'],
715 'price' => [
716 'text' => [
717 'in' => 4.00,
718 'cache' => 0.40,
719 'out' => 16.00,
720 ],
721 'audio' => [
722 'in' => 32.00,
723 'cache' => 0.40,
724 'out' => 64.00,
725 ],
726 'image' => [
727 'in' => 5.00,
728 'cache' => 0.50,
729 ]
730 ],
731 'type' => 'token',
732 'unit' => 1 / 1000000,
733 'maxCompletionTokens' => 4096,
734 'maxContextualTokens' => 128000,
735 'finetune' => false,
736 'tags' => ['core', 'realtime', 'functions', 'vision', 'mcp']
737 ],
738 /*
739 GPT Realtime Mini
740 Cost-efficient version of GPT Realtime
741 https://platform.openai.com/docs/models/gpt-realtime-mini
742 */
743 [
744 'model' => 'gpt-realtime-mini',
745 'name' => 'GPT Realtime Mini',
746 'family' => 'realtime',
747 'features' => ['core', 'realtime', 'functions'],
748 'price' => [
749 'text' => [
750 'in' => 0.60,
751 'cache' => 0.06,
752 'out' => 2.40,
753 ],
754 'audio' => [
755 'in' => 10.00,
756 'cache' => 0.06,
757 'out' => 20.00,
758 ]
759 ],
760 'type' => 'token',
761 'unit' => 1 / 1000000,
762 'maxCompletionTokens' => 4096,
763 'maxContextualTokens' => 32000,
764 'finetune' => false,
765 'tags' => ['core', 'realtime', 'functions', 'vision', 'deprecated']
766 ],
767 // TODO: gpt-realtime-translate and gpt-realtime-whisper are intentionally
768 // not exposed yet. Both run on their own OpenAI endpoints
769 // (/v1/realtime/translations/client_secrets and the realtime transcription
770 // session) with a one-way streaming contract, no tools, no conversation,
771 // and a different event prefix. They do not fit the chatbot session shape
772 // in premium/realtime.php and would warrant their own "Live Translation"
773 // and "Live Transcription" modes if a clear WordPress use case shows up.
774 /*
775 GPT Image
776 OpenAI's image generation models (token-based pricing)
777 https://platform.openai.com/docs/models/gpt-image-1
778 */
779 [
780 'model' => 'gpt-image-2',
781 'name' => 'GPT Image 2',
782 'family' => 'gpt-image',
783 'features' => ['text-to-image'],
784 'resolutions' => [
785 [
786 'name' => '1024x1024',
787 'label' => '1024x1024'
788 ],
789 [
790 'name' => '1024x1536',
791 'label' => '1024x1536'
792 ],
793 [
794 'name' => '1536x1024',
795 'label' => '1536x1024'
796 ]
797 ],
798 'qualities' => [
799 [ 'name' => 'auto', 'label' => 'Auto' ],
800 [ 'name' => 'low', 'label' => 'Low' ],
801 [ 'name' => 'medium', 'label' => 'Medium' ],
802 [ 'name' => 'high', 'label' => 'High' ]
803 ],
804 'type' => 'token',
805 'mode' => 'image',
806 'price' => [
807 'in' => 8.00,
808 'out' => 30.00,
809 'cached' => 2.00
810 ],
811 'unit' => 1 / 1000000,
812 'finetune' => false,
813 'tags' => ['core', 'image', 'image-edit', 'responses']
814 ],
815 [
816 'model' => 'gpt-image-1.5',
817 'name' => 'GPT Image 1.5',
818 'family' => 'gpt-image',
819 'features' => ['text-to-image'],
820 'resolutions' => [
821 [
822 'name' => '1024x1024',
823 'label' => '1024x1024'
824 ],
825 [
826 'name' => '1024x1536',
827 'label' => '1024x1536'
828 ],
829 [
830 'name' => '1536x1024',
831 'label' => '1536x1024'
832 ]
833 ],
834 'qualities' => [
835 [ 'name' => 'auto', 'label' => 'Auto' ],
836 [ 'name' => 'low', 'label' => 'Low' ],
837 [ 'name' => 'medium', 'label' => 'Medium' ],
838 [ 'name' => 'high', 'label' => 'High' ]
839 ],
840 'type' => 'token',
841 'mode' => 'image',
842 'price' => [
843 'in' => 8.00,
844 'out' => 32.00,
845 'cached' => 2.00
846 ],
847 'unit' => 1 / 1000000,
848 'finetune' => false,
849 // Shutdown: December 1, 2026.
850 'tags' => ['core', 'image', 'image-edit', 'responses', 'deprecated']
851 ],
852 [
853 'model' => 'gpt-image-1',
854 'name' => 'GPT Image 1',
855 'family' => 'gpt-image',
856 'features' => ['text-to-image'],
857 'resolutions' => [
858 [
859 'name' => '1024x1024',
860 'label' => '1024x1024'
861 ],
862 [
863 'name' => '1024x1536',
864 'label' => '1024x1536'
865 ],
866 [
867 'name' => '1536x1024',
868 'label' => '1536x1024'
869 ]
870 ],
871 'qualities' => [
872 [ 'name' => 'auto', 'label' => 'Auto' ],
873 [ 'name' => 'low', 'label' => 'Low' ],
874 [ 'name' => 'medium', 'label' => 'Medium' ],
875 [ 'name' => 'high', 'label' => 'High' ]
876 ],
877 'type' => 'token',
878 'mode' => 'image',
879 'price' => [
880 'in' => 10.00,
881 'out' => 40.00,
882 'cached' => 2.50
883 ],
884 'unit' => 1 / 1000000,
885 'finetune' => false,
886 // Shutdown: October 23, 2026.
887 'tags' => ['core', 'image', 'image-edit', 'responses', 'deprecated']
888 ],
889 [
890 'model' => 'gpt-image-1-mini',
891 'name' => 'GPT Image 1 Mini',
892 'family' => 'gpt-image',
893 'features' => ['text-to-image'],
894 'resolutions' => [
895 [
896 'name' => '1024x1024',
897 'label' => '1024x1024'
898 ],
899 [
900 'name' => '1024x1536',
901 'label' => '1024x1536'
902 ],
903 [
904 'name' => '1536x1024',
905 'label' => '1536x1024'
906 ]
907 ],
908 'qualities' => [
909 [ 'name' => 'auto', 'label' => 'Auto' ],
910 [ 'name' => 'low', 'label' => 'Low' ],
911 [ 'name' => 'medium', 'label' => 'Medium' ],
912 [ 'name' => 'high', 'label' => 'High' ]
913 ],
914 'type' => 'token',
915 'mode' => 'image',
916 'price' => [
917 'in' => 2.50,
918 'out' => 8.00,
919 'cached' => 0.25
920 ],
921 'unit' => 1 / 1000000,
922 'finetune' => false,
923 // Shutdown: December 1, 2026.
924 'tags' => ['core', 'image', 'image-edit', 'responses', 'deprecated']
925 ],
926 /*
927 Sora 2
928 Flagship video generation with synced audio
929 https://platform.openai.com/docs/models/sora-2
930 */
931 [
932 'model' => 'sora-2',
933 'name' => 'Sora 2',
934 'family' => 'sora',
935 'features' => ['text-to-video'],
936 'resolutions' => [
937 [
938 'name' => '720x1280',
939 'label' => 'Portrait (720x1280)',
940 'price' => 0.10
941 ],
942 [
943 'name' => '1280x720',
944 'label' => 'Landscape (1280x720)',
945 'price' => 0.10
946 ]
947 ],
948 'durations' => [ 4, 8, 12 ],
949 'type' => 'video',
950 'unit' => 'second',
951 'finetune' => false,
952 // Shutdown: September 24, 2026.
953 'tags' => ['core', 'video', 'deprecated']
954 ],
955 [
956 'model' => 'sora-2-pro',
957 'name' => 'Sora 2 Pro',
958 'family' => 'sora',
959 'features' => ['text-to-video'],
960 'resolutions' => [
961 [
962 'name' => '720x1280',
963 'label' => 'Portrait (720x1280)',
964 'price' => 0.30
965 ],
966 [
967 'name' => '1280x720',
968 'label' => 'Landscape (1280x720)',
969 'price' => 0.30
970 ],
971 [
972 'name' => '1024x1792',
973 'label' => 'Portrait High (1024x1792)',
974 'price' => 0.50
975 ],
976 [
977 'name' => '1792x1024',
978 'label' => 'Landscape High (1792x1024)',
979 'price' => 0.50
980 ]
981 ],
982 'durations' => [ 4, 8, 12 ],
983 'type' => 'video',
984 'unit' => 'second',
985 'finetune' => false,
986 // Shutdown: September 24, 2026.
987 'tags' => ['core', 'video', 'deprecated']
988 ],
989 // Embedding models:
990 // OpenAI v3 models support Matryoshka embeddings (MRL) allowing dimension truncation
991 // while preserving semantic meaning. The dimensions array lists native + recommended sizes.
992 // See: https://huggingface.co/blog/matryoshka
993 [
994 'model' => 'text-embedding-3-small',
995 'name' => 'Embedding 3-Small',
996 'family' => 'text-embedding',
997 'features' => ['embedding'],
998 'price' => 0.02,
999 'type' => 'token',
1000 'unit' => 1 / 1000000,
1001 'finetune' => false,
1002 'dimensions' => 1536, // Native output dimension
1003 'tags' => ['core', 'embedding', 'matryoshka'],
1004 ],
1005 [
1006 'model' => 'text-embedding-3-large',
1007 'name' => 'Embedding 3-Large',
1008 'family' => 'text-embedding',
1009 'features' => ['embedding'],
1010 'price' => 0.13,
1011 'type' => 'token',
1012 'unit' => 1 / 1000000,
1013 'finetune' => false,
1014 'dimensions' => 3072, // Native output dimension
1015 'tags' => ['core', 'embedding', 'matryoshka'],
1016 ],
1017 // Ada-002 is a legacy model with fixed dimensions (no truncation support)
1018 [
1019 'model' => 'text-embedding-ada-002',
1020 'name' => 'Embedding Ada-002',
1021 'family' => 'text-embedding',
1022 'features' => ['embedding'],
1023 'price' => 0.10,
1024 'type' => 'token',
1025 'unit' => 1 / 1000000,
1026 'finetune' => false,
1027 'dimensions' => 1536, // Fixed dimension (no matryoshka support)
1028 'tags' => ['core', 'embedding'],
1029 ],
1030 // Audio Models:
1031 [
1032 'model' => 'gpt-transcribe',
1033 'name' => 'GPT Transcribe',
1034 'family' => 'whisper',
1035 'features' => ['speech-to-text'],
1036 'price' => 0.0045,
1037 'type' => 'second',
1038 'unit' => 1,
1039 'finetune' => false,
1040 'tags' => ['core', 'audio'],
1041 ],
1042 // whisper-1 and the gpt-4o-transcribe models were deprecated by OpenAI on 2026-08-26 and
1043 // shut down on 2027-02-26. Kept listed and tagged 'deprecated' so existing settings still
1044 // show what they point at. TODO: Remove after 2027-03-03.
1045 [
1046 'model' => 'gpt-4o-transcribe',
1047 'name' => 'GPT-4o Transcribe',
1048 'family' => 'whisper',
1049 'features' => ['speech-to-text'],
1050 'price' => 0.006,
1051 'type' => 'second',
1052 'unit' => 1,
1053 'finetune' => false,
1054 'tags' => ['core', 'audio', 'deprecated'],
1055 ],
1056 [
1057 'model' => 'gpt-4o-mini-transcribe',
1058 'name' => 'GPT-4o Mini Transcribe',
1059 'family' => 'whisper',
1060 'features' => ['speech-to-text'],
1061 'price' => 0.003,
1062 'type' => 'second',
1063 'unit' => 1,
1064 'finetune' => false,
1065 'tags' => ['core', 'audio', 'deprecated'],
1066 ],
1067 [
1068 'model' => 'whisper-1',
1069 'name' => 'Whisper',
1070 'family' => 'whisper',
1071 'features' => ['speech-to-text'],
1072 'price' => 0.006,
1073 'type' => 'second',
1074 'unit' => 1,
1075 'finetune' => false,
1076 'tags' => ['core', 'audio', 'deprecated'],
1077 ],
1078 ] );
1079
1080 define( 'MWAI_ANTHROPIC_MODELS', [
1081 [
1082 'model' => 'claude-fable-5-1',
1083 'name' => 'Claude Fable 5.1',
1084 'family' => 'claude-5',
1085 'features' => ['completion'],
1086 'price' => [
1087 'in' => 10.00,
1088 'out' => 50.00,
1089 // Cache reads are 0.025x the input price on Fable 5.1 (other Claude models use 0.1x).
1090 'cached' => 0.25,
1091 ],
1092 'type' => 'token',
1093 'unit' => 1 / 1000000,
1094 'maxCompletionTokens' => 128000,
1095 'maxContextualTokens' => 1000000,
1096 'finetune' => false,
1097 // Same surface as Fable 5 (always-on adaptive thinking, no temperature, no
1098 // prefill). New in 5.1: forced tool_choice (any/tool) returns a 400, and
1099 // replayed thinking blocks are bound to the conversation prefix. Our engine
1100 // never forces tool_choice and only replays blocks append-only within the
1101 // function-call loop, so no special handling is needed.
1102 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'no-temperature', 'latest'],
1103 'tools' => ['code_interpreter', 'thinking', 'web_search']
1104 ],
1105 [
1106 'model' => 'claude-fable-5',
1107 'name' => 'Claude Fable 5',
1108 'family' => 'claude-5',
1109 'features' => ['completion'],
1110 'price' => [
1111 'in' => 10.00,
1112 'out' => 50.00,
1113 ],
1114 'type' => 'token',
1115 'unit' => 1 / 1000000,
1116 'maxCompletionTokens' => 128000,
1117 'maxContextualTokens' => 1000000,
1118 'finetune' => false,
1119 // Adaptive thinking is always on (no disabled mode, no manual budget, no
1120 // assistant prefill). Our engine never sends those, so no special handling.
1121 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'no-temperature'],
1122 'tools' => ['code_interpreter', 'thinking', 'web_search']
1123 ],
1124 [
1125 'model' => 'claude-opus-5',
1126 'name' => 'Claude Opus 5',
1127 'family' => 'claude-5',
1128 'features' => ['completion'],
1129 'price' => [
1130 'in' => 5.00,
1131 'out' => 25.00,
1132 ],
1133 'type' => 'token',
1134 'unit' => 1 / 1000000,
1135 'maxCompletionTokens' => 128000,
1136 'maxContextualTokens' => 1000000,
1137 'finetune' => false,
1138 // Adaptive thinking (no extended-thinking param). Non-default temperature/
1139 // top_p/top_k are rejected, same as the other Claude 5 models.
1140 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'no-temperature', 'latest'],
1141 'tools' => ['code_interpreter', 'thinking', 'web_search']
1142 ],
1143 [
1144 'model' => 'claude-opus-4-8',
1145 'name' => 'Claude Opus 4.8',
1146 'family' => 'claude-4',
1147 'features' => ['completion'],
1148 'price' => [
1149 'in' => 5.00,
1150 'out' => 25.00,
1151 ],
1152 'type' => 'token',
1153 'unit' => 1 / 1000000,
1154 'maxCompletionTokens' => 128000,
1155 'maxContextualTokens' => 1000000,
1156 'finetune' => false,
1157 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'no-temperature'],
1158 'tools' => ['code_interpreter', 'thinking', 'web_search']
1159 ],
1160 [
1161 'model' => 'claude-opus-4-7',
1162 'name' => 'Claude Opus 4.7',
1163 'family' => 'claude-4',
1164 'features' => ['completion'],
1165 'price' => [
1166 'in' => 5.00,
1167 'out' => 25.00,
1168 ],
1169 'type' => 'token',
1170 'unit' => 1 / 1000000,
1171 'maxCompletionTokens' => 128000,
1172 'maxContextualTokens' => 1000000,
1173 'finetune' => false,
1174 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'no-temperature'],
1175 'tools' => ['code_interpreter', 'thinking', 'web_search']
1176 ],
1177 [
1178 'model' => 'claude-opus-4-6',
1179 'name' => 'Claude Opus 4.6',
1180 'family' => 'claude-4',
1181 'features' => ['completion'],
1182 'price' => [
1183 'in' => 5.00,
1184 'out' => 25.00,
1185 ],
1186 'type' => 'token',
1187 'unit' => 1 / 1000000,
1188 'maxCompletionTokens' => 128000,
1189 'maxContextualTokens' => 1000000,
1190 'finetune' => false,
1191 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp'],
1192 'tools' => ['code_interpreter', 'thinking', 'web_search']
1193 ],
1194 [
1195 'model' => 'claude-opus-4-5',
1196 'name' => 'Claude Opus 4.5',
1197 'family' => 'claude-4',
1198 'features' => ['completion'],
1199 'price' => [
1200 'in' => 5.00,
1201 'out' => 25.00,
1202 ],
1203 'type' => 'token',
1204 'unit' => 1 / 1000000,
1205 'maxCompletionTokens' => 64000,
1206 'maxContextualTokens' => 200000,
1207 'finetune' => false,
1208 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp'],
1209 'tools' => ['code_interpreter', 'thinking', 'web_search']
1210 ],
1211 [
1212 'model' => 'claude-sonnet-5',
1213 'name' => 'Claude Sonnet 5',
1214 'family' => 'claude-5',
1215 'features' => ['completion'],
1216 // Anthropic made the $2/$10 introductory pricing permanent in August 2026.
1217 'price' => [
1218 'in' => 2.00,
1219 'out' => 10.00,
1220 ],
1221 'type' => 'token',
1222 'unit' => 1 / 1000000,
1223 'maxCompletionTokens' => 128000,
1224 'maxContextualTokens' => 1000000,
1225 'finetune' => false,
1226 // Adaptive thinking is always on (no disabled mode, no manual budget, no
1227 // assistant prefill). Non-default temperature/top_p/top_k are rejected; the
1228 // 'no-temperature' tag stops us sending temperature, and we never send top_p/top_k.
1229 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'no-temperature', 'latest'],
1230 'tools' => ['code_interpreter', 'thinking', 'web_search']
1231 ],
1232 [
1233 'model' => 'claude-sonnet-4-6',
1234 'name' => 'Claude Sonnet 4.6',
1235 'family' => 'claude-4',
1236 'features' => ['completion'],
1237 'price' => [
1238 'in' => 3.00,
1239 'out' => 15.00,
1240 ],
1241 'type' => 'token',
1242 'unit' => 1 / 1000000,
1243 'maxCompletionTokens' => 64000,
1244 'maxContextualTokens' => 1000000,
1245 'finetune' => false,
1246 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp'],
1247 'tools' => ['code_interpreter', 'thinking', 'web_search']
1248 ],
1249 [
1250 'model' => 'claude-sonnet-4-5-20250929',
1251 'name' => 'Claude Sonnet 4.5 (2025/09/29)',
1252 'family' => 'claude-4',
1253 'features' => ['completion'],
1254 'price' => [
1255 'in' => 3.00,
1256 'out' => 15.00,
1257 ],
1258 'type' => 'token',
1259 'unit' => 1 / 1000000,
1260 'maxCompletionTokens' => 64000,
1261 'maxContextualTokens' => 200000,
1262 'finetune' => false,
1263 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp'],
1264 'tools' => ['code_interpreter', 'thinking', 'web_search']
1265 ],
1266 [
1267 'model' => 'claude-sonnet-4-5',
1268 'name' => 'Claude Sonnet 4.5',
1269 'family' => 'claude-4',
1270 'features' => ['completion'],
1271 'price' => [
1272 'in' => 3.00,
1273 'out' => 15.00,
1274 ],
1275 'type' => 'token',
1276 'unit' => 1 / 1000000,
1277 'maxCompletionTokens' => 64000,
1278 'maxContextualTokens' => 200000,
1279 'finetune' => false,
1280 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp'],
1281 'tools' => ['code_interpreter', 'thinking', 'web_search']
1282 ],
1283 // Claude Opus 4.1 was retired by Anthropic on 2026-08-05 (requests error) and removed
1284 // from this list on 2026-09-03. Sites still pointing at it get the usual unknown-model error.
1285 [
1286 'model' => 'claude-opus-4-20250514',
1287 'name' => 'Claude Opus 4 (2025/05/14)',
1288 'family' => 'claude-4',
1289 'features' => ['completion'],
1290 'price' => [
1291 'in' => 15.00,
1292 'out' => 75.00,
1293 ],
1294 'type' => 'token',
1295 'unit' => 1 / 1000000,
1296 'maxCompletionTokens' => 32000,
1297 'maxContextualTokens' => 200000,
1298 'finetune' => false,
1299 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'deprecated'],
1300 'tools' => ['code_interpreter', 'thinking', 'web_search']
1301 ],
1302 [
1303 'model' => 'claude-opus-4-0',
1304 'name' => 'Claude Opus 4',
1305 'family' => 'claude-4',
1306 'features' => ['completion'],
1307 'price' => [
1308 'in' => 15.00,
1309 'out' => 75.00,
1310 ],
1311 'type' => 'token',
1312 'unit' => 1 / 1000000,
1313 'maxCompletionTokens' => 32000,
1314 'maxContextualTokens' => 200000,
1315 'finetune' => false,
1316 // Deprecated by Anthropic: retires on the Claude API on June 15, 2026.
1317 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'deprecated'],
1318 'tools' => ['code_interpreter', 'thinking', 'web_search']
1319 ],
1320 [
1321 'model' => 'claude-sonnet-4-20250514',
1322 'name' => 'Claude Sonnet 4 (2025/05/14)',
1323 'family' => 'claude-4',
1324 'features' => ['completion'],
1325 'price' => [
1326 'in' => 3.00,
1327 'out' => 15.00,
1328 ],
1329 'type' => 'token',
1330 'unit' => 1 / 1000000,
1331 'maxCompletionTokens' => 64000,
1332 'maxContextualTokens' => 200000,
1333 'finetune' => false,
1334 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'deprecated'],
1335 'tools' => ['code_interpreter', 'thinking', 'web_search']
1336 ],
1337 [
1338 'model' => 'claude-sonnet-4-0',
1339 'name' => 'Claude Sonnet 4',
1340 'family' => 'claude-4',
1341 'features' => ['completion'],
1342 'price' => [
1343 'in' => 3.00,
1344 'out' => 15.00,
1345 ],
1346 'type' => 'token',
1347 'unit' => 1 / 1000000,
1348 'maxCompletionTokens' => 64000,
1349 'maxContextualTokens' => 200000,
1350 'finetune' => false,
1351 // Deprecated by Anthropic: retires on the Claude API on June 15, 2026.
1352 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'deprecated'],
1353 'tools' => ['code_interpreter', 'thinking', 'web_search']
1354 ],
1355 [
1356 'model' => 'claude-haiku-4-5-20251001',
1357 'name' => 'Claude-4.5 Haiku (2025/10/01)',
1358 'family' => 'claude-4',
1359 'features' => ['completion'],
1360 'price' => [
1361 'in' => 1.00,
1362 'out' => 5.00,
1363 ],
1364 'type' => 'token',
1365 'unit' => 1 / 1000000,
1366 'maxCompletionTokens' => 64000,
1367 'maxContextualTokens' => 200000,
1368 'finetune' => false,
1369 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp'],
1370 'tools' => ['code_interpreter', 'thinking', 'web_search']
1371 ],
1372 [
1373 'model' => 'claude-haiku-4-5',
1374 'name' => 'Claude-4.5 Haiku',
1375 'family' => 'claude-4',
1376 'features' => ['completion'],
1377 'price' => [
1378 'in' => 1.00,
1379 'out' => 5.00,
1380 ],
1381 'type' => 'token',
1382 'unit' => 1 / 1000000,
1383 'maxCompletionTokens' => 64000,
1384 'maxContextualTokens' => 200000,
1385 'finetune' => false,
1386 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp', 'latest'],
1387 'tools' => ['code_interpreter', 'thinking', 'web_search']
1388 ],
1389 [
1390 'model' => 'claude-3-7-sonnet-latest',
1391 'name' => 'Claude-3.7 Sonnet',
1392 'family' => 'claude-3',
1393 'features' => ['completion'],
1394 'price' => [
1395 'in' => 3.00,
1396 'out' => 15.00,
1397 ],
1398 'type' => 'token',
1399 'unit' => 1 / 1000000,
1400 'maxCompletionTokens' => 64000,
1401 'maxContextualTokens' => 200000,
1402 'finetune' => false,
1403 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'reasoning', 'mcp'],
1404 'tools' => ['code_interpreter', 'thinking', 'web_search']
1405 ],
1406 [
1407 'model' => 'claude-3-5-sonnet-latest',
1408 'name' => 'Claude-3.5 Sonnet',
1409 'family' => 'claude-3',
1410 'features' => ['completion'],
1411 'price' => [
1412 'in' => 3.00,
1413 'out' => 15.00,
1414 ],
1415 'type' => 'token',
1416 'unit' => 1 / 1000000,
1417 'maxCompletionTokens' => 4096,
1418 'maxContextualTokens' => 200000,
1419 'finetune' => false,
1420 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'mcp']
1421 ],
1422 [
1423 'model' => 'claude-3-5-sonnet-20241022',
1424 'name' => 'Claude-3.5 Sonnet (2024/10/22)',
1425 'family' => 'claude-3',
1426 'features' => ['completion'],
1427 'price' => [
1428 'in' => 3.00,
1429 'out' => 15.00,
1430 ],
1431 'type' => 'token',
1432 'unit' => 1 / 1000000,
1433 'maxCompletionTokens' => 4096,
1434 'maxContextualTokens' => 200000,
1435 'finetune' => false,
1436 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'mcp']
1437 ],
1438 [
1439 'model' => 'claude-3-5-sonnet-20240620',
1440 'name' => 'Claude-3.5 Sonnet (2024/06/20)',
1441 'family' => 'claude-3',
1442 'features' => ['completion'],
1443 'price' => [
1444 'in' => 3.00,
1445 'out' => 15.00,
1446 ],
1447 'type' => 'token',
1448 'unit' => 1 / 1000000,
1449 'maxCompletionTokens' => 4096,
1450 'maxContextualTokens' => 200000,
1451 'finetune' => false,
1452 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'mcp']
1453 ],
1454 [
1455 'model' => 'claude-3-sonnet-20240229',
1456 'name' => 'Claude-3 Sonnet (2024/02/29)',
1457 'family' => 'claude-3',
1458 'features' => ['completion'],
1459 'price' => [
1460 'in' => 3.00,
1461 'out' => 15.00,
1462 ],
1463 'type' => 'token',
1464 'unit' => 1 / 1000000,
1465 'maxCompletionTokens' => 4096,
1466 'maxContextualTokens' => 200000,
1467 'finetune' => false,
1468 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'deprecated']
1469 ],
1470 [
1471 // Deprecated: Anthropic retired Claude 3 Opus on January 5, 2026.
1472 'model' => 'claude-3-opus-latest',
1473 'name' => 'Claude-3 Opus (Latest)',
1474 'family' => 'claude-3',
1475 'features' => ['completion'],
1476 'price' => [
1477 'in' => 15.00,
1478 'out' => 75.00,
1479 ],
1480 'type' => 'token',
1481 'unit' => 1 / 1000000,
1482 'maxCompletionTokens' => 4096,
1483 'maxContextualTokens' => 200000,
1484 'finetune' => false,
1485 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'deprecated']
1486 ],
1487 [
1488 // Deprecated: Anthropic retired Claude 3 Opus on January 5, 2026.
1489 'model' => 'claude-3-opus-20240229',
1490 'name' => 'Claude-3 Opus (2024/02/29)',
1491 'family' => 'claude-3',
1492 'features' => ['completion'],
1493 'price' => [
1494 'in' => 15.00,
1495 'out' => 75.00,
1496 ],
1497 'type' => 'token',
1498 'unit' => 1 / 1000000,
1499 'maxCompletionTokens' => 4096,
1500 'maxContextualTokens' => 200000,
1501 'finetune' => false,
1502 'tags' => ['core', 'chat', 'vision', 'files', 'functions', 'deprecated']
1503 ],
1504 [
1505 'model' => 'claude-3-5-haiku-20241022',
1506 'name' => 'Claude-3.5 Haiku (2024/10/22)',
1507 'family' => 'claude-3',
1508 'features' => ['completion'],
1509 'price' => [
1510 'in' => 0.80,
1511 'out' => 4.00,
1512 ],
1513 'type' => 'token',
1514 'unit' => 1 / 1000000,
1515 'maxCompletionTokens' => 8192,
1516 'maxContextualTokens' => 200000,
1517 'finetune' => false,
1518 'tags' => ['core', 'chat', 'vision', 'files'],
1519 'tools' => ['code_interpreter']
1520 ],
1521 [
1522 'model' => 'claude-3-5-haiku-latest',
1523 'name' => 'Claude-3.5 Haiku',
1524 'family' => 'claude-3',
1525 'features' => ['completion'],
1526 'price' => [
1527 'in' => 0.80,
1528 'out' => 4.00,
1529 ],
1530 'type' => 'token',
1531 'unit' => 1 / 1000000,
1532 'maxCompletionTokens' => 8192,
1533 'maxContextualTokens' => 200000,
1534 'finetune' => false,
1535 'tags' => ['core', 'chat', 'vision', 'files', 'latest'],
1536 'tools' => ['code_interpreter']
1537 ],
1538 [
1539 'model' => 'claude-3-haiku-20240307',
1540 'name' => 'Claude-3 Haiku (2024/03/07)',
1541 'family' => 'claude-3',
1542 'features' => ['completion'],
1543 'price' => [
1544 'in' => 0.25,
1545 'out' => 1.25,
1546 ],
1547 'type' => 'token',
1548 'unit' => 1 / 1000000,
1549 'maxCompletionTokens' => 4096,
1550 'maxContextualTokens' => 200000,
1551 'finetune' => false,
1552 'tags' => ['core', 'chat', 'vision', 'files', 'functions']
1553 ]
1554 ] );
1555
1556 define( 'MWAI_PERPLEXITY_MODELS', [
1557 [
1558 'model' => 'sonar-pro',
1559 'name' => 'Sonar Pro',
1560 'family' => 'sonar',
1561 'features' => ['completion'],
1562 'price' => [
1563 'in' => 3.00,
1564 'out' => 15.00,
1565 'search' => 5.00,
1566 ],
1567 'type' => 'token',
1568 'unit' => 1 / 1000000,
1569 'searchUnit' => 1 / 1000,
1570 'maxCompletionTokens' => 8192,
1571 'maxContextualTokens' => 200000,
1572 'finetune' => false,
1573 'tags' => ['core', 'chat'],
1574 ],
1575 [
1576 'model' => 'sonar',
1577 'name' => 'Sonar',
1578 'family' => 'sonar',
1579 'features' => ['completion'],
1580 'price' => [
1581 'in' => 1.00,
1582 'out' => 1.00,
1583 'search' => 5.00,
1584 ],
1585 'type' => 'token',
1586 'unit' => 1 / 1000000,
1587 'searchUnit' => 1 / 1000,
1588 'maxCompletionTokens' => 4096,
1589 'maxContextualTokens' => 127000,
1590 'finetune' => false,
1591 'tags' => ['core', 'chat'],
1592 ],
1593 ] );
1594
1595 // Mistral AI Models
1596 // Models are fetched dynamically from the Mistral API
1597 define( 'MWAI_MISTRAL_MODELS', [] );
1598
1599 // xAI (Grok) Models
1600 // Models are fetched dynamically from the xAI API. The fallback list below mirrors the
1601 // chat-capable models that xAI publishes on https://docs.x.ai/docs/models, used only when
1602 // the dynamic fetch fails (e.g. invalid key during preflight).
1603 define( 'MWAI_XAI_MODELS', [
1604 [
1605 'model' => 'grok-4',
1606 'name' => 'Grok 4',
1607 'family' => 'grok',
1608 'features' => [ 'completion', 'functions' ],
1609 'price' => [ 'in' => 3.00, 'out' => 15.00 ],
1610 'type' => 'token',
1611 'unit' => 1 / 1000000,
1612 'maxCompletionTokens' => 16384,
1613 'maxContextualTokens' => 256000,
1614 'tags' => [ 'core', 'chat', 'functions', 'vision', 'reasoning' ],
1615 ],
1616 [
1617 'model' => 'grok-4-fast',
1618 'name' => 'Grok 4 Fast',
1619 'family' => 'grok',
1620 'features' => [ 'completion', 'functions' ],
1621 'price' => [ 'in' => 0.20, 'out' => 0.50 ],
1622 'type' => 'token',
1623 'unit' => 1 / 1000000,
1624 'maxCompletionTokens' => 16384,
1625 'maxContextualTokens' => 256000,
1626 'tags' => [ 'core', 'chat', 'functions', 'vision', 'reasoning' ],
1627 ],
1628 [
1629 'model' => 'grok-code-fast-1',
1630 'name' => 'Grok Code Fast',
1631 'family' => 'grok',
1632 'features' => [ 'completion', 'functions' ],
1633 'price' => [ 'in' => 0.20, 'out' => 1.50 ],
1634 'type' => 'token',
1635 'unit' => 1 / 1000000,
1636 'maxCompletionTokens' => 16384,
1637 'maxContextualTokens' => 256000,
1638 'tags' => [ 'core', 'chat', 'functions' ],
1639 ],
1640 [
1641 'model' => 'grok-3-mini',
1642 'name' => 'Grok 3 Mini',
1643 'family' => 'grok',
1644 'features' => [ 'completion', 'functions' ],
1645 'price' => [ 'in' => 0.30, 'out' => 0.50 ],
1646 'type' => 'token',
1647 'unit' => 1 / 1000000,
1648 'maxCompletionTokens' => 16384,
1649 'maxContextualTokens' => 131072,
1650 'tags' => [ 'core', 'chat', 'functions', 'reasoning' ],
1651 ],
1652 ] );
1653