@eum-agent/llm-provider-openai 0.0.0-stage → 1.2.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.
package/dist/index.js ADDED
@@ -0,0 +1,1609 @@
1
+ //#endregion
2
+ //#region src/catalog.ts
3
+ const catalog = {
4
+ vendors: [{
5
+ kind: "vendor",
6
+ id: "openai",
7
+ logo: "data:image/svg+xml,%3Csvg%20fill%3D%22currentColor%22%20fill-rule%3D%22evenodd%22%20height%3D%2224%22%20style%3D%22flex%3Anone%3Bline-height%3A1%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ctitle%3EOpenAI%3C%2Ftitle%3E%3Cpath%20d%3D%22M9.205%208.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357%201.356-.523%202.117-.523%202.854%200%204.662%202.212%204.662%204.566%200%20.167%200%20.357-.024.547l-4.71-2.759a.797.797%200%2000-.856%200l-5.97%203.473zm10.609%208.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473%201.95-1.118a.433.433%200%2001.476%200l4.543%202.617c1.309.76%202.189%202.378%202.189%203.948%200%201.808-1.07%203.473-2.76%204.163zM7.802%2012.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545%201.95-4.472%204.591-4.472%201%200%201.927.333%202.712.928L8.23%205.067c-.285.166-.428.404-.428.737v6.898zM12%2015.128l-2.795-1.57v-3.33L12%208.658l2.795%201.57v3.33L12%2015.128zm1.796%207.23c-1%200-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974%201.142c.167.095.238.238.238.428v5.233c0%202.545-1.974%204.472-4.614%204.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482%204.482%200%20014.21%206.327v5.423c0%20.333.143.571.428.738l5.947%203.449-1.95%201.118a.432.432%200%2001-.476%200zm-.262%203.9c-2.688%200-4.662-2.021-4.662-4.519%200-.19.024-.38.047-.57l4.686%202.71c.286.167.571.167.856%200l5.97-3.448v2.26c0%20.19-.07.333-.237.428l-4.543%202.616c-.619.357-1.356.523-2.117.523zm5.899%202.83a5.947%205.947%200%20005.827-4.756C22.287%2018.339%2024%2015.84%2024%2013.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498%200-3.401-2.759-5.947-5.946-5.947-.642%200-1.26.095-1.88.31A5.962%205.962%200%200010.205%200a5.947%205.947%200%2000-5.827%204.757C1.713%205.447%200%207.945%200%2010.49c0%201.666.713%203.283%201.998%204.448-.119.5-.19%201-.19%201.499%200%203.401%202.759%205.946%205.946%205.946.642%200%201.26-.095%201.88-.309a5.96%205.96%200%20004.162%201.713z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",
8
+ name: "OpenAI",
9
+ region: null,
10
+ market: "international",
11
+ catalogKey: "openai",
12
+ canListModels: true,
13
+ endpoints: [{
14
+ baseUrl: "https://api.openai.com/v1",
15
+ outputLimitField: "max_completion_tokens",
16
+ promptCacheKey: true,
17
+ type: "openai",
18
+ endpointId: "openai",
19
+ protocolIds: ["openai", "openai-responses"]
20
+ }]
21
+ }],
22
+ snapshot: { "openai": {
23
+ "gpt-daybreak-red-latest": {
24
+ "id": "gpt-daybreak-red-latest",
25
+ "name": "Daybreak Red",
26
+ "family": "gpt",
27
+ "reasoning": true,
28
+ "reasoning_options": [{
29
+ "type": "effort",
30
+ "values": [
31
+ "none",
32
+ "low",
33
+ "medium",
34
+ "high",
35
+ "xhigh",
36
+ "max"
37
+ ]
38
+ }],
39
+ "temperature": false,
40
+ "tool_call": true,
41
+ "attachment": true,
42
+ "modalities": {
43
+ "input": ["text", "image"],
44
+ "output": ["text"]
45
+ },
46
+ "limit": {
47
+ "context": 4e5,
48
+ "input": 272e3,
49
+ "output": 128e3
50
+ },
51
+ "release_date": "2026-08-07"
52
+ },
53
+ "gpt-4o-2024-08-06": {
54
+ "id": "gpt-4o-2024-08-06",
55
+ "name": "GPT-4o (2024-08-06)",
56
+ "family": "gpt",
57
+ "reasoning": false,
58
+ "temperature": true,
59
+ "tool_call": true,
60
+ "attachment": true,
61
+ "modalities": {
62
+ "input": ["text", "image"],
63
+ "output": ["text"]
64
+ },
65
+ "limit": {
66
+ "context": 128e3,
67
+ "output": 16384
68
+ },
69
+ "release_date": "2024-08-06"
70
+ },
71
+ "gpt-5": {
72
+ "id": "gpt-5",
73
+ "name": "GPT-5",
74
+ "family": "gpt",
75
+ "reasoning": true,
76
+ "reasoning_options": [{
77
+ "type": "effort",
78
+ "values": [
79
+ "minimal",
80
+ "low",
81
+ "medium",
82
+ "high"
83
+ ]
84
+ }],
85
+ "temperature": false,
86
+ "tool_call": true,
87
+ "attachment": true,
88
+ "modalities": {
89
+ "input": ["text", "image"],
90
+ "output": ["text"]
91
+ },
92
+ "limit": {
93
+ "context": 4e5,
94
+ "input": 272e3,
95
+ "output": 128e3
96
+ },
97
+ "release_date": "2025-08-07"
98
+ },
99
+ "gpt-5.2-pro": {
100
+ "id": "gpt-5.2-pro",
101
+ "name": "GPT-5.2 Pro",
102
+ "family": "gpt-pro",
103
+ "reasoning": true,
104
+ "reasoning_options": [{
105
+ "type": "effort",
106
+ "values": [
107
+ "medium",
108
+ "high",
109
+ "xhigh"
110
+ ]
111
+ }],
112
+ "temperature": false,
113
+ "tool_call": true,
114
+ "attachment": true,
115
+ "modalities": {
116
+ "input": ["text", "image"],
117
+ "output": ["text"]
118
+ },
119
+ "limit": {
120
+ "context": 4e5,
121
+ "input": 272e3,
122
+ "output": 128e3
123
+ },
124
+ "release_date": "2025-12-11"
125
+ },
126
+ "text-embedding-3-large": {
127
+ "id": "text-embedding-3-large",
128
+ "name": "text-embedding-3-large",
129
+ "family": "text-embedding",
130
+ "reasoning": false,
131
+ "temperature": false,
132
+ "tool_call": false,
133
+ "attachment": false,
134
+ "modalities": {
135
+ "input": ["text"],
136
+ "output": ["text"]
137
+ },
138
+ "limit": {
139
+ "context": 8191,
140
+ "output": 3072
141
+ },
142
+ "release_date": "2024-01-25"
143
+ },
144
+ "gpt-4.1-mini": {
145
+ "id": "gpt-4.1-mini",
146
+ "name": "GPT-4.1 mini",
147
+ "family": "gpt-mini",
148
+ "reasoning": false,
149
+ "temperature": true,
150
+ "tool_call": true,
151
+ "attachment": true,
152
+ "modalities": {
153
+ "input": [
154
+ "text",
155
+ "image",
156
+ "pdf"
157
+ ],
158
+ "output": ["text"]
159
+ },
160
+ "limit": {
161
+ "context": 1047576,
162
+ "output": 32768
163
+ },
164
+ "release_date": "2025-04-14"
165
+ },
166
+ "o3-pro": {
167
+ "id": "o3-pro",
168
+ "name": "o3-pro",
169
+ "family": "o-pro",
170
+ "reasoning": true,
171
+ "reasoning_options": [{
172
+ "type": "effort",
173
+ "values": [
174
+ "low",
175
+ "medium",
176
+ "high"
177
+ ]
178
+ }],
179
+ "temperature": false,
180
+ "tool_call": true,
181
+ "attachment": true,
182
+ "modalities": {
183
+ "input": ["text", "image"],
184
+ "output": ["text"]
185
+ },
186
+ "limit": {
187
+ "context": 2e5,
188
+ "output": 1e5
189
+ },
190
+ "release_date": "2025-06-10"
191
+ },
192
+ "o1-pro": {
193
+ "id": "o1-pro",
194
+ "name": "o1-pro",
195
+ "family": "o-pro",
196
+ "reasoning": true,
197
+ "reasoning_options": [{
198
+ "type": "effort",
199
+ "values": [
200
+ "low",
201
+ "medium",
202
+ "high"
203
+ ]
204
+ }],
205
+ "temperature": false,
206
+ "tool_call": true,
207
+ "attachment": true,
208
+ "modalities": {
209
+ "input": ["text", "image"],
210
+ "output": ["text"]
211
+ },
212
+ "limit": {
213
+ "context": 2e5,
214
+ "output": 1e5
215
+ },
216
+ "release_date": "2025-03-19"
217
+ },
218
+ "gpt-5.4-mini": {
219
+ "id": "gpt-5.4-mini",
220
+ "name": "GPT-5.4 mini",
221
+ "family": "gpt-mini",
222
+ "reasoning": true,
223
+ "reasoning_options": [{
224
+ "type": "effort",
225
+ "values": [
226
+ "none",
227
+ "low",
228
+ "medium",
229
+ "high",
230
+ "xhigh"
231
+ ]
232
+ }],
233
+ "temperature": true,
234
+ "tool_call": true,
235
+ "attachment": true,
236
+ "modalities": {
237
+ "input": ["text", "image"],
238
+ "output": ["text"]
239
+ },
240
+ "limit": {
241
+ "context": 4e5,
242
+ "input": 272e3,
243
+ "output": 128e3
244
+ },
245
+ "release_date": "2026-03-17"
246
+ },
247
+ "gpt-5.2": {
248
+ "id": "gpt-5.2",
249
+ "name": "GPT-5.2",
250
+ "family": "gpt",
251
+ "reasoning": true,
252
+ "reasoning_options": [{
253
+ "type": "effort",
254
+ "values": [
255
+ "none",
256
+ "low",
257
+ "medium",
258
+ "high",
259
+ "xhigh"
260
+ ]
261
+ }],
262
+ "temperature": true,
263
+ "tool_call": true,
264
+ "attachment": true,
265
+ "modalities": {
266
+ "input": ["text", "image"],
267
+ "output": ["text"]
268
+ },
269
+ "limit": {
270
+ "context": 4e5,
271
+ "input": 272e3,
272
+ "output": 128e3
273
+ },
274
+ "release_date": "2025-12-11"
275
+ },
276
+ "gpt-4o-2024-11-20": {
277
+ "id": "gpt-4o-2024-11-20",
278
+ "name": "GPT-4o (2024-11-20)",
279
+ "family": "gpt",
280
+ "reasoning": false,
281
+ "temperature": true,
282
+ "tool_call": true,
283
+ "attachment": true,
284
+ "modalities": {
285
+ "input": ["text", "image"],
286
+ "output": ["text"]
287
+ },
288
+ "limit": {
289
+ "context": 128e3,
290
+ "output": 16384
291
+ },
292
+ "release_date": "2024-11-20"
293
+ },
294
+ "gpt-6.2-astra": {
295
+ "id": "gpt-6.2-astra",
296
+ "name": "GPT-6.2 Astra",
297
+ "family": "gpt-astra",
298
+ "reasoning": true,
299
+ "reasoning_options": [{
300
+ "type": "effort",
301
+ "values": [
302
+ "low",
303
+ "medium",
304
+ "high",
305
+ "xhigh",
306
+ "max"
307
+ ]
308
+ }],
309
+ "temperature": false,
310
+ "tool_call": true,
311
+ "attachment": true,
312
+ "modalities": {
313
+ "input": [
314
+ "text",
315
+ "image",
316
+ "pdf"
317
+ ],
318
+ "output": ["text"]
319
+ },
320
+ "limit": {
321
+ "context": 105e4,
322
+ "input": 922e3,
323
+ "output": 128e3
324
+ },
325
+ "release_date": "2026-11-17"
326
+ },
327
+ "gpt-4o-2024-05-13": {
328
+ "id": "gpt-4o-2024-05-13",
329
+ "name": "GPT-4o (2024-05-13)",
330
+ "family": "gpt",
331
+ "reasoning": false,
332
+ "temperature": true,
333
+ "tool_call": true,
334
+ "attachment": true,
335
+ "modalities": {
336
+ "input": ["text", "image"],
337
+ "output": ["text"]
338
+ },
339
+ "limit": {
340
+ "context": 128e3,
341
+ "output": 4096
342
+ },
343
+ "release_date": "2024-05-13"
344
+ },
345
+ "gpt-5.4-nano": {
346
+ "id": "gpt-5.4-nano",
347
+ "name": "GPT-5.4 nano",
348
+ "family": "gpt-nano",
349
+ "reasoning": true,
350
+ "reasoning_options": [{
351
+ "type": "effort",
352
+ "values": [
353
+ "none",
354
+ "low",
355
+ "medium",
356
+ "high",
357
+ "xhigh"
358
+ ]
359
+ }],
360
+ "temperature": true,
361
+ "tool_call": true,
362
+ "attachment": true,
363
+ "modalities": {
364
+ "input": ["text", "image"],
365
+ "output": ["text"]
366
+ },
367
+ "limit": {
368
+ "context": 4e5,
369
+ "input": 272e3,
370
+ "output": 128e3
371
+ },
372
+ "release_date": "2026-03-17"
373
+ },
374
+ "gpt-5.1": {
375
+ "id": "gpt-5.1",
376
+ "name": "GPT-5.1",
377
+ "family": "gpt",
378
+ "reasoning": true,
379
+ "reasoning_options": [{
380
+ "type": "effort",
381
+ "values": [
382
+ "none",
383
+ "low",
384
+ "medium",
385
+ "high"
386
+ ]
387
+ }],
388
+ "temperature": true,
389
+ "tool_call": true,
390
+ "attachment": true,
391
+ "modalities": {
392
+ "input": ["text", "image"],
393
+ "output": ["text"]
394
+ },
395
+ "limit": {
396
+ "context": 4e5,
397
+ "input": 272e3,
398
+ "output": 128e3
399
+ },
400
+ "release_date": "2025-11-13"
401
+ },
402
+ "gpt-4o-mini": {
403
+ "id": "gpt-4o-mini",
404
+ "name": "GPT-4o mini",
405
+ "family": "gpt-mini",
406
+ "reasoning": false,
407
+ "temperature": true,
408
+ "tool_call": true,
409
+ "attachment": true,
410
+ "modalities": {
411
+ "input": [
412
+ "text",
413
+ "image",
414
+ "pdf"
415
+ ],
416
+ "output": ["text"]
417
+ },
418
+ "limit": {
419
+ "context": 128e3,
420
+ "output": 16384
421
+ },
422
+ "release_date": "2024-07-18"
423
+ },
424
+ "gpt-5.4-pro": {
425
+ "id": "gpt-5.4-pro",
426
+ "name": "GPT-5.4 Pro",
427
+ "family": "gpt-pro",
428
+ "reasoning": true,
429
+ "reasoning_options": [{
430
+ "type": "effort",
431
+ "values": [
432
+ "medium",
433
+ "high",
434
+ "xhigh"
435
+ ]
436
+ }],
437
+ "temperature": false,
438
+ "tool_call": true,
439
+ "attachment": true,
440
+ "modalities": {
441
+ "input": ["text", "image"],
442
+ "output": ["text"]
443
+ },
444
+ "limit": {
445
+ "context": 105e4,
446
+ "input": 922e3,
447
+ "output": 128e3
448
+ },
449
+ "release_date": "2026-03-05"
450
+ },
451
+ "text-embedding-3-small": {
452
+ "id": "text-embedding-3-small",
453
+ "name": "text-embedding-3-small",
454
+ "family": "text-embedding",
455
+ "reasoning": false,
456
+ "temperature": false,
457
+ "tool_call": false,
458
+ "attachment": false,
459
+ "modalities": {
460
+ "input": ["text"],
461
+ "output": ["text"]
462
+ },
463
+ "limit": {
464
+ "context": 8191,
465
+ "output": 1536
466
+ },
467
+ "release_date": "2024-01-25"
468
+ },
469
+ "gpt-5-nano": {
470
+ "id": "gpt-5-nano",
471
+ "name": "GPT-5 Nano",
472
+ "family": "gpt-nano",
473
+ "reasoning": true,
474
+ "reasoning_options": [{
475
+ "type": "effort",
476
+ "values": [
477
+ "minimal",
478
+ "low",
479
+ "medium",
480
+ "high"
481
+ ]
482
+ }],
483
+ "temperature": false,
484
+ "tool_call": true,
485
+ "attachment": true,
486
+ "modalities": {
487
+ "input": ["text", "image"],
488
+ "output": ["text"]
489
+ },
490
+ "limit": {
491
+ "context": 4e5,
492
+ "input": 272e3,
493
+ "output": 128e3
494
+ },
495
+ "release_date": "2025-08-07"
496
+ },
497
+ "o3": {
498
+ "id": "o3",
499
+ "name": "o3",
500
+ "family": "o",
501
+ "reasoning": true,
502
+ "reasoning_options": [{
503
+ "type": "effort",
504
+ "values": [
505
+ "low",
506
+ "medium",
507
+ "high"
508
+ ]
509
+ }],
510
+ "temperature": false,
511
+ "tool_call": true,
512
+ "attachment": true,
513
+ "modalities": {
514
+ "input": [
515
+ "text",
516
+ "image",
517
+ "pdf"
518
+ ],
519
+ "output": ["text"]
520
+ },
521
+ "limit": {
522
+ "context": 2e5,
523
+ "output": 1e5
524
+ },
525
+ "release_date": "2025-04-16"
526
+ },
527
+ "gpt-6-luna": {
528
+ "id": "gpt-6-luna",
529
+ "name": "GPT-6 Luna",
530
+ "family": "gpt-luna",
531
+ "reasoning": true,
532
+ "reasoning_options": [{
533
+ "type": "effort",
534
+ "values": [
535
+ "none",
536
+ "low",
537
+ "medium",
538
+ "high",
539
+ "xhigh",
540
+ "max"
541
+ ]
542
+ }],
543
+ "temperature": true,
544
+ "tool_call": true,
545
+ "attachment": true,
546
+ "modalities": {
547
+ "input": [
548
+ "text",
549
+ "image",
550
+ "pdf"
551
+ ],
552
+ "output": ["text"]
553
+ },
554
+ "limit": {
555
+ "context": 105e4,
556
+ "input": 922e3,
557
+ "output": 128e3
558
+ },
559
+ "release_date": "2026-09-22"
560
+ },
561
+ "chatgpt-image-latest": {
562
+ "id": "chatgpt-image-latest",
563
+ "name": "chatgpt-image-latest",
564
+ "family": "gpt-image",
565
+ "reasoning": false,
566
+ "temperature": false,
567
+ "tool_call": false,
568
+ "attachment": true,
569
+ "modalities": {
570
+ "input": ["text", "image"],
571
+ "output": ["text", "image"]
572
+ },
573
+ "limit": {
574
+ "context": 0,
575
+ "input": 0,
576
+ "output": 0
577
+ },
578
+ "release_date": "2025-12-16"
579
+ },
580
+ "o1": {
581
+ "id": "o1",
582
+ "name": "o1",
583
+ "family": "o",
584
+ "reasoning": true,
585
+ "reasoning_options": [{
586
+ "type": "effort",
587
+ "values": [
588
+ "low",
589
+ "medium",
590
+ "high"
591
+ ]
592
+ }],
593
+ "temperature": false,
594
+ "tool_call": true,
595
+ "attachment": true,
596
+ "modalities": {
597
+ "input": [
598
+ "text",
599
+ "image",
600
+ "pdf"
601
+ ],
602
+ "output": ["text"]
603
+ },
604
+ "limit": {
605
+ "context": 2e5,
606
+ "output": 1e5
607
+ },
608
+ "release_date": "2024-12-05"
609
+ },
610
+ "gpt-5.4": {
611
+ "id": "gpt-5.4",
612
+ "name": "GPT-5.4",
613
+ "family": "gpt",
614
+ "reasoning": true,
615
+ "reasoning_options": [{
616
+ "type": "effort",
617
+ "values": [
618
+ "none",
619
+ "low",
620
+ "medium",
621
+ "high",
622
+ "xhigh"
623
+ ]
624
+ }],
625
+ "temperature": true,
626
+ "tool_call": true,
627
+ "attachment": true,
628
+ "modalities": {
629
+ "input": [
630
+ "text",
631
+ "image",
632
+ "pdf"
633
+ ],
634
+ "output": ["text"]
635
+ },
636
+ "limit": {
637
+ "context": 105e4,
638
+ "input": 922e3,
639
+ "output": 128e3
640
+ },
641
+ "release_date": "2026-03-05"
642
+ },
643
+ "gpt-5.6-terra": {
644
+ "id": "gpt-5.6-terra",
645
+ "name": "GPT-5.6 Terra",
646
+ "family": "gpt-terra",
647
+ "reasoning": true,
648
+ "reasoning_options": [{
649
+ "type": "effort",
650
+ "values": [
651
+ "none",
652
+ "low",
653
+ "medium",
654
+ "high",
655
+ "xhigh",
656
+ "max"
657
+ ]
658
+ }],
659
+ "temperature": true,
660
+ "tool_call": true,
661
+ "attachment": true,
662
+ "modalities": {
663
+ "input": [
664
+ "text",
665
+ "image",
666
+ "pdf"
667
+ ],
668
+ "output": ["text"]
669
+ },
670
+ "limit": {
671
+ "context": 105e4,
672
+ "input": 922e3,
673
+ "output": 128e3
674
+ },
675
+ "release_date": "2026-07-09"
676
+ },
677
+ "gpt-5.6-luna": {
678
+ "id": "gpt-5.6-luna",
679
+ "name": "GPT-5.6 Luna",
680
+ "family": "gpt-luna",
681
+ "reasoning": true,
682
+ "reasoning_options": [{
683
+ "type": "effort",
684
+ "values": [
685
+ "none",
686
+ "low",
687
+ "medium",
688
+ "high",
689
+ "xhigh",
690
+ "max"
691
+ ]
692
+ }],
693
+ "temperature": true,
694
+ "tool_call": true,
695
+ "attachment": true,
696
+ "modalities": {
697
+ "input": [
698
+ "text",
699
+ "image",
700
+ "pdf"
701
+ ],
702
+ "output": ["text"]
703
+ },
704
+ "limit": {
705
+ "context": 105e4,
706
+ "input": 922e3,
707
+ "output": 128e3
708
+ },
709
+ "release_date": "2026-07-09"
710
+ },
711
+ "gpt-image-1-mini": {
712
+ "id": "gpt-image-1-mini",
713
+ "name": "gpt-image-1-mini",
714
+ "family": "gpt-image",
715
+ "reasoning": false,
716
+ "temperature": false,
717
+ "tool_call": false,
718
+ "attachment": true,
719
+ "modalities": {
720
+ "input": ["text", "image"],
721
+ "output": ["text", "image"]
722
+ },
723
+ "limit": {
724
+ "context": 0,
725
+ "input": 0,
726
+ "output": 0
727
+ },
728
+ "release_date": "2025-09-26"
729
+ },
730
+ "gpt-daybreak-blue-latest": {
731
+ "id": "gpt-daybreak-blue-latest",
732
+ "name": "Daybreak Blue",
733
+ "family": "gpt-sol",
734
+ "reasoning": true,
735
+ "reasoning_options": [{
736
+ "type": "effort",
737
+ "values": [
738
+ "none",
739
+ "low",
740
+ "medium",
741
+ "high",
742
+ "xhigh",
743
+ "max"
744
+ ]
745
+ }],
746
+ "temperature": true,
747
+ "tool_call": true,
748
+ "attachment": true,
749
+ "modalities": {
750
+ "input": [
751
+ "text",
752
+ "image",
753
+ "pdf"
754
+ ],
755
+ "output": ["text"]
756
+ },
757
+ "limit": {
758
+ "context": 105e4,
759
+ "input": 922e3,
760
+ "output": 128e3
761
+ },
762
+ "release_date": "2026-08-07"
763
+ },
764
+ "gpt-6.2-sol": {
765
+ "id": "gpt-6.2-sol",
766
+ "name": "GPT-6.2 Sol",
767
+ "family": "gpt-sol",
768
+ "reasoning": true,
769
+ "reasoning_options": [{
770
+ "type": "effort",
771
+ "values": [
772
+ "low",
773
+ "medium",
774
+ "high",
775
+ "xhigh",
776
+ "max"
777
+ ]
778
+ }],
779
+ "temperature": false,
780
+ "tool_call": true,
781
+ "attachment": true,
782
+ "modalities": {
783
+ "input": [
784
+ "text",
785
+ "image",
786
+ "pdf"
787
+ ],
788
+ "output": ["text"]
789
+ },
790
+ "limit": {
791
+ "context": 105e4,
792
+ "input": 922e3,
793
+ "output": 128e3
794
+ },
795
+ "release_date": "2026-11-17"
796
+ },
797
+ "o3-mini": {
798
+ "id": "o3-mini",
799
+ "name": "o3-mini",
800
+ "family": "o-mini",
801
+ "reasoning": true,
802
+ "reasoning_options": [{
803
+ "type": "effort",
804
+ "values": [
805
+ "low",
806
+ "medium",
807
+ "high"
808
+ ]
809
+ }],
810
+ "temperature": false,
811
+ "tool_call": true,
812
+ "attachment": false,
813
+ "modalities": {
814
+ "input": ["text"],
815
+ "output": ["text"]
816
+ },
817
+ "limit": {
818
+ "context": 2e5,
819
+ "output": 1e5
820
+ },
821
+ "release_date": "2024-12-20"
822
+ },
823
+ "gpt-4o": {
824
+ "id": "gpt-4o",
825
+ "name": "GPT-4o",
826
+ "family": "gpt",
827
+ "reasoning": false,
828
+ "temperature": true,
829
+ "tool_call": true,
830
+ "attachment": true,
831
+ "modalities": {
832
+ "input": [
833
+ "text",
834
+ "image",
835
+ "pdf"
836
+ ],
837
+ "output": ["text"]
838
+ },
839
+ "limit": {
840
+ "context": 128e3,
841
+ "output": 16384
842
+ },
843
+ "release_date": "2024-05-13"
844
+ },
845
+ "gpt-5.5": {
846
+ "id": "gpt-5.5",
847
+ "name": "GPT-5.5",
848
+ "family": "gpt",
849
+ "reasoning": true,
850
+ "reasoning_options": [{
851
+ "type": "effort",
852
+ "values": [
853
+ "none",
854
+ "low",
855
+ "medium",
856
+ "high",
857
+ "xhigh"
858
+ ]
859
+ }],
860
+ "temperature": true,
861
+ "tool_call": true,
862
+ "attachment": true,
863
+ "modalities": {
864
+ "input": [
865
+ "text",
866
+ "image",
867
+ "pdf"
868
+ ],
869
+ "output": ["text"]
870
+ },
871
+ "limit": {
872
+ "context": 105e4,
873
+ "input": 922e3,
874
+ "output": 128e3
875
+ },
876
+ "release_date": "2026-04-23"
877
+ },
878
+ "text-embedding-ada-002": {
879
+ "id": "text-embedding-ada-002",
880
+ "name": "text-embedding-ada-002",
881
+ "family": "text-embedding",
882
+ "reasoning": false,
883
+ "temperature": false,
884
+ "tool_call": false,
885
+ "attachment": false,
886
+ "modalities": {
887
+ "input": ["text"],
888
+ "output": ["text"]
889
+ },
890
+ "limit": {
891
+ "context": 8192,
892
+ "output": 1536
893
+ },
894
+ "release_date": "2022-12-15"
895
+ },
896
+ "o4-mini": {
897
+ "id": "o4-mini",
898
+ "name": "o4-mini",
899
+ "family": "o-mini",
900
+ "reasoning": true,
901
+ "reasoning_options": [{
902
+ "type": "effort",
903
+ "values": [
904
+ "low",
905
+ "medium",
906
+ "high"
907
+ ]
908
+ }],
909
+ "temperature": false,
910
+ "tool_call": true,
911
+ "attachment": true,
912
+ "modalities": {
913
+ "input": ["text", "image"],
914
+ "output": ["text"]
915
+ },
916
+ "limit": {
917
+ "context": 2e5,
918
+ "output": 1e5
919
+ },
920
+ "release_date": "2025-04-16"
921
+ },
922
+ "gpt-5.6-sol": {
923
+ "id": "gpt-5.6-sol",
924
+ "name": "GPT-5.6 Sol",
925
+ "family": "gpt-sol",
926
+ "reasoning": true,
927
+ "reasoning_options": [{
928
+ "type": "effort",
929
+ "values": [
930
+ "none",
931
+ "low",
932
+ "medium",
933
+ "high",
934
+ "xhigh",
935
+ "max"
936
+ ]
937
+ }],
938
+ "temperature": true,
939
+ "tool_call": true,
940
+ "attachment": true,
941
+ "modalities": {
942
+ "input": [
943
+ "text",
944
+ "image",
945
+ "pdf"
946
+ ],
947
+ "output": ["text"]
948
+ },
949
+ "limit": {
950
+ "context": 105e4,
951
+ "input": 922e3,
952
+ "output": 128e3
953
+ },
954
+ "release_date": "2026-07-09"
955
+ },
956
+ "gpt-5.3-codex-spark": {
957
+ "id": "gpt-5.3-codex-spark",
958
+ "name": "GPT-5.3 Codex Spark",
959
+ "family": "gpt-codex-spark",
960
+ "reasoning": true,
961
+ "reasoning_options": [{
962
+ "type": "effort",
963
+ "values": [
964
+ "none",
965
+ "low",
966
+ "medium",
967
+ "high",
968
+ "xhigh"
969
+ ]
970
+ }],
971
+ "temperature": false,
972
+ "tool_call": true,
973
+ "attachment": true,
974
+ "modalities": {
975
+ "input": [
976
+ "text",
977
+ "image",
978
+ "pdf"
979
+ ],
980
+ "output": ["text"]
981
+ },
982
+ "limit": {
983
+ "context": 128e3,
984
+ "input": 1e5,
985
+ "output": 32e3
986
+ },
987
+ "release_date": "2026-02-05"
988
+ },
989
+ "gpt-6-astra": {
990
+ "id": "gpt-6-astra",
991
+ "name": "GPT-6 Astra",
992
+ "family": "gpt-astra",
993
+ "reasoning": true,
994
+ "reasoning_options": [{
995
+ "type": "effort",
996
+ "values": [
997
+ "low",
998
+ "medium",
999
+ "high",
1000
+ "xhigh",
1001
+ "max"
1002
+ ]
1003
+ }],
1004
+ "temperature": false,
1005
+ "tool_call": true,
1006
+ "attachment": true,
1007
+ "modalities": {
1008
+ "input": [
1009
+ "text",
1010
+ "image",
1011
+ "pdf"
1012
+ ],
1013
+ "output": ["text"]
1014
+ },
1015
+ "limit": {
1016
+ "context": 105e4,
1017
+ "input": 922e3,
1018
+ "output": 128e3
1019
+ },
1020
+ "release_date": "2026-09-04"
1021
+ },
1022
+ "gpt-image-2": {
1023
+ "id": "gpt-image-2",
1024
+ "name": "gpt-image-2",
1025
+ "family": "gpt-image",
1026
+ "reasoning": false,
1027
+ "temperature": false,
1028
+ "tool_call": false,
1029
+ "attachment": true,
1030
+ "modalities": {
1031
+ "input": ["text", "image"],
1032
+ "output": ["image"]
1033
+ },
1034
+ "limit": {
1035
+ "context": 0,
1036
+ "input": 0,
1037
+ "output": 0
1038
+ },
1039
+ "release_date": "2026-04-21"
1040
+ },
1041
+ "gpt-4": {
1042
+ "id": "gpt-4",
1043
+ "name": "GPT-4",
1044
+ "family": "gpt",
1045
+ "reasoning": false,
1046
+ "temperature": true,
1047
+ "tool_call": true,
1048
+ "attachment": false,
1049
+ "modalities": {
1050
+ "input": ["text"],
1051
+ "output": ["text"]
1052
+ },
1053
+ "limit": {
1054
+ "context": 8192,
1055
+ "output": 8192
1056
+ },
1057
+ "release_date": "2023-11-06"
1058
+ },
1059
+ "gpt-5-pro": {
1060
+ "id": "gpt-5-pro",
1061
+ "name": "GPT-5 Pro",
1062
+ "family": "gpt-pro",
1063
+ "reasoning": true,
1064
+ "reasoning_options": [{
1065
+ "type": "effort",
1066
+ "values": ["high"]
1067
+ }],
1068
+ "temperature": false,
1069
+ "tool_call": true,
1070
+ "attachment": true,
1071
+ "modalities": {
1072
+ "input": ["text", "image"],
1073
+ "output": ["text"]
1074
+ },
1075
+ "limit": {
1076
+ "context": 4e5,
1077
+ "input": 272e3,
1078
+ "output": 272e3
1079
+ },
1080
+ "release_date": "2025-10-06"
1081
+ },
1082
+ "gpt-5.5-pro": {
1083
+ "id": "gpt-5.5-pro",
1084
+ "name": "GPT-5.5 Pro",
1085
+ "family": "gpt-pro",
1086
+ "reasoning": true,
1087
+ "reasoning_options": [{
1088
+ "type": "effort",
1089
+ "values": [
1090
+ "medium",
1091
+ "high",
1092
+ "xhigh"
1093
+ ]
1094
+ }],
1095
+ "temperature": false,
1096
+ "tool_call": true,
1097
+ "attachment": true,
1098
+ "modalities": {
1099
+ "input": [
1100
+ "text",
1101
+ "image",
1102
+ "pdf"
1103
+ ],
1104
+ "output": ["text"]
1105
+ },
1106
+ "limit": {
1107
+ "context": 105e4,
1108
+ "input": 922e3,
1109
+ "output": 128e3
1110
+ },
1111
+ "release_date": "2026-04-23"
1112
+ },
1113
+ "gpt-6.1-terra": {
1114
+ "id": "gpt-6.1-terra",
1115
+ "name": "GPT-6.1 Terra",
1116
+ "family": "gpt-terra",
1117
+ "reasoning": true,
1118
+ "reasoning_options": [{
1119
+ "type": "effort",
1120
+ "values": [
1121
+ "none",
1122
+ "low",
1123
+ "medium",
1124
+ "high",
1125
+ "xhigh",
1126
+ "max"
1127
+ ]
1128
+ }],
1129
+ "temperature": true,
1130
+ "tool_call": true,
1131
+ "attachment": true,
1132
+ "modalities": {
1133
+ "input": [
1134
+ "text",
1135
+ "image",
1136
+ "pdf"
1137
+ ],
1138
+ "output": ["text"]
1139
+ },
1140
+ "limit": {
1141
+ "context": 105e4,
1142
+ "input": 922e3,
1143
+ "output": 128e3
1144
+ },
1145
+ "release_date": "2026-10-26"
1146
+ },
1147
+ "gpt-4.1": {
1148
+ "id": "gpt-4.1",
1149
+ "name": "GPT-4.1",
1150
+ "family": "gpt",
1151
+ "reasoning": false,
1152
+ "temperature": true,
1153
+ "tool_call": true,
1154
+ "attachment": true,
1155
+ "modalities": {
1156
+ "input": [
1157
+ "text",
1158
+ "image",
1159
+ "pdf"
1160
+ ],
1161
+ "output": ["text"]
1162
+ },
1163
+ "limit": {
1164
+ "context": 1047576,
1165
+ "output": 32768
1166
+ },
1167
+ "release_date": "2025-04-14"
1168
+ },
1169
+ "gpt-image-1.5": {
1170
+ "id": "gpt-image-1.5",
1171
+ "name": "gpt-image-1.5",
1172
+ "family": "gpt-image",
1173
+ "reasoning": false,
1174
+ "temperature": false,
1175
+ "tool_call": false,
1176
+ "attachment": true,
1177
+ "modalities": {
1178
+ "input": ["text", "image"],
1179
+ "output": ["text", "image"]
1180
+ },
1181
+ "limit": {
1182
+ "context": 0,
1183
+ "input": 0,
1184
+ "output": 0
1185
+ },
1186
+ "release_date": "2025-11-25"
1187
+ },
1188
+ "gpt-6.1-sol": {
1189
+ "id": "gpt-6.1-sol",
1190
+ "name": "GPT-6.1 Sol",
1191
+ "family": "gpt-sol",
1192
+ "reasoning": true,
1193
+ "reasoning_options": [{
1194
+ "type": "effort",
1195
+ "values": [
1196
+ "low",
1197
+ "medium",
1198
+ "high",
1199
+ "xhigh",
1200
+ "max"
1201
+ ]
1202
+ }],
1203
+ "temperature": false,
1204
+ "tool_call": true,
1205
+ "attachment": true,
1206
+ "modalities": {
1207
+ "input": [
1208
+ "text",
1209
+ "image",
1210
+ "pdf"
1211
+ ],
1212
+ "output": ["text"]
1213
+ },
1214
+ "limit": {
1215
+ "context": 105e4,
1216
+ "input": 922e3,
1217
+ "output": 128e3
1218
+ },
1219
+ "release_date": "2026-09-29"
1220
+ },
1221
+ "gpt-5-mini": {
1222
+ "id": "gpt-5-mini",
1223
+ "name": "GPT-5 Mini",
1224
+ "family": "gpt-mini",
1225
+ "reasoning": true,
1226
+ "reasoning_options": [{
1227
+ "type": "effort",
1228
+ "values": [
1229
+ "minimal",
1230
+ "low",
1231
+ "medium",
1232
+ "high"
1233
+ ]
1234
+ }],
1235
+ "temperature": false,
1236
+ "tool_call": true,
1237
+ "attachment": true,
1238
+ "modalities": {
1239
+ "input": ["text", "image"],
1240
+ "output": ["text"]
1241
+ },
1242
+ "limit": {
1243
+ "context": 4e5,
1244
+ "input": 272e3,
1245
+ "output": 128e3
1246
+ },
1247
+ "release_date": "2025-08-07"
1248
+ },
1249
+ "gpt-4-turbo": {
1250
+ "id": "gpt-4-turbo",
1251
+ "name": "GPT-4 Turbo",
1252
+ "family": "gpt",
1253
+ "reasoning": false,
1254
+ "temperature": true,
1255
+ "tool_call": true,
1256
+ "attachment": true,
1257
+ "modalities": {
1258
+ "input": ["text", "image"],
1259
+ "output": ["text"]
1260
+ },
1261
+ "limit": {
1262
+ "context": 128e3,
1263
+ "output": 4096
1264
+ },
1265
+ "release_date": "2023-11-06"
1266
+ },
1267
+ "gpt-6-sol": {
1268
+ "id": "gpt-6-sol",
1269
+ "name": "GPT-6 Sol",
1270
+ "family": "gpt-sol",
1271
+ "reasoning": true,
1272
+ "reasoning_options": [{
1273
+ "type": "effort",
1274
+ "values": [
1275
+ "none",
1276
+ "low",
1277
+ "medium",
1278
+ "high",
1279
+ "xhigh",
1280
+ "max"
1281
+ ]
1282
+ }],
1283
+ "temperature": true,
1284
+ "tool_call": true,
1285
+ "attachment": true,
1286
+ "modalities": {
1287
+ "input": [
1288
+ "text",
1289
+ "image",
1290
+ "pdf"
1291
+ ],
1292
+ "output": ["text"]
1293
+ },
1294
+ "limit": {
1295
+ "context": 105e4,
1296
+ "input": 922e3,
1297
+ "output": 128e3
1298
+ },
1299
+ "release_date": "2026-09-22"
1300
+ },
1301
+ "gpt-4.1-nano": {
1302
+ "id": "gpt-4.1-nano",
1303
+ "name": "GPT-4.1 nano",
1304
+ "family": "gpt-nano",
1305
+ "reasoning": false,
1306
+ "temperature": true,
1307
+ "tool_call": true,
1308
+ "attachment": true,
1309
+ "modalities": {
1310
+ "input": ["text", "image"],
1311
+ "output": ["text"]
1312
+ },
1313
+ "limit": {
1314
+ "context": 1047576,
1315
+ "output": 32768
1316
+ },
1317
+ "release_date": "2025-04-14"
1318
+ },
1319
+ "gpt-5.3-codex": {
1320
+ "id": "gpt-5.3-codex",
1321
+ "name": "GPT-5.3 Codex",
1322
+ "family": "gpt-codex",
1323
+ "reasoning": true,
1324
+ "reasoning_options": [{
1325
+ "type": "effort",
1326
+ "values": [
1327
+ "none",
1328
+ "low",
1329
+ "medium",
1330
+ "high",
1331
+ "xhigh"
1332
+ ]
1333
+ }],
1334
+ "temperature": true,
1335
+ "tool_call": true,
1336
+ "attachment": true,
1337
+ "modalities": {
1338
+ "input": [
1339
+ "text",
1340
+ "image",
1341
+ "pdf"
1342
+ ],
1343
+ "output": ["text"]
1344
+ },
1345
+ "limit": {
1346
+ "context": 4e5,
1347
+ "input": 272e3,
1348
+ "output": 128e3
1349
+ },
1350
+ "release_date": "2026-02-05"
1351
+ },
1352
+ "gpt-3.5-turbo": {
1353
+ "id": "gpt-3.5-turbo",
1354
+ "name": "GPT-3.5-turbo",
1355
+ "family": "gpt",
1356
+ "reasoning": false,
1357
+ "temperature": true,
1358
+ "tool_call": false,
1359
+ "attachment": false,
1360
+ "modalities": {
1361
+ "input": ["text"],
1362
+ "output": ["text"]
1363
+ },
1364
+ "limit": {
1365
+ "context": 16385,
1366
+ "output": 4096
1367
+ },
1368
+ "release_date": "2023-03-01"
1369
+ },
1370
+ "gpt-5.6": {
1371
+ "id": "gpt-5.6",
1372
+ "name": "GPT-5.6",
1373
+ "family": "gpt-sol",
1374
+ "reasoning": true,
1375
+ "reasoning_options": [{
1376
+ "type": "effort",
1377
+ "values": [
1378
+ "none",
1379
+ "low",
1380
+ "medium",
1381
+ "high",
1382
+ "xhigh",
1383
+ "max"
1384
+ ]
1385
+ }],
1386
+ "temperature": true,
1387
+ "tool_call": true,
1388
+ "attachment": true,
1389
+ "modalities": {
1390
+ "input": [
1391
+ "text",
1392
+ "image",
1393
+ "pdf"
1394
+ ],
1395
+ "output": ["text"]
1396
+ },
1397
+ "limit": {
1398
+ "context": 105e4,
1399
+ "input": 922e3,
1400
+ "output": 128e3
1401
+ },
1402
+ "release_date": "2026-07-09"
1403
+ },
1404
+ "gpt-realtime-2.1": {
1405
+ "id": "gpt-realtime-2.1",
1406
+ "name": "GPT-Realtime-2.1",
1407
+ "family": "gpt",
1408
+ "reasoning": true,
1409
+ "reasoning_options": [{
1410
+ "type": "effort",
1411
+ "values": [
1412
+ "minimal",
1413
+ "low",
1414
+ "medium",
1415
+ "high",
1416
+ "xhigh"
1417
+ ]
1418
+ }],
1419
+ "temperature": false,
1420
+ "tool_call": true,
1421
+ "attachment": true,
1422
+ "modalities": {
1423
+ "input": [
1424
+ "text",
1425
+ "audio",
1426
+ "image"
1427
+ ],
1428
+ "output": ["text", "audio"]
1429
+ },
1430
+ "limit": {
1431
+ "context": 128e3,
1432
+ "input": 96e3,
1433
+ "output": 32e3
1434
+ },
1435
+ "release_date": "2026-07-06"
1436
+ }
1437
+ } },
1438
+ snapshotAt: Date.parse("2026-11-18")
1439
+ };
1440
+ //#endregion
1441
+ //#region src/facts.ts
1442
+ const current = {
1443
+ chat: true,
1444
+ reasoning: true,
1445
+ tool_call: true,
1446
+ attachment: true,
1447
+ modalities: {
1448
+ input: ["text", "image"],
1449
+ output: ["text"]
1450
+ }
1451
+ };
1452
+ const standard = {
1453
+ context: 4e5,
1454
+ input: 272e3,
1455
+ output: 128e3
1456
+ };
1457
+ const cyber = {
1458
+ ...current,
1459
+ name: "GPT-5.6 Cyber",
1460
+ family: "gpt-cyber"
1461
+ };
1462
+ const notChat = [
1463
+ "gpt-4.1-nano",
1464
+ "gpt-4o-2024-05-13",
1465
+ "chatgpt-image-latest",
1466
+ "gpt-4-turbo",
1467
+ "o1",
1468
+ "gpt-image-1.5",
1469
+ "o1-pro",
1470
+ "text-embedding-ada-002",
1471
+ "gpt-image-1",
1472
+ "gpt-image-1-mini",
1473
+ "gpt-3.5-turbo",
1474
+ "text-embedding-3-small",
1475
+ "text-embedding-3-large",
1476
+ "gpt-4",
1477
+ "gpt-5.2-chat-latest",
1478
+ "o4-mini",
1479
+ "gpt-realtime-2.1",
1480
+ "o3-mini",
1481
+ "gpt-5.3-chat-latest"
1482
+ ];
1483
+ const modelFacts = {
1484
+ revisions: [],
1485
+ presets: [
1486
+ {
1487
+ model: "chat-latest",
1488
+ entry: {
1489
+ ...current,
1490
+ name: "Chat Latest",
1491
+ family: "gpt",
1492
+ reasoning: false,
1493
+ limit: standard
1494
+ }
1495
+ },
1496
+ ...notChat.map((model) => ({
1497
+ model,
1498
+ entry: { chat: false }
1499
+ })),
1500
+ {
1501
+ model: "gpt-5.6-cyber",
1502
+ entry: cyber
1503
+ },
1504
+ {
1505
+ protocolId: "openai-responses",
1506
+ model: "gpt-5.6-cyber",
1507
+ entry: {
1508
+ ...cyber,
1509
+ limit: standard
1510
+ }
1511
+ }
1512
+ ]
1513
+ };
1514
+ //#endregion
1515
+ //#region src/routing.ts
1516
+ function connectionConfig(endpoint, protocolId, config, aliases = []) {
1517
+ const defaults = Object.values(endpoint.capabilities).find((one) => one.protocolIds.includes(protocolId))?.protocolDefaults?.[protocolId] ?? {};
1518
+ const configured = config.baseUrl;
1519
+ const canonical = [
1520
+ endpoint.defaults?.baseUrl,
1521
+ ...Object.values(endpoint.capabilities).flatMap((one) => Object.values(one.protocolDefaults ?? {}).map((value) => value.baseUrl)),
1522
+ ...aliases
1523
+ ].filter((value) => typeof value === "string");
1524
+ const isOfficial = configured === void 0 || typeof configured === "string" && canonical.some((value) => value.replace(/\/+$/, "") === configured.replace(/\/+$/, ""));
1525
+ const selected = defaults.baseUrl ?? endpoint.defaults?.baseUrl;
1526
+ return {
1527
+ ...endpoint.defaults,
1528
+ ...defaults,
1529
+ ...config,
1530
+ ...isOfficial && selected !== void 0 ? { baseUrl: selected } : {}
1531
+ };
1532
+ }
1533
+ //#endregion
1534
+ //#region src/type.ts
1535
+ const TYPE = "openai";
1536
+ const endpoints = [{
1537
+ id: "openai",
1538
+ resourceCapability: {
1539
+ support: "unsupported",
1540
+ reason: "unsupported",
1541
+ sources: [],
1542
+ presets: []
1543
+ },
1544
+ label: "OpenAI",
1545
+ capabilities: {
1546
+ chat: {
1547
+ protocolIds: ["openai", "openai-responses"],
1548
+ defaultProtocolId: "openai-responses"
1549
+ },
1550
+ image: {
1551
+ protocolIds: ["openai-images"],
1552
+ defaultProtocolId: "openai-images"
1553
+ },
1554
+ decision: {
1555
+ protocolIds: ["openai-decisions"],
1556
+ defaultProtocolId: "openai-decisions"
1557
+ },
1558
+ embedding: {
1559
+ protocolIds: ["openai-embeddings"],
1560
+ defaultProtocolId: "openai-embeddings"
1561
+ }
1562
+ },
1563
+ defaults: { baseUrl: "https://api.openai.com/v1" },
1564
+ credentialGroup: "openai"
1565
+ }];
1566
+ const protocolOptions = { openai: {
1567
+ outputLimitField: "max_completion_tokens",
1568
+ promptCacheKey: true
1569
+ } };
1570
+ function openaiProviderType(support) {
1571
+ return {
1572
+ type: TYPE,
1573
+ listingContractVersion: "capacity-listing-v1",
1574
+ modelFacts,
1575
+ label: "OpenAI",
1576
+ fields: [{
1577
+ key: "apiKey",
1578
+ kind: "secret",
1579
+ label: "API Key",
1580
+ required: true
1581
+ }],
1582
+ endpoints,
1583
+ catalog: support ? {
1584
+ ...catalog,
1585
+ source: support.catalogueSource("https://models.dev/api.json", "models")
1586
+ } : catalog,
1587
+ prepareConnection(input) {
1588
+ const endpoint = endpoints.find((one) => one.id === input.endpointId);
1589
+ if (!endpoint || !Object.values(endpoint.capabilities).some((one) => one.protocolIds.includes(input.protocolId))) throw new Error("unsupported supplier endpoint or protocol");
1590
+ return {
1591
+ config: connectionConfig(endpoint, input.protocolId, input.config),
1592
+ options: input.protocolId === "openai" ? protocolOptions[endpoint.id] ?? {} : {}
1593
+ };
1594
+ }
1595
+ };
1596
+ }
1597
+ //#endregion
1598
+ //#region src/index.ts
1599
+ const TOOL_NAMES = [];
1600
+ const plugin = {
1601
+ name: "@eum-agent/llm-provider-openai",
1602
+ requires: ["model-catalogue-sources"],
1603
+ apply(ctx) {
1604
+ const support = ctx.services.get("model-catalogue-sources");
1605
+ ctx.modelProviders.register(openaiProviderType(support));
1606
+ }
1607
+ };
1608
+ //#endregion
1609
+ export { TOOL_NAMES, plugin as default };