@outputai/llm 0.11.1-next.da26845.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/package.json +7 -3
  2. package/src/agent.js +7 -2
  3. package/src/generate.js +1 -0
  4. package/src/index.d.ts +14 -6
  5. package/src/utils/wrap.js +35 -2
  6. package/src/agent.spec.js +0 -595
  7. package/src/ai_provider.spec.js +0 -217
  8. package/src/ai_sdk_options.spec.js +0 -390
  9. package/src/fixtures/image_response_v7_google_vertex.js +0 -72
  10. package/src/fixtures/image_response_v7_openai.js +0 -77
  11. package/src/fixtures/models_api_light.json +0 -675
  12. package/src/fixtures/models_api_v7_subset.json +0 -259
  13. package/src/fixtures/stream_response_v7_anthropic.js +0 -389
  14. package/src/fixtures/stream_response_v7_google_vertex.js +0 -462
  15. package/src/fixtures/stream_response_v7_openai.js +0 -353
  16. package/src/fixtures/stream_response_v7_perplexity.js +0 -671
  17. package/src/fixtures/text_response_v7_anthropic.js +0 -359
  18. package/src/fixtures/text_response_v7_anthropic_cache.js +0 -719
  19. package/src/fixtures/text_response_v7_google_vertex.js +0 -435
  20. package/src/fixtures/text_response_v7_openai.js +0 -347
  21. package/src/fixtures/text_response_v7_perplexity.js +0 -764
  22. package/src/generate.spec.js +0 -525
  23. package/src/prompt/content.spec.js +0 -208
  24. package/src/prompt/interpolations.spec.js +0 -109
  25. package/src/prompt/loader.full.spec.js +0 -309
  26. package/src/prompt/loader.spec.js +0 -258
  27. package/src/prompt/markup/attributes.spec.js +0 -132
  28. package/src/prompt/markup/nodes.spec.js +0 -333
  29. package/src/prompt/markup/tokenizer.spec.js +0 -149
  30. package/src/prompt/markup/tokens.spec.js +0 -250
  31. package/src/prompt/validations.spec.js +0 -812
  32. package/src/utils/cost.full.spec.js +0 -272
  33. package/src/utils/cost.spec.js +0 -290
  34. package/src/utils/error_handler.spec.js +0 -230
  35. package/src/utils/file.spec.js +0 -89
  36. package/src/utils/image.spec.js +0 -20
  37. package/src/utils/legacy_cost_attribute.spec.js +0 -278
  38. package/src/utils/models.spec.js +0 -119
  39. package/src/utils/models_pricing.spec.js +0 -162
  40. package/src/utils/skills.spec.js +0 -168
  41. package/src/utils/sources.spec.js +0 -122
  42. package/src/utils/stream.spec.js +0 -55
  43. package/src/utils/tools.spec.js +0 -167
  44. package/src/utils/usage.full.spec.js +0 -215
  45. package/src/utils/usage.spec.js +0 -246
  46. package/src/utils/wrap.spec.js +0 -467
  47. package/src/validations.spec.js +0 -631
@@ -1,675 +0,0 @@
1
- {
2
- "openai": {
3
- "id": "openai",
4
- "models": {
5
- "gpt-4o-2024-11-20": {
6
- "id": "gpt-4o-2024-11-20",
7
- "name": "GPT-4o (2024-11-20)",
8
- "family": "gpt",
9
- "attachment": true,
10
- "reasoning": false,
11
- "tool_call": true,
12
- "structured_output": true,
13
- "temperature": true,
14
- "knowledge": "2023-09",
15
- "release_date": "2024-11-20",
16
- "last_updated": "2024-11-20",
17
- "modalities": {
18
- "input": [
19
- "text",
20
- "image"
21
- ],
22
- "output": [
23
- "text"
24
- ]
25
- },
26
- "open_weights": false,
27
- "cost": {
28
- "input": 2.5,
29
- "output": 10,
30
- "cache_read": 1.25
31
- },
32
- "limit": {
33
- "context": 128000,
34
- "output": 16384
35
- }
36
- },
37
- "gpt-5.3-codex": {
38
- "id": "gpt-5.3-codex",
39
- "name": "GPT-5.3 Codex",
40
- "family": "gpt-codex",
41
- "attachment": true,
42
- "reasoning": true,
43
- "tool_call": true,
44
- "structured_output": true,
45
- "temperature": false,
46
- "knowledge": "2025-08-31",
47
- "release_date": "2026-02-05",
48
- "last_updated": "2026-02-05",
49
- "modalities": {
50
- "input": [
51
- "text",
52
- "image",
53
- "pdf"
54
- ],
55
- "output": [
56
- "text"
57
- ]
58
- },
59
- "open_weights": false,
60
- "cost": {
61
- "input": 1.75,
62
- "output": 14,
63
- "cache_read": 0.175
64
- },
65
- "limit": {
66
- "context": 400000,
67
- "input": 272000,
68
- "output": 128000
69
- }
70
- },
71
- "gpt-5-codex": {
72
- "id": "gpt-5-codex",
73
- "name": "GPT-5-Codex",
74
- "family": "gpt-codex",
75
- "attachment": false,
76
- "reasoning": true,
77
- "tool_call": true,
78
- "structured_output": true,
79
- "temperature": false,
80
- "knowledge": "2024-09-30",
81
- "release_date": "2025-09-15",
82
- "last_updated": "2025-09-15",
83
- "modalities": {
84
- "input": [
85
- "text",
86
- "image"
87
- ],
88
- "output": [
89
- "text"
90
- ]
91
- },
92
- "open_weights": false,
93
- "cost": {
94
- "input": 1.25,
95
- "output": 10,
96
- "cache_read": 0.125
97
- },
98
- "limit": {
99
- "context": 400000,
100
- "input": 272000,
101
- "output": 128000
102
- }
103
- },
104
- "gpt-5-pro": {
105
- "id": "gpt-5-pro",
106
- "name": "GPT-5 Pro",
107
- "family": "gpt-pro",
108
- "attachment": true,
109
- "reasoning": true,
110
- "tool_call": true,
111
- "structured_output": true,
112
- "temperature": false,
113
- "knowledge": "2024-09-30",
114
- "release_date": "2025-10-06",
115
- "last_updated": "2025-10-06",
116
- "modalities": {
117
- "input": [
118
- "text",
119
- "image"
120
- ],
121
- "output": [
122
- "text"
123
- ]
124
- },
125
- "open_weights": false,
126
- "cost": {
127
- "input": 15,
128
- "output": 120
129
- },
130
- "limit": {
131
- "context": 400000,
132
- "input": 272000,
133
- "output": 272000
134
- }
135
- }
136
- }
137
- },
138
- "azure": {
139
- "id": "azure",
140
- "models": {
141
- "gpt-4o-2024-11-20": {
142
- "id": "gpt-4o-2024-11-20",
143
- "name": "GPT-4o (2024-11-20)",
144
- "cost": {
145
- "input": 3,
146
- "output": 12,
147
- "cache_read": 1.5
148
- }
149
- }
150
- }
151
- },
152
- "anthropic": {
153
- "id": "anthropic",
154
- "models": {
155
- "claude-opus-4-5-20251101": {
156
- "id": "claude-opus-4-5-20251101",
157
- "name": "Claude Opus 4.5",
158
- "family": "claude-opus",
159
- "attachment": true,
160
- "reasoning": true,
161
- "tool_call": true,
162
- "temperature": true,
163
- "knowledge": "2025-03-31",
164
- "release_date": "2025-11-01",
165
- "last_updated": "2025-11-01",
166
- "modalities": {
167
- "input": [
168
- "text",
169
- "image",
170
- "pdf"
171
- ],
172
- "output": [
173
- "text"
174
- ]
175
- },
176
- "open_weights": false,
177
- "cost": {
178
- "input": 5,
179
- "output": 25,
180
- "cache_read": 0.5,
181
- "cache_write": 6.25
182
- },
183
- "limit": {
184
- "context": 200000,
185
- "output": 64000
186
- }
187
- },
188
- "claude-3-5-haiku-latest": {
189
- "id": "claude-3-5-haiku-latest",
190
- "name": "Claude Haiku 3.5 (latest)",
191
- "family": "claude-haiku",
192
- "attachment": true,
193
- "reasoning": false,
194
- "tool_call": true,
195
- "temperature": true,
196
- "knowledge": "2024-07-31",
197
- "release_date": "2024-10-22",
198
- "last_updated": "2024-10-22",
199
- "modalities": {
200
- "input": [
201
- "text",
202
- "image",
203
- "pdf"
204
- ],
205
- "output": [
206
- "text"
207
- ]
208
- },
209
- "open_weights": false,
210
- "cost": {
211
- "input": 0.8,
212
- "output": 4,
213
- "cache_read": 0.08,
214
- "cache_write": 1
215
- },
216
- "limit": {
217
- "context": 200000,
218
- "output": 8192
219
- }
220
- },
221
- "claude-opus-4-1": {
222
- "id": "claude-opus-4-1",
223
- "name": "Claude Opus 4.1 (latest)",
224
- "family": "claude-opus",
225
- "attachment": true,
226
- "reasoning": true,
227
- "tool_call": true,
228
- "temperature": true,
229
- "knowledge": "2025-03-31",
230
- "release_date": "2025-08-05",
231
- "last_updated": "2025-08-05",
232
- "modalities": {
233
- "input": [
234
- "text",
235
- "image",
236
- "pdf"
237
- ],
238
- "output": [
239
- "text"
240
- ]
241
- },
242
- "open_weights": false,
243
- "cost": {
244
- "input": 15,
245
- "output": 75,
246
- "cache_read": 1.5,
247
- "cache_write": 18.75
248
- },
249
- "limit": {
250
- "context": 200000,
251
- "output": 32000
252
- }
253
- },
254
- "claude-3-5-sonnet-20241022": {
255
- "id": "claude-3-5-sonnet-20241022",
256
- "name": "Claude Sonnet 3.5 v2",
257
- "family": "claude-sonnet",
258
- "attachment": true,
259
- "reasoning": false,
260
- "tool_call": true,
261
- "temperature": true,
262
- "knowledge": "2024-04-30",
263
- "release_date": "2024-10-22",
264
- "last_updated": "2024-10-22",
265
- "modalities": {
266
- "input": [
267
- "text",
268
- "image",
269
- "pdf"
270
- ],
271
- "output": [
272
- "text"
273
- ]
274
- },
275
- "open_weights": false,
276
- "cost": {
277
- "input": 3,
278
- "output": 15,
279
- "cache_read": 0.3,
280
- "cache_write": 3.75
281
- },
282
- "limit": {
283
- "context": 200000,
284
- "output": 8192
285
- }
286
- }
287
- }
288
- },
289
- "google": {
290
- "id": "google",
291
- "models": {
292
- "gemini-embedding-001": {
293
- "id": "gemini-embedding-001",
294
- "name": "Gemini Embedding 001",
295
- "family": "gemini",
296
- "attachment": false,
297
- "reasoning": false,
298
- "tool_call": false,
299
- "temperature": false,
300
- "knowledge": "2025-05",
301
- "release_date": "2025-05-20",
302
- "last_updated": "2025-05-20",
303
- "modalities": {
304
- "input": [
305
- "text"
306
- ],
307
- "output": [
308
- "text"
309
- ]
310
- },
311
- "open_weights": false,
312
- "cost": {
313
- "input": 0.15,
314
- "output": 0
315
- },
316
- "limit": {
317
- "context": 2048,
318
- "output": 3072
319
- }
320
- },
321
- "gemini-2.5-flash-lite-preview-09-2025": {
322
- "id": "gemini-2.5-flash-lite-preview-09-2025",
323
- "name": "Gemini 2.5 Flash Lite Preview 09-25",
324
- "family": "gemini-flash-lite",
325
- "attachment": true,
326
- "reasoning": true,
327
- "tool_call": true,
328
- "structured_output": true,
329
- "temperature": true,
330
- "knowledge": "2025-01",
331
- "release_date": "2025-09-25",
332
- "last_updated": "2025-09-25",
333
- "modalities": {
334
- "input": [
335
- "text",
336
- "image",
337
- "audio",
338
- "video",
339
- "pdf"
340
- ],
341
- "output": [
342
- "text"
343
- ]
344
- },
345
- "open_weights": false,
346
- "cost": {
347
- "input": 0.1,
348
- "output": 0.4,
349
- "cache_read": 0.025
350
- },
351
- "limit": {
352
- "context": 1048576,
353
- "output": 65536
354
- }
355
- },
356
- "gemini-3.1-pro-preview-customtools": {
357
- "id": "gemini-3.1-pro-preview-customtools",
358
- "name": "Gemini 3.1 Pro Preview Custom Tools",
359
- "family": "gemini-pro",
360
- "attachment": true,
361
- "reasoning": true,
362
- "tool_call": true,
363
- "structured_output": true,
364
- "temperature": true,
365
- "knowledge": "2025-01",
366
- "release_date": "2026-02-19",
367
- "last_updated": "2026-02-19",
368
- "modalities": {
369
- "input": [
370
- "text",
371
- "image",
372
- "video",
373
- "audio",
374
- "pdf"
375
- ],
376
- "output": [
377
- "text"
378
- ]
379
- },
380
- "open_weights": false,
381
- "cost": {
382
- "input": 2,
383
- "output": 12,
384
- "cache_read": 0.2,
385
- "context_over_200k": {
386
- "input": 4,
387
- "output": 18,
388
- "cache_read": 0.4
389
- }
390
- },
391
- "limit": {
392
- "context": 1048576,
393
- "output": 65536
394
- }
395
- },
396
- "gemini-2.5-pro-preview-06-05": {
397
- "id": "gemini-2.5-pro-preview-06-05",
398
- "name": "Gemini 2.5 Pro Preview 06-05",
399
- "family": "gemini-pro",
400
- "attachment": true,
401
- "reasoning": true,
402
- "tool_call": true,
403
- "structured_output": true,
404
- "temperature": true,
405
- "knowledge": "2025-01",
406
- "release_date": "2025-06-05",
407
- "last_updated": "2025-06-05",
408
- "modalities": {
409
- "input": [
410
- "text",
411
- "image",
412
- "audio",
413
- "video",
414
- "pdf"
415
- ],
416
- "output": [
417
- "text"
418
- ]
419
- },
420
- "open_weights": false,
421
- "cost": {
422
- "input": 1.25,
423
- "output": 10,
424
- "cache_read": 0.31
425
- },
426
- "limit": {
427
- "context": 1048576,
428
- "output": 65536
429
- }
430
- }
431
- }
432
- },
433
- "nvidia": {
434
- "id": "nvidia",
435
- "models": {
436
- "nvidia/llama-3.1-nemotron-70b-instruct": {
437
- "id": "nvidia/llama-3.1-nemotron-70b-instruct",
438
- "name": "Llama 3.1 Nemotron 70b Instruct",
439
- "attachment": false,
440
- "reasoning": false,
441
- "tool_call": true,
442
- "structured_output": true,
443
- "temperature": true,
444
- "release_date": "2024-10-12",
445
- "last_updated": "2024-10-12",
446
- "modalities": {
447
- "input": [
448
- "text"
449
- ],
450
- "output": [
451
- "text"
452
- ]
453
- },
454
- "open_weights": false,
455
- "cost": {
456
- "input": 0,
457
- "output": 0
458
- },
459
- "limit": {
460
- "context": 128000,
461
- "output": 4096
462
- }
463
- },
464
- "nvidia/llama-3.1-nemotron-ultra-253b-v1": {
465
- "id": "nvidia/llama-3.1-nemotron-ultra-253b-v1",
466
- "name": "Llama-3.1-Nemotron-Ultra-253B-v1",
467
- "family": "llama",
468
- "attachment": false,
469
- "reasoning": true,
470
- "tool_call": true,
471
- "temperature": true,
472
- "knowledge": "2024-07",
473
- "release_date": "2024-07-01",
474
- "last_updated": "2025-09-05",
475
- "modalities": {
476
- "input": [
477
- "text"
478
- ],
479
- "output": [
480
- "text"
481
- ]
482
- },
483
- "open_weights": false,
484
- "cost": {
485
- "input": 0,
486
- "output": 0
487
- },
488
- "limit": {
489
- "context": 131072,
490
- "output": 8192
491
- }
492
- },
493
- "nvidia/llama-3.1-nemotron-51b-instruct": {
494
- "id": "nvidia/llama-3.1-nemotron-51b-instruct",
495
- "name": "Llama 3.1 Nemotron 51b Instruct",
496
- "attachment": false,
497
- "reasoning": false,
498
- "tool_call": true,
499
- "structured_output": true,
500
- "temperature": true,
501
- "release_date": "2024-09-22",
502
- "last_updated": "2024-09-22",
503
- "modalities": {
504
- "input": [
505
- "text"
506
- ],
507
- "output": [
508
- "text"
509
- ]
510
- },
511
- "open_weights": false,
512
- "cost": {
513
- "input": 0,
514
- "output": 0
515
- },
516
- "limit": {
517
- "context": 128000,
518
- "output": 4096
519
- }
520
- },
521
- "nvidia/parakeet-tdt-0.6b-v2": {
522
- "id": "nvidia/parakeet-tdt-0.6b-v2",
523
- "name": "Parakeet TDT 0.6B v2",
524
- "family": "parakeet",
525
- "attachment": false,
526
- "reasoning": false,
527
- "tool_call": false,
528
- "temperature": false,
529
- "knowledge": "2024-01",
530
- "release_date": "2024-01-01",
531
- "last_updated": "2025-09-05",
532
- "modalities": {
533
- "input": [
534
- "audio"
535
- ],
536
- "output": [
537
- "text"
538
- ]
539
- },
540
- "open_weights": false,
541
- "cost": {
542
- "input": 0,
543
- "output": 0
544
- },
545
- "limit": {
546
- "context": 0,
547
- "output": 4096
548
- }
549
- }
550
- }
551
- },
552
- "perplexity": {
553
- "id": "perplexity",
554
- "models": {
555
- "sonar-reasoning-pro": {
556
- "id": "sonar-reasoning-pro",
557
- "name": "Sonar Reasoning Pro",
558
- "family": "sonar-reasoning",
559
- "attachment": true,
560
- "reasoning": true,
561
- "tool_call": false,
562
- "temperature": true,
563
- "knowledge": "2025-09-01",
564
- "release_date": "2024-01-01",
565
- "last_updated": "2025-09-01",
566
- "modalities": {
567
- "input": [
568
- "text",
569
- "image"
570
- ],
571
- "output": [
572
- "text"
573
- ]
574
- },
575
- "open_weights": false,
576
- "cost": {
577
- "input": 2,
578
- "output": 8
579
- },
580
- "limit": {
581
- "context": 128000,
582
- "output": 4096
583
- }
584
- },
585
- "sonar": {
586
- "id": "sonar",
587
- "name": "Sonar",
588
- "family": "sonar",
589
- "attachment": false,
590
- "reasoning": false,
591
- "tool_call": false,
592
- "temperature": true,
593
- "knowledge": "2025-09-01",
594
- "release_date": "2024-01-01",
595
- "last_updated": "2025-09-01",
596
- "modalities": {
597
- "input": [
598
- "text"
599
- ],
600
- "output": [
601
- "text"
602
- ]
603
- },
604
- "open_weights": false,
605
- "cost": {
606
- "input": 1,
607
- "output": 1
608
- },
609
- "limit": {
610
- "context": 128000,
611
- "output": 4096
612
- }
613
- },
614
- "sonar-deep-research": {
615
- "id": "sonar-deep-research",
616
- "name": "Perplexity Sonar Deep Research",
617
- "attachment": false,
618
- "reasoning": true,
619
- "tool_call": false,
620
- "temperature": false,
621
- "knowledge": "2025-01",
622
- "release_date": "2025-02-01",
623
- "last_updated": "2025-09-01",
624
- "modalities": {
625
- "input": [
626
- "text"
627
- ],
628
- "output": [
629
- "text"
630
- ]
631
- },
632
- "open_weights": false,
633
- "cost": {
634
- "input": 2,
635
- "output": 8,
636
- "reasoning": 3
637
- },
638
- "limit": {
639
- "context": 128000,
640
- "output": 32768
641
- }
642
- },
643
- "sonar-pro": {
644
- "id": "sonar-pro",
645
- "name": "Sonar Pro",
646
- "family": "sonar-pro",
647
- "attachment": true,
648
- "reasoning": false,
649
- "tool_call": false,
650
- "temperature": true,
651
- "knowledge": "2025-09-01",
652
- "release_date": "2024-01-01",
653
- "last_updated": "2025-09-01",
654
- "modalities": {
655
- "input": [
656
- "text",
657
- "image"
658
- ],
659
- "output": [
660
- "text"
661
- ]
662
- },
663
- "open_weights": false,
664
- "cost": {
665
- "input": 3,
666
- "output": 15
667
- },
668
- "limit": {
669
- "context": 200000,
670
- "output": 8192
671
- }
672
- }
673
- }
674
- }
675
- }