@eum-agent/llm-provider-openai 0.0.0-stage → 1.1.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/assets/NOTICE ADDED
@@ -0,0 +1,28 @@
1
+ Vendor marks from lobehub/lobe-icons (@lobehub/icons-static-svg 1.95.1, MIT), except where noted. Each file is named for the catalogue row contributed by its owning provider extension.
2
+
3
+ - zhipu*.svg: the Z glyph from Z.ai's own logo (https://z-cdn.chatglm.cn/z-ai/static/logo.svg), without its dark tile.
4
+ - kimi-coding*.svg: the K filled black, as kimi.com's light-scheme favicon draws it; the lobe-icons original fills it white.
5
+
6
+ The lobe-icons marks are distributed under the MIT License:
7
+
8
+ MIT License
9
+
10
+ Copyright (c) 2023 LobeHub
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ <svg fill="currentColor" fill-rule="evenodd" height="24" style="flex:none;line-height:1" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><title>OpenAI</title><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>
package/dist/index.js ADDED
@@ -0,0 +1,1292 @@
1
+ //#endregion
2
+ //#region src/catalog.ts
3
+ /** Supplier-owned catalogue rows; protocol request facts belong to protocol registrations. */
4
+ const catalog = {
5
+ vendors: [{
6
+ kind: "vendor",
7
+ id: "openai",
8
+ 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",
9
+ name: "OpenAI",
10
+ region: null,
11
+ market: "international",
12
+ catalogKey: "openai",
13
+ canListModels: true,
14
+ endpoints: [{
15
+ baseUrl: "https://api.openai.com/v1",
16
+ outputLimitField: "max_completion_tokens",
17
+ promptCacheKey: true,
18
+ type: "openai",
19
+ endpointId: "openai",
20
+ protocolIds: ["openai", "openai-responses"]
21
+ }]
22
+ }],
23
+ snapshot: { "openai": {
24
+ "gpt-5-nano": {
25
+ "id": "gpt-5-nano",
26
+ "name": "GPT-5 Nano",
27
+ "family": "gpt-nano",
28
+ "reasoning": true,
29
+ "reasoning_options": [{
30
+ "type": "effort",
31
+ "values": [
32
+ "minimal",
33
+ "low",
34
+ "medium",
35
+ "high"
36
+ ]
37
+ }],
38
+ "temperature": false,
39
+ "tool_call": true,
40
+ "attachment": true,
41
+ "modalities": {
42
+ "input": ["text", "image"],
43
+ "output": ["text"]
44
+ },
45
+ "limit": {
46
+ "context": 4e5,
47
+ "output": 128e3
48
+ },
49
+ "release_date": "2025-08-07"
50
+ },
51
+ "gpt-4.1-nano": {
52
+ "id": "gpt-4.1-nano",
53
+ "name": "GPT-4.1 nano",
54
+ "family": "gpt-nano",
55
+ "reasoning": false,
56
+ "temperature": true,
57
+ "tool_call": true,
58
+ "attachment": true,
59
+ "modalities": {
60
+ "input": ["text", "image"],
61
+ "output": ["text"]
62
+ },
63
+ "limit": {
64
+ "context": 1047576,
65
+ "output": 32768
66
+ },
67
+ "release_date": "2025-04-14"
68
+ },
69
+ "gpt-4o-2024-05-13": {
70
+ "id": "gpt-4o-2024-05-13",
71
+ "name": "GPT-4o (2024-05-13)",
72
+ "family": "gpt",
73
+ "reasoning": false,
74
+ "temperature": true,
75
+ "tool_call": true,
76
+ "attachment": true,
77
+ "modalities": {
78
+ "input": ["text", "image"],
79
+ "output": ["text"]
80
+ },
81
+ "limit": {
82
+ "context": 128e3,
83
+ "output": 4096
84
+ },
85
+ "release_date": "2024-05-13"
86
+ },
87
+ "gpt-5-pro": {
88
+ "id": "gpt-5-pro",
89
+ "name": "GPT-5 Pro",
90
+ "family": "gpt-pro",
91
+ "reasoning": true,
92
+ "reasoning_options": [{
93
+ "type": "effort",
94
+ "values": ["high"]
95
+ }],
96
+ "temperature": false,
97
+ "tool_call": true,
98
+ "attachment": true,
99
+ "modalities": {
100
+ "input": ["text", "image"],
101
+ "output": ["text"]
102
+ },
103
+ "limit": {
104
+ "context": 4e5,
105
+ "output": 272e3
106
+ },
107
+ "release_date": "2025-10-06"
108
+ },
109
+ "chatgpt-image-latest": {
110
+ "id": "chatgpt-image-latest",
111
+ "name": "chatgpt-image-latest",
112
+ "family": "gpt-image",
113
+ "reasoning": false,
114
+ "temperature": false,
115
+ "tool_call": false,
116
+ "attachment": true,
117
+ "modalities": {
118
+ "input": ["text", "image"],
119
+ "output": ["text", "image"]
120
+ },
121
+ "limit": {
122
+ "context": 0,
123
+ "output": 0
124
+ },
125
+ "release_date": "2025-12-16"
126
+ },
127
+ "gpt-5.6-sol": {
128
+ "id": "gpt-5.6-sol",
129
+ "name": "GPT-5.6 Sol",
130
+ "family": "gpt-sol",
131
+ "reasoning": true,
132
+ "reasoning_options": [{
133
+ "type": "effort",
134
+ "values": [
135
+ "none",
136
+ "low",
137
+ "medium",
138
+ "high",
139
+ "xhigh",
140
+ "max"
141
+ ]
142
+ }],
143
+ "temperature": false,
144
+ "tool_call": true,
145
+ "attachment": true,
146
+ "modalities": {
147
+ "input": [
148
+ "text",
149
+ "image",
150
+ "pdf"
151
+ ],
152
+ "output": ["text"]
153
+ },
154
+ "limit": {
155
+ "context": 105e4,
156
+ "output": 128e3
157
+ },
158
+ "release_date": "2026-07-09"
159
+ },
160
+ "gpt-4o-2024-08-06": {
161
+ "id": "gpt-4o-2024-08-06",
162
+ "name": "GPT-4o (2024-08-06)",
163
+ "family": "gpt",
164
+ "reasoning": false,
165
+ "temperature": true,
166
+ "tool_call": true,
167
+ "attachment": true,
168
+ "modalities": {
169
+ "input": ["text", "image"],
170
+ "output": ["text"]
171
+ },
172
+ "limit": {
173
+ "context": 128e3,
174
+ "output": 16384
175
+ },
176
+ "release_date": "2024-08-06"
177
+ },
178
+ "gpt-6-astra": {
179
+ "id": "gpt-6-astra",
180
+ "name": "GPT-6 Astra",
181
+ "family": "gpt-astra",
182
+ "reasoning": true,
183
+ "reasoning_options": [{
184
+ "type": "effort",
185
+ "values": [
186
+ "low",
187
+ "medium",
188
+ "high",
189
+ "xhigh",
190
+ "max"
191
+ ]
192
+ }],
193
+ "temperature": false,
194
+ "tool_call": true,
195
+ "attachment": true,
196
+ "modalities": {
197
+ "input": [
198
+ "text",
199
+ "image",
200
+ "pdf"
201
+ ],
202
+ "output": ["text"]
203
+ },
204
+ "limit": {
205
+ "context": 105e4,
206
+ "output": 128e3
207
+ },
208
+ "release_date": "2026-09-04"
209
+ },
210
+ "gpt-5.2-pro": {
211
+ "id": "gpt-5.2-pro",
212
+ "name": "GPT-5.2 Pro",
213
+ "family": "gpt-pro",
214
+ "reasoning": true,
215
+ "reasoning_options": [{
216
+ "type": "effort",
217
+ "values": [
218
+ "medium",
219
+ "high",
220
+ "xhigh"
221
+ ]
222
+ }],
223
+ "temperature": false,
224
+ "tool_call": true,
225
+ "attachment": true,
226
+ "modalities": {
227
+ "input": ["text", "image"],
228
+ "output": ["text"]
229
+ },
230
+ "limit": {
231
+ "context": 4e5,
232
+ "output": 128e3
233
+ },
234
+ "release_date": "2025-12-11"
235
+ },
236
+ "gpt-5.3-codex-spark": {
237
+ "id": "gpt-5.3-codex-spark",
238
+ "name": "GPT-5.3 Codex Spark",
239
+ "family": "gpt-codex-spark",
240
+ "reasoning": true,
241
+ "reasoning_options": [{
242
+ "type": "effort",
243
+ "values": [
244
+ "none",
245
+ "low",
246
+ "medium",
247
+ "high",
248
+ "xhigh"
249
+ ]
250
+ }],
251
+ "temperature": false,
252
+ "tool_call": true,
253
+ "attachment": true,
254
+ "modalities": {
255
+ "input": [
256
+ "text",
257
+ "image",
258
+ "pdf"
259
+ ],
260
+ "output": ["text"]
261
+ },
262
+ "limit": {
263
+ "context": 128e3,
264
+ "output": 32e3
265
+ },
266
+ "release_date": "2026-02-05"
267
+ },
268
+ "gpt-4.1-mini": {
269
+ "id": "gpt-4.1-mini",
270
+ "name": "GPT-4.1 mini",
271
+ "family": "gpt-mini",
272
+ "reasoning": false,
273
+ "temperature": true,
274
+ "tool_call": true,
275
+ "attachment": true,
276
+ "modalities": {
277
+ "input": [
278
+ "text",
279
+ "image",
280
+ "pdf"
281
+ ],
282
+ "output": ["text"]
283
+ },
284
+ "limit": {
285
+ "context": 1047576,
286
+ "output": 32768
287
+ },
288
+ "release_date": "2025-04-14"
289
+ },
290
+ "gpt-5.4": {
291
+ "id": "gpt-5.4",
292
+ "name": "GPT-5.4",
293
+ "family": "gpt",
294
+ "reasoning": true,
295
+ "reasoning_options": [{
296
+ "type": "effort",
297
+ "values": [
298
+ "none",
299
+ "low",
300
+ "medium",
301
+ "high",
302
+ "xhigh"
303
+ ]
304
+ }],
305
+ "temperature": true,
306
+ "tool_call": true,
307
+ "attachment": true,
308
+ "modalities": {
309
+ "input": [
310
+ "text",
311
+ "image",
312
+ "pdf"
313
+ ],
314
+ "output": ["text"]
315
+ },
316
+ "limit": {
317
+ "context": 105e4,
318
+ "output": 128e3
319
+ },
320
+ "release_date": "2026-03-05"
321
+ },
322
+ "gpt-4-turbo": {
323
+ "id": "gpt-4-turbo",
324
+ "name": "GPT-4 Turbo",
325
+ "family": "gpt",
326
+ "reasoning": false,
327
+ "temperature": true,
328
+ "tool_call": true,
329
+ "attachment": true,
330
+ "modalities": {
331
+ "input": ["text", "image"],
332
+ "output": ["text"]
333
+ },
334
+ "limit": {
335
+ "context": 128e3,
336
+ "output": 4096
337
+ },
338
+ "release_date": "2023-11-06"
339
+ },
340
+ "gpt-5.1": {
341
+ "id": "gpt-5.1",
342
+ "name": "GPT-5.1",
343
+ "family": "gpt",
344
+ "reasoning": true,
345
+ "reasoning_options": [{
346
+ "type": "effort",
347
+ "values": [
348
+ "none",
349
+ "low",
350
+ "medium",
351
+ "high"
352
+ ]
353
+ }],
354
+ "temperature": true,
355
+ "tool_call": true,
356
+ "attachment": true,
357
+ "modalities": {
358
+ "input": ["text", "image"],
359
+ "output": ["text"]
360
+ },
361
+ "limit": {
362
+ "context": 4e5,
363
+ "output": 128e3
364
+ },
365
+ "release_date": "2025-11-13"
366
+ },
367
+ "o1": {
368
+ "id": "o1",
369
+ "name": "o1",
370
+ "family": "o",
371
+ "reasoning": true,
372
+ "reasoning_options": [{
373
+ "type": "effort",
374
+ "values": [
375
+ "low",
376
+ "medium",
377
+ "high"
378
+ ]
379
+ }],
380
+ "temperature": false,
381
+ "tool_call": true,
382
+ "attachment": true,
383
+ "modalities": {
384
+ "input": [
385
+ "text",
386
+ "image",
387
+ "pdf"
388
+ ],
389
+ "output": ["text"]
390
+ },
391
+ "limit": {
392
+ "context": 2e5,
393
+ "output": 1e5
394
+ },
395
+ "release_date": "2024-12-05"
396
+ },
397
+ "gpt-4o": {
398
+ "id": "gpt-4o",
399
+ "name": "GPT-4o",
400
+ "family": "gpt",
401
+ "reasoning": false,
402
+ "temperature": true,
403
+ "tool_call": true,
404
+ "attachment": true,
405
+ "modalities": {
406
+ "input": [
407
+ "text",
408
+ "image",
409
+ "pdf"
410
+ ],
411
+ "output": ["text"]
412
+ },
413
+ "limit": {
414
+ "context": 128e3,
415
+ "output": 16384
416
+ },
417
+ "release_date": "2024-05-13"
418
+ },
419
+ "gpt-5.6-luna": {
420
+ "id": "gpt-5.6-luna",
421
+ "name": "GPT-5.6 Luna",
422
+ "family": "gpt-luna",
423
+ "reasoning": true,
424
+ "reasoning_options": [{
425
+ "type": "effort",
426
+ "values": [
427
+ "none",
428
+ "low",
429
+ "medium",
430
+ "high",
431
+ "xhigh",
432
+ "max"
433
+ ]
434
+ }],
435
+ "temperature": false,
436
+ "tool_call": true,
437
+ "attachment": true,
438
+ "modalities": {
439
+ "input": [
440
+ "text",
441
+ "image",
442
+ "pdf"
443
+ ],
444
+ "output": ["text"]
445
+ },
446
+ "limit": {
447
+ "context": 105e4,
448
+ "output": 128e3
449
+ },
450
+ "release_date": "2026-07-09"
451
+ },
452
+ "gpt-5.3-codex": {
453
+ "id": "gpt-5.3-codex",
454
+ "name": "GPT-5.3 Codex",
455
+ "family": "gpt-codex",
456
+ "reasoning": true,
457
+ "reasoning_options": [{
458
+ "type": "effort",
459
+ "values": [
460
+ "none",
461
+ "low",
462
+ "medium",
463
+ "high",
464
+ "xhigh"
465
+ ]
466
+ }],
467
+ "temperature": true,
468
+ "tool_call": true,
469
+ "attachment": true,
470
+ "modalities": {
471
+ "input": [
472
+ "text",
473
+ "image",
474
+ "pdf"
475
+ ],
476
+ "output": ["text"]
477
+ },
478
+ "limit": {
479
+ "context": 4e5,
480
+ "output": 128e3
481
+ },
482
+ "release_date": "2026-02-05"
483
+ },
484
+ "gpt-4o-mini": {
485
+ "id": "gpt-4o-mini",
486
+ "name": "GPT-4o mini",
487
+ "family": "gpt-mini",
488
+ "reasoning": false,
489
+ "temperature": true,
490
+ "tool_call": true,
491
+ "attachment": true,
492
+ "modalities": {
493
+ "input": [
494
+ "text",
495
+ "image",
496
+ "pdf"
497
+ ],
498
+ "output": ["text"]
499
+ },
500
+ "limit": {
501
+ "context": 128e3,
502
+ "output": 16384
503
+ },
504
+ "release_date": "2024-07-18"
505
+ },
506
+ "gpt-image-1.5": {
507
+ "id": "gpt-image-1.5",
508
+ "name": "gpt-image-1.5",
509
+ "family": "gpt-image",
510
+ "reasoning": false,
511
+ "temperature": false,
512
+ "tool_call": false,
513
+ "attachment": true,
514
+ "modalities": {
515
+ "input": ["text", "image"],
516
+ "output": ["text", "image"]
517
+ },
518
+ "limit": {
519
+ "context": 0,
520
+ "output": 0
521
+ },
522
+ "release_date": "2025-11-25"
523
+ },
524
+ "o1-pro": {
525
+ "id": "o1-pro",
526
+ "name": "o1-pro",
527
+ "family": "o-pro",
528
+ "reasoning": true,
529
+ "reasoning_options": [{
530
+ "type": "effort",
531
+ "values": [
532
+ "low",
533
+ "medium",
534
+ "high"
535
+ ]
536
+ }],
537
+ "temperature": false,
538
+ "tool_call": true,
539
+ "attachment": true,
540
+ "modalities": {
541
+ "input": ["text", "image"],
542
+ "output": ["text"]
543
+ },
544
+ "limit": {
545
+ "context": 2e5,
546
+ "output": 1e5
547
+ },
548
+ "release_date": "2025-03-19"
549
+ },
550
+ "gpt-4.1": {
551
+ "id": "gpt-4.1",
552
+ "name": "GPT-4.1",
553
+ "family": "gpt",
554
+ "reasoning": false,
555
+ "temperature": true,
556
+ "tool_call": true,
557
+ "attachment": true,
558
+ "modalities": {
559
+ "input": [
560
+ "text",
561
+ "image",
562
+ "pdf"
563
+ ],
564
+ "output": ["text"]
565
+ },
566
+ "limit": {
567
+ "context": 1047576,
568
+ "output": 32768
569
+ },
570
+ "release_date": "2025-04-14"
571
+ },
572
+ "text-embedding-ada-002": {
573
+ "id": "text-embedding-ada-002",
574
+ "name": "text-embedding-ada-002",
575
+ "family": "text-embedding",
576
+ "reasoning": false,
577
+ "temperature": false,
578
+ "tool_call": false,
579
+ "attachment": false,
580
+ "modalities": {
581
+ "input": ["text"],
582
+ "output": ["text"]
583
+ },
584
+ "limit": {
585
+ "context": 8192,
586
+ "output": 1536
587
+ },
588
+ "release_date": "2022-12-15"
589
+ },
590
+ "gpt-image-1": {
591
+ "id": "gpt-image-1",
592
+ "name": "gpt-image-1",
593
+ "family": "gpt-image",
594
+ "reasoning": false,
595
+ "temperature": false,
596
+ "tool_call": false,
597
+ "attachment": true,
598
+ "modalities": {
599
+ "input": ["text", "image"],
600
+ "output": ["image"]
601
+ },
602
+ "limit": {
603
+ "context": 0,
604
+ "output": 0
605
+ },
606
+ "release_date": "2025-04-24"
607
+ },
608
+ "gpt-5.4-nano": {
609
+ "id": "gpt-5.4-nano",
610
+ "name": "GPT-5.4 nano",
611
+ "family": "gpt-nano",
612
+ "reasoning": true,
613
+ "reasoning_options": [{
614
+ "type": "effort",
615
+ "values": [
616
+ "none",
617
+ "low",
618
+ "medium",
619
+ "high",
620
+ "xhigh"
621
+ ]
622
+ }],
623
+ "temperature": true,
624
+ "tool_call": true,
625
+ "attachment": true,
626
+ "modalities": {
627
+ "input": ["text", "image"],
628
+ "output": ["text"]
629
+ },
630
+ "limit": {
631
+ "context": 4e5,
632
+ "output": 128e3
633
+ },
634
+ "release_date": "2026-03-17"
635
+ },
636
+ "gpt-5.5-pro": {
637
+ "id": "gpt-5.5-pro",
638
+ "name": "GPT-5.5 Pro",
639
+ "family": "gpt-pro",
640
+ "reasoning": true,
641
+ "reasoning_options": [{
642
+ "type": "effort",
643
+ "values": [
644
+ "medium",
645
+ "high",
646
+ "xhigh"
647
+ ]
648
+ }],
649
+ "temperature": false,
650
+ "tool_call": true,
651
+ "attachment": true,
652
+ "modalities": {
653
+ "input": [
654
+ "text",
655
+ "image",
656
+ "pdf"
657
+ ],
658
+ "output": ["text"]
659
+ },
660
+ "limit": {
661
+ "context": 105e4,
662
+ "output": 128e3
663
+ },
664
+ "release_date": "2026-04-23"
665
+ },
666
+ "gpt-image-1-mini": {
667
+ "id": "gpt-image-1-mini",
668
+ "name": "gpt-image-1-mini",
669
+ "family": "gpt-image",
670
+ "reasoning": false,
671
+ "temperature": false,
672
+ "tool_call": false,
673
+ "attachment": true,
674
+ "modalities": {
675
+ "input": ["text", "image"],
676
+ "output": ["text", "image"]
677
+ },
678
+ "limit": {
679
+ "context": 0,
680
+ "output": 0
681
+ },
682
+ "release_date": "2025-09-26"
683
+ },
684
+ "gpt-5.4-mini": {
685
+ "id": "gpt-5.4-mini",
686
+ "name": "GPT-5.4 mini",
687
+ "family": "gpt-mini",
688
+ "reasoning": true,
689
+ "reasoning_options": [{
690
+ "type": "effort",
691
+ "values": [
692
+ "none",
693
+ "low",
694
+ "medium",
695
+ "high",
696
+ "xhigh"
697
+ ]
698
+ }],
699
+ "temperature": true,
700
+ "tool_call": true,
701
+ "attachment": true,
702
+ "modalities": {
703
+ "input": ["text", "image"],
704
+ "output": ["text"]
705
+ },
706
+ "limit": {
707
+ "context": 4e5,
708
+ "output": 128e3
709
+ },
710
+ "release_date": "2026-03-17"
711
+ },
712
+ "gpt-image-2": {
713
+ "id": "gpt-image-2",
714
+ "name": "gpt-image-2",
715
+ "family": "gpt-image",
716
+ "reasoning": false,
717
+ "temperature": false,
718
+ "tool_call": false,
719
+ "attachment": true,
720
+ "modalities": {
721
+ "input": ["text", "image"],
722
+ "output": ["image"]
723
+ },
724
+ "limit": {
725
+ "context": 0,
726
+ "output": 0
727
+ },
728
+ "release_date": "2026-04-21"
729
+ },
730
+ "gpt-3.5-turbo": {
731
+ "id": "gpt-3.5-turbo",
732
+ "name": "GPT-3.5-turbo",
733
+ "family": "gpt",
734
+ "reasoning": false,
735
+ "temperature": true,
736
+ "tool_call": false,
737
+ "attachment": false,
738
+ "modalities": {
739
+ "input": ["text"],
740
+ "output": ["text"]
741
+ },
742
+ "limit": {
743
+ "context": 16385,
744
+ "output": 4096
745
+ },
746
+ "release_date": "2023-03-01"
747
+ },
748
+ "gpt-5.6": {
749
+ "id": "gpt-5.6",
750
+ "name": "GPT-5.6",
751
+ "family": "gpt-sol",
752
+ "reasoning": true,
753
+ "reasoning_options": [{
754
+ "type": "effort",
755
+ "values": [
756
+ "none",
757
+ "low",
758
+ "medium",
759
+ "high",
760
+ "xhigh",
761
+ "max"
762
+ ]
763
+ }],
764
+ "temperature": false,
765
+ "tool_call": true,
766
+ "attachment": true,
767
+ "modalities": {
768
+ "input": [
769
+ "text",
770
+ "image",
771
+ "pdf"
772
+ ],
773
+ "output": ["text"]
774
+ },
775
+ "limit": {
776
+ "context": 105e4,
777
+ "output": 128e3
778
+ },
779
+ "release_date": "2026-07-09"
780
+ },
781
+ "text-embedding-3-small": {
782
+ "id": "text-embedding-3-small",
783
+ "name": "text-embedding-3-small",
784
+ "family": "text-embedding",
785
+ "reasoning": false,
786
+ "temperature": false,
787
+ "tool_call": false,
788
+ "attachment": false,
789
+ "modalities": {
790
+ "input": ["text"],
791
+ "output": ["text"]
792
+ },
793
+ "limit": {
794
+ "context": 8191,
795
+ "output": 1536
796
+ },
797
+ "release_date": "2024-01-25"
798
+ },
799
+ "gpt-5-mini": {
800
+ "id": "gpt-5-mini",
801
+ "name": "GPT-5 Mini",
802
+ "family": "gpt-mini",
803
+ "reasoning": true,
804
+ "reasoning_options": [{
805
+ "type": "effort",
806
+ "values": [
807
+ "minimal",
808
+ "low",
809
+ "medium",
810
+ "high"
811
+ ]
812
+ }],
813
+ "temperature": false,
814
+ "tool_call": true,
815
+ "attachment": true,
816
+ "modalities": {
817
+ "input": ["text", "image"],
818
+ "output": ["text"]
819
+ },
820
+ "limit": {
821
+ "context": 4e5,
822
+ "output": 128e3
823
+ },
824
+ "release_date": "2025-08-07"
825
+ },
826
+ "gpt-5.4-pro": {
827
+ "id": "gpt-5.4-pro",
828
+ "name": "GPT-5.4 Pro",
829
+ "family": "gpt-pro",
830
+ "reasoning": true,
831
+ "reasoning_options": [{
832
+ "type": "effort",
833
+ "values": [
834
+ "medium",
835
+ "high",
836
+ "xhigh"
837
+ ]
838
+ }],
839
+ "temperature": false,
840
+ "tool_call": true,
841
+ "attachment": true,
842
+ "modalities": {
843
+ "input": ["text", "image"],
844
+ "output": ["text"]
845
+ },
846
+ "limit": {
847
+ "context": 105e4,
848
+ "output": 128e3
849
+ },
850
+ "release_date": "2026-03-05"
851
+ },
852
+ "text-embedding-3-large": {
853
+ "id": "text-embedding-3-large",
854
+ "name": "text-embedding-3-large",
855
+ "family": "text-embedding",
856
+ "reasoning": false,
857
+ "temperature": false,
858
+ "tool_call": false,
859
+ "attachment": false,
860
+ "modalities": {
861
+ "input": ["text"],
862
+ "output": ["text"]
863
+ },
864
+ "limit": {
865
+ "context": 8191,
866
+ "output": 3072
867
+ },
868
+ "release_date": "2024-01-25"
869
+ },
870
+ "gpt-5.6-terra": {
871
+ "id": "gpt-5.6-terra",
872
+ "name": "GPT-5.6 Terra",
873
+ "family": "gpt-terra",
874
+ "reasoning": true,
875
+ "reasoning_options": [{
876
+ "type": "effort",
877
+ "values": [
878
+ "none",
879
+ "low",
880
+ "medium",
881
+ "high",
882
+ "xhigh",
883
+ "max"
884
+ ]
885
+ }],
886
+ "temperature": false,
887
+ "tool_call": true,
888
+ "attachment": true,
889
+ "modalities": {
890
+ "input": [
891
+ "text",
892
+ "image",
893
+ "pdf"
894
+ ],
895
+ "output": ["text"]
896
+ },
897
+ "limit": {
898
+ "context": 105e4,
899
+ "output": 128e3
900
+ },
901
+ "release_date": "2026-07-09"
902
+ },
903
+ "gpt-4": {
904
+ "id": "gpt-4",
905
+ "name": "GPT-4",
906
+ "family": "gpt",
907
+ "reasoning": false,
908
+ "temperature": true,
909
+ "tool_call": true,
910
+ "attachment": true,
911
+ "modalities": {
912
+ "input": ["text"],
913
+ "output": ["text"]
914
+ },
915
+ "limit": {
916
+ "context": 8192,
917
+ "output": 8192
918
+ },
919
+ "release_date": "2023-11-06"
920
+ },
921
+ "gpt-5.2": {
922
+ "id": "gpt-5.2",
923
+ "name": "GPT-5.2",
924
+ "family": "gpt",
925
+ "reasoning": true,
926
+ "reasoning_options": [{
927
+ "type": "effort",
928
+ "values": [
929
+ "none",
930
+ "low",
931
+ "medium",
932
+ "high",
933
+ "xhigh"
934
+ ]
935
+ }],
936
+ "temperature": true,
937
+ "tool_call": true,
938
+ "attachment": true,
939
+ "modalities": {
940
+ "input": ["text", "image"],
941
+ "output": ["text"]
942
+ },
943
+ "limit": {
944
+ "context": 4e5,
945
+ "output": 128e3
946
+ },
947
+ "release_date": "2025-12-11"
948
+ },
949
+ "gpt-5": {
950
+ "id": "gpt-5",
951
+ "name": "GPT-5",
952
+ "family": "gpt",
953
+ "reasoning": true,
954
+ "reasoning_options": [{
955
+ "type": "effort",
956
+ "values": [
957
+ "minimal",
958
+ "low",
959
+ "medium",
960
+ "high"
961
+ ]
962
+ }],
963
+ "temperature": false,
964
+ "tool_call": true,
965
+ "attachment": true,
966
+ "modalities": {
967
+ "input": ["text", "image"],
968
+ "output": ["text"]
969
+ },
970
+ "limit": {
971
+ "context": 4e5,
972
+ "output": 128e3
973
+ },
974
+ "release_date": "2025-08-07"
975
+ },
976
+ "gpt-5.2-chat-latest": {
977
+ "id": "gpt-5.2-chat-latest",
978
+ "name": "GPT-5.2 Chat",
979
+ "family": "gpt-codex",
980
+ "reasoning": true,
981
+ "reasoning_options": [{
982
+ "type": "effort",
983
+ "values": ["medium"]
984
+ }],
985
+ "temperature": false,
986
+ "tool_call": true,
987
+ "attachment": true,
988
+ "modalities": {
989
+ "input": ["text", "image"],
990
+ "output": ["text"]
991
+ },
992
+ "limit": {
993
+ "context": 128e3,
994
+ "output": 16384
995
+ },
996
+ "release_date": "2025-12-11"
997
+ },
998
+ "o4-mini": {
999
+ "id": "o4-mini",
1000
+ "name": "o4-mini",
1001
+ "family": "o-mini",
1002
+ "reasoning": true,
1003
+ "reasoning_options": [{
1004
+ "type": "effort",
1005
+ "values": [
1006
+ "low",
1007
+ "medium",
1008
+ "high"
1009
+ ]
1010
+ }],
1011
+ "temperature": false,
1012
+ "tool_call": true,
1013
+ "attachment": true,
1014
+ "modalities": {
1015
+ "input": ["text", "image"],
1016
+ "output": ["text"]
1017
+ },
1018
+ "limit": {
1019
+ "context": 2e5,
1020
+ "output": 1e5
1021
+ },
1022
+ "release_date": "2025-04-16"
1023
+ },
1024
+ "gpt-realtime-2.1": {
1025
+ "id": "gpt-realtime-2.1",
1026
+ "name": "GPT-Realtime-2.1",
1027
+ "family": "gpt",
1028
+ "reasoning": true,
1029
+ "reasoning_options": [{
1030
+ "type": "effort",
1031
+ "values": [
1032
+ "minimal",
1033
+ "low",
1034
+ "medium",
1035
+ "high",
1036
+ "xhigh"
1037
+ ]
1038
+ }],
1039
+ "temperature": false,
1040
+ "tool_call": true,
1041
+ "attachment": true,
1042
+ "modalities": {
1043
+ "input": [
1044
+ "text",
1045
+ "audio",
1046
+ "image"
1047
+ ],
1048
+ "output": ["text", "audio"]
1049
+ },
1050
+ "limit": {
1051
+ "context": 128e3,
1052
+ "output": 32e3
1053
+ },
1054
+ "release_date": "2026-07-06"
1055
+ },
1056
+ "o3-mini": {
1057
+ "id": "o3-mini",
1058
+ "name": "o3-mini",
1059
+ "family": "o-mini",
1060
+ "reasoning": true,
1061
+ "reasoning_options": [{
1062
+ "type": "effort",
1063
+ "values": [
1064
+ "low",
1065
+ "medium",
1066
+ "high"
1067
+ ]
1068
+ }],
1069
+ "temperature": false,
1070
+ "tool_call": true,
1071
+ "attachment": false,
1072
+ "modalities": {
1073
+ "input": ["text"],
1074
+ "output": ["text"]
1075
+ },
1076
+ "limit": {
1077
+ "context": 2e5,
1078
+ "output": 1e5
1079
+ },
1080
+ "release_date": "2024-12-20"
1081
+ },
1082
+ "o3": {
1083
+ "id": "o3",
1084
+ "name": "o3",
1085
+ "family": "o",
1086
+ "reasoning": true,
1087
+ "reasoning_options": [{
1088
+ "type": "effort",
1089
+ "values": [
1090
+ "low",
1091
+ "medium",
1092
+ "high"
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": 2e5,
1108
+ "output": 1e5
1109
+ },
1110
+ "release_date": "2025-04-16"
1111
+ },
1112
+ "o3-pro": {
1113
+ "id": "o3-pro",
1114
+ "name": "o3-pro",
1115
+ "family": "o-pro",
1116
+ "reasoning": true,
1117
+ "reasoning_options": [{
1118
+ "type": "effort",
1119
+ "values": [
1120
+ "low",
1121
+ "medium",
1122
+ "high"
1123
+ ]
1124
+ }],
1125
+ "temperature": false,
1126
+ "tool_call": true,
1127
+ "attachment": true,
1128
+ "modalities": {
1129
+ "input": ["text", "image"],
1130
+ "output": ["text"]
1131
+ },
1132
+ "limit": {
1133
+ "context": 2e5,
1134
+ "output": 1e5
1135
+ },
1136
+ "release_date": "2025-06-10"
1137
+ },
1138
+ "gpt-5.3-chat-latest": {
1139
+ "id": "gpt-5.3-chat-latest",
1140
+ "name": "GPT-5.3 Chat (latest)",
1141
+ "family": "gpt",
1142
+ "reasoning": false,
1143
+ "temperature": true,
1144
+ "tool_call": true,
1145
+ "attachment": true,
1146
+ "modalities": {
1147
+ "input": ["text", "image"],
1148
+ "output": ["text"]
1149
+ },
1150
+ "limit": {
1151
+ "context": 128e3,
1152
+ "output": 16384
1153
+ },
1154
+ "release_date": "2026-03-03"
1155
+ },
1156
+ "gpt-5.5": {
1157
+ "id": "gpt-5.5",
1158
+ "name": "GPT-5.5",
1159
+ "family": "gpt",
1160
+ "reasoning": true,
1161
+ "reasoning_options": [{
1162
+ "type": "effort",
1163
+ "values": [
1164
+ "none",
1165
+ "low",
1166
+ "medium",
1167
+ "high",
1168
+ "xhigh"
1169
+ ]
1170
+ }],
1171
+ "temperature": false,
1172
+ "tool_call": true,
1173
+ "attachment": true,
1174
+ "modalities": {
1175
+ "input": [
1176
+ "text",
1177
+ "image",
1178
+ "pdf"
1179
+ ],
1180
+ "output": ["text"]
1181
+ },
1182
+ "limit": {
1183
+ "context": 105e4,
1184
+ "output": 128e3
1185
+ },
1186
+ "release_date": "2026-04-23"
1187
+ },
1188
+ "gpt-4o-2024-11-20": {
1189
+ "id": "gpt-4o-2024-11-20",
1190
+ "name": "GPT-4o (2024-11-20)",
1191
+ "family": "gpt",
1192
+ "reasoning": false,
1193
+ "temperature": true,
1194
+ "tool_call": true,
1195
+ "attachment": true,
1196
+ "modalities": {
1197
+ "input": ["text", "image"],
1198
+ "output": ["text"]
1199
+ },
1200
+ "limit": {
1201
+ "context": 128e3,
1202
+ "output": 16384
1203
+ },
1204
+ "release_date": "2024-11-20"
1205
+ }
1206
+ } },
1207
+ snapshotAt: Date.parse("2026-09-17")
1208
+ };
1209
+ //#endregion
1210
+ //#region src/routing.ts
1211
+ /** Maps only declared official roots; protocol implementations own the remaining resource URI. */
1212
+ function connectionConfig(endpoint, protocolId, config, aliases = []) {
1213
+ const defaults = Object.values(endpoint.capabilities).find((one) => one.protocolIds.includes(protocolId))?.protocolDefaults?.[protocolId] ?? {};
1214
+ const configured = config.baseUrl;
1215
+ const canonical = [
1216
+ endpoint.defaults?.baseUrl,
1217
+ ...Object.values(endpoint.capabilities).flatMap((one) => Object.values(one.protocolDefaults ?? {}).map((value) => value.baseUrl)),
1218
+ ...aliases
1219
+ ].filter((value) => typeof value === "string");
1220
+ const isOfficial = configured === void 0 || typeof configured === "string" && canonical.some((value) => value.replace(/\/+$/, "") === configured.replace(/\/+$/, ""));
1221
+ const selected = defaults.baseUrl ?? endpoint.defaults?.baseUrl;
1222
+ return {
1223
+ ...endpoint.defaults,
1224
+ ...defaults,
1225
+ ...config,
1226
+ ...isOfficial && selected !== void 0 ? { baseUrl: selected } : {}
1227
+ };
1228
+ }
1229
+ //#endregion
1230
+ //#region src/type.ts
1231
+ /** Stable supplier registration identity. */
1232
+ const TYPE = "openai";
1233
+ const endpoints = [{
1234
+ id: "openai",
1235
+ label: "OpenAI",
1236
+ capabilities: {
1237
+ chat: {
1238
+ protocolIds: ["openai", "openai-responses"],
1239
+ defaultProtocolId: "openai-responses"
1240
+ },
1241
+ image: {
1242
+ protocolIds: ["openai-images"],
1243
+ defaultProtocolId: "openai-images"
1244
+ }
1245
+ },
1246
+ defaults: { baseUrl: "https://api.openai.com/v1" },
1247
+ credentialGroup: "openai"
1248
+ }];
1249
+ const protocolOptions = { openai: {
1250
+ outputLimitField: "max_completion_tokens",
1251
+ promptCacheKey: true
1252
+ } };
1253
+ /** Builds this supplier's declaration without network activity or protocol imports. */
1254
+ function openaiProviderType(support) {
1255
+ return {
1256
+ type: TYPE,
1257
+ label: "OpenAI",
1258
+ fields: [{
1259
+ key: "apiKey",
1260
+ kind: "secret",
1261
+ label: "API Key",
1262
+ required: true
1263
+ }],
1264
+ endpoints,
1265
+ catalog: support ? {
1266
+ ...catalog,
1267
+ source: support.catalogueSource("https://models.dev/api.json", "models")
1268
+ } : catalog,
1269
+ prepareConnection(input) {
1270
+ const endpoint = endpoints.find((one) => one.id === input.endpointId);
1271
+ if (!endpoint || !Object.values(endpoint.capabilities).some((one) => one.protocolIds.includes(input.protocolId))) throw new Error("unsupported supplier endpoint or protocol");
1272
+ return {
1273
+ config: connectionConfig(endpoint, input.protocolId, input.config),
1274
+ options: input.protocolId === "openai" ? protocolOptions[endpoint.id] ?? {} : {}
1275
+ };
1276
+ }
1277
+ };
1278
+ }
1279
+ //#endregion
1280
+ //#region src/index.ts
1281
+ /** Supplier extensions contribute no tools. */
1282
+ const TOOL_NAMES = [];
1283
+ const plugin = {
1284
+ name: "@eum-agent/llm-provider-openai",
1285
+ requires: ["model-catalogue-sources"],
1286
+ apply(ctx) {
1287
+ const support = ctx.services.get("model-catalogue-sources");
1288
+ ctx.modelProviders.register(openaiProviderType(support));
1289
+ }
1290
+ };
1291
+ //#endregion
1292
+ export { TOOL_NAMES, plugin as default };
package/package.json CHANGED
@@ -1,6 +1,38 @@
1
1
  {
2
2
  "name": "@eum-agent/llm-provider-openai",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "displayName": {
4
+ "en-US": "OpenAI Model Connection",
5
+ "zh-CN": "模型接入 · OpenAI"
6
+ },
7
+ "version": "1.1.0",
8
+ "type": "module",
9
+ "description": "OpenAI model provider and catalogue",
10
+ "license": "MIT",
11
+ "exports": {
12
+ ".": {
13
+ "default": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "assets"
19
+ ],
20
+ "devDependencies": {
21
+ "@eum-agent/plugin": "1.1.0"
22
+ },
23
+ "yaoguang": {
24
+ "description": {
25
+ "en-US": "OpenAI model provider and catalogue",
26
+ "zh-CN": "OpenAI 品牌供应商与模型目录"
27
+ },
28
+ "dependencies": {
29
+ "@eum-agent/llm-management": "1.1.0"
30
+ },
31
+ "kind": "extension"
32
+ },
33
+ "scripts": {
34
+ "build": "tsdown",
35
+ "test": "vitest run",
36
+ "typecheck": "tsc --noEmit"
37
+ }
6
38
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.