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