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