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