@ai-sdk/open-responses 0.0.0-6b196531-20260710185421
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/CHANGELOG.md +606 -0
- package/LICENSE +13 -0
- package/README.md +57 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +729 -0
- package/dist/index.js.map +1 -0
- package/docs/06-open-responses.mdx +238 -0
- package/package.json +76 -0
- package/src/index.ts +11 -0
- package/src/open-responses-provider.ts +100 -0
- package/src/responses/convert-to-open-responses-input.ts +253 -0
- package/src/responses/map-open-responses-finish-reason.ts +21 -0
- package/src/responses/open-responses-api.ts +1238 -0
- package/src/responses/open-responses-config.ts +10 -0
- package/src/responses/open-responses-language-model-options.ts +22 -0
- package/src/responses/open-responses-language-model.ts +557 -0
- package/src/version.ts +6 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,606 @@
|
|
|
1
|
+
# @ai-sdk/open-responses
|
|
2
|
+
|
|
3
|
+
## 0.0.0-6b196531-20260710185421
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [036463b]
|
|
8
|
+
- Updated dependencies [9988975]
|
|
9
|
+
- @ai-sdk/provider-utils@0.0.0-6b196531-20260710185421
|
|
10
|
+
|
|
11
|
+
## 2.0.7
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [0f93c57]
|
|
16
|
+
- @ai-sdk/provider@4.0.3
|
|
17
|
+
- @ai-sdk/provider-utils@5.0.7
|
|
18
|
+
|
|
19
|
+
## 2.0.6
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [ac306ed]
|
|
24
|
+
- @ai-sdk/provider-utils@5.0.6
|
|
25
|
+
|
|
26
|
+
## 2.0.5
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 5c5c0f5: Add experimental streaming transcription support for transcription models, including OpenAI `gpt-realtime-whisper` and xAI WebSocket STT.
|
|
31
|
+
- Updated dependencies [5c5c0f5]
|
|
32
|
+
- @ai-sdk/provider@4.0.2
|
|
33
|
+
- @ai-sdk/provider-utils@5.0.5
|
|
34
|
+
|
|
35
|
+
## 2.0.4
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [c6f5e62]
|
|
40
|
+
- @ai-sdk/provider-utils@5.0.4
|
|
41
|
+
|
|
42
|
+
## 2.0.3
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [8c616f0]
|
|
47
|
+
- @ai-sdk/provider-utils@5.0.3
|
|
48
|
+
|
|
49
|
+
## 2.0.2
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies [0274f34]
|
|
54
|
+
- @ai-sdk/provider@4.0.1
|
|
55
|
+
- @ai-sdk/provider-utils@5.0.2
|
|
56
|
+
|
|
57
|
+
## 2.0.1
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies [6a436e3]
|
|
62
|
+
- @ai-sdk/provider-utils@5.0.1
|
|
63
|
+
|
|
64
|
+
## 2.0.0
|
|
65
|
+
|
|
66
|
+
### Major Changes
|
|
67
|
+
|
|
68
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
69
|
+
- c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
|
|
70
|
+
- 8359612: Start v7 pre-release
|
|
71
|
+
- 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
|
|
72
|
+
|
|
73
|
+
For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- 74d520f: feat: migrate providers to support new top-level `reasoning` parameter
|
|
78
|
+
- 9f0e36c: trigger release for all packages after provenance setup
|
|
79
|
+
- 58a2ad7: fix: more precise default message for tool execution denial
|
|
80
|
+
- fb82a6c: Harden streamed tool call argument handling against prototype pollution.
|
|
81
|
+
- 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
|
|
82
|
+
- 0c4c275: trigger initial canary release
|
|
83
|
+
- 8831e80: chore(provider/open-responses): update provider to use v4 types
|
|
84
|
+
- 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
|
|
85
|
+
- 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
|
|
86
|
+
- e69a836: feat(open-responses): add option to pass reasoning summary for OpenResponses
|
|
87
|
+
- 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
|
|
88
|
+
- b8396f0: trigger initial beta release
|
|
89
|
+
- 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
|
|
90
|
+
- 52d2e30: fix(open-responses): map non-image file parts to input_file
|
|
91
|
+
- b3976a2: Add workflow serialization support to all provider models.
|
|
92
|
+
|
|
93
|
+
**`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
|
|
94
|
+
|
|
95
|
+
**All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
|
|
96
|
+
|
|
97
|
+
All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
|
|
98
|
+
|
|
99
|
+
- ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
|
|
100
|
+
|
|
101
|
+
## 2.0.0-beta.55
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- Updated dependencies [0416e3e]
|
|
106
|
+
- @ai-sdk/provider@4.0.0-beta.20
|
|
107
|
+
- @ai-sdk/provider-utils@5.0.0-beta.50
|
|
108
|
+
|
|
109
|
+
## 2.0.0-beta.54
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- b8396f0: trigger initial beta release
|
|
114
|
+
- Updated dependencies [b8396f0]
|
|
115
|
+
- @ai-sdk/provider-utils@5.0.0-beta.49
|
|
116
|
+
- @ai-sdk/provider@4.0.0-beta.19
|
|
117
|
+
|
|
118
|
+
## 2.0.0-canary.53
|
|
119
|
+
|
|
120
|
+
### Patch Changes
|
|
121
|
+
|
|
122
|
+
- Updated dependencies [aeda373]
|
|
123
|
+
- Updated dependencies [375fdd7]
|
|
124
|
+
- Updated dependencies [b4507d5]
|
|
125
|
+
- @ai-sdk/provider-utils@5.0.0-canary.48
|
|
126
|
+
|
|
127
|
+
## 2.0.0-canary.52
|
|
128
|
+
|
|
129
|
+
### Patch Changes
|
|
130
|
+
|
|
131
|
+
- fb82a6c: Harden streamed tool call argument handling against prototype pollution.
|
|
132
|
+
|
|
133
|
+
## 2.0.0-canary.51
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- Updated dependencies [bae5e2b]
|
|
138
|
+
- @ai-sdk/provider-utils@5.0.0-canary.47
|
|
139
|
+
|
|
140
|
+
## 2.0.0-canary.50
|
|
141
|
+
|
|
142
|
+
### Patch Changes
|
|
143
|
+
|
|
144
|
+
- Updated dependencies [ce769dd]
|
|
145
|
+
- @ai-sdk/provider@4.0.0-canary.18
|
|
146
|
+
- @ai-sdk/provider-utils@5.0.0-canary.46
|
|
147
|
+
|
|
148
|
+
## 2.0.0-canary.49
|
|
149
|
+
|
|
150
|
+
### Patch Changes
|
|
151
|
+
|
|
152
|
+
- Updated dependencies [ee798eb]
|
|
153
|
+
- Updated dependencies [daf6637]
|
|
154
|
+
- @ai-sdk/provider-utils@5.0.0-canary.45
|
|
155
|
+
|
|
156
|
+
## 2.0.0-canary.48
|
|
157
|
+
|
|
158
|
+
### Patch Changes
|
|
159
|
+
|
|
160
|
+
- Updated dependencies [6c93e36]
|
|
161
|
+
- Updated dependencies [f617ac2]
|
|
162
|
+
- @ai-sdk/provider-utils@5.0.0-canary.44
|
|
163
|
+
|
|
164
|
+
## 2.0.0-canary.47
|
|
165
|
+
|
|
166
|
+
### Patch Changes
|
|
167
|
+
|
|
168
|
+
- 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
|
|
169
|
+
- Updated dependencies [7fc6bd6]
|
|
170
|
+
- @ai-sdk/provider-utils@5.0.0-canary.43
|
|
171
|
+
- @ai-sdk/provider@4.0.0-canary.17
|
|
172
|
+
|
|
173
|
+
## 2.0.0-canary.46
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- Updated dependencies [a6617c5]
|
|
178
|
+
- @ai-sdk/provider-utils@5.0.0-canary.42
|
|
179
|
+
|
|
180
|
+
## 2.0.0-canary.45
|
|
181
|
+
|
|
182
|
+
### Patch Changes
|
|
183
|
+
|
|
184
|
+
- Updated dependencies [28dfa06]
|
|
185
|
+
- Updated dependencies [e93fa91]
|
|
186
|
+
- @ai-sdk/provider-utils@5.0.0-canary.41
|
|
187
|
+
|
|
188
|
+
## 2.0.0-canary.44
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- Updated dependencies [a7de9c9]
|
|
193
|
+
- @ai-sdk/provider-utils@5.0.0-canary.40
|
|
194
|
+
|
|
195
|
+
## 2.0.0-canary.43
|
|
196
|
+
|
|
197
|
+
### Patch Changes
|
|
198
|
+
|
|
199
|
+
- Updated dependencies [105f95b]
|
|
200
|
+
- @ai-sdk/provider-utils@5.0.0-canary.39
|
|
201
|
+
|
|
202
|
+
## 2.0.0-canary.42
|
|
203
|
+
|
|
204
|
+
### Patch Changes
|
|
205
|
+
|
|
206
|
+
- 52d2e30: fix(open-responses): map non-image file parts to input_file
|
|
207
|
+
|
|
208
|
+
## 2.0.0-canary.41
|
|
209
|
+
|
|
210
|
+
### Patch Changes
|
|
211
|
+
|
|
212
|
+
- Updated dependencies [ca446f8]
|
|
213
|
+
- @ai-sdk/provider-utils@5.0.0-canary.38
|
|
214
|
+
|
|
215
|
+
## 2.0.0-canary.40
|
|
216
|
+
|
|
217
|
+
### Patch Changes
|
|
218
|
+
|
|
219
|
+
- Updated dependencies [d848405]
|
|
220
|
+
- @ai-sdk/provider-utils@5.0.0-canary.37
|
|
221
|
+
|
|
222
|
+
## 2.0.0-canary.39
|
|
223
|
+
|
|
224
|
+
### Patch Changes
|
|
225
|
+
|
|
226
|
+
- Updated dependencies [ca39020]
|
|
227
|
+
- @ai-sdk/provider-utils@5.0.0-canary.36
|
|
228
|
+
|
|
229
|
+
## 2.0.0-canary.38
|
|
230
|
+
|
|
231
|
+
### Patch Changes
|
|
232
|
+
|
|
233
|
+
- Updated dependencies [f634bac]
|
|
234
|
+
- @ai-sdk/provider-utils@5.0.0-canary.35
|
|
235
|
+
|
|
236
|
+
## 2.0.0-canary.37
|
|
237
|
+
|
|
238
|
+
### Patch Changes
|
|
239
|
+
|
|
240
|
+
- Updated dependencies [69254e0]
|
|
241
|
+
- Updated dependencies [3015fc3]
|
|
242
|
+
- @ai-sdk/provider-utils@5.0.0-canary.34
|
|
243
|
+
|
|
244
|
+
## 2.0.0-canary.36
|
|
245
|
+
|
|
246
|
+
### Patch Changes
|
|
247
|
+
|
|
248
|
+
- Updated dependencies [2427d88]
|
|
249
|
+
- @ai-sdk/provider-utils@5.0.0-canary.33
|
|
250
|
+
|
|
251
|
+
## 2.0.0-canary.35
|
|
252
|
+
|
|
253
|
+
### Patch Changes
|
|
254
|
+
|
|
255
|
+
- 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
|
|
256
|
+
- Updated dependencies [5463d0d]
|
|
257
|
+
- @ai-sdk/provider-utils@5.0.0-canary.32
|
|
258
|
+
- @ai-sdk/provider@4.0.0-canary.16
|
|
259
|
+
|
|
260
|
+
## 2.0.0-canary.34
|
|
261
|
+
|
|
262
|
+
### Patch Changes
|
|
263
|
+
|
|
264
|
+
- 0c4c275: trigger initial canary release
|
|
265
|
+
- Updated dependencies [0c4c275]
|
|
266
|
+
- @ai-sdk/provider-utils@5.0.0-canary.31
|
|
267
|
+
- @ai-sdk/provider@4.0.0-canary.15
|
|
268
|
+
|
|
269
|
+
## 2.0.0-beta.33
|
|
270
|
+
|
|
271
|
+
### Major Changes
|
|
272
|
+
|
|
273
|
+
- 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
|
|
274
|
+
|
|
275
|
+
For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
|
|
276
|
+
|
|
277
|
+
### Patch Changes
|
|
278
|
+
|
|
279
|
+
- Updated dependencies [08d2129]
|
|
280
|
+
- @ai-sdk/provider-utils@5.0.0-beta.30
|
|
281
|
+
|
|
282
|
+
## 2.0.0-beta.32
|
|
283
|
+
|
|
284
|
+
### Patch Changes
|
|
285
|
+
|
|
286
|
+
- 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
|
|
287
|
+
- 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
|
|
288
|
+
- Updated dependencies [9bd6512]
|
|
289
|
+
- Updated dependencies [258c093]
|
|
290
|
+
- Updated dependencies [b6783da]
|
|
291
|
+
- @ai-sdk/provider-utils@5.0.0-beta.29
|
|
292
|
+
- @ai-sdk/provider@4.0.0-beta.14
|
|
293
|
+
|
|
294
|
+
## 2.0.0-beta.31
|
|
295
|
+
|
|
296
|
+
### Patch Changes
|
|
297
|
+
|
|
298
|
+
- 9f0e36c: trigger release for all packages after provenance setup
|
|
299
|
+
- Updated dependencies [9f0e36c]
|
|
300
|
+
- @ai-sdk/provider@4.0.0-beta.13
|
|
301
|
+
- @ai-sdk/provider-utils@5.0.0-beta.28
|
|
302
|
+
|
|
303
|
+
## 2.0.0-beta.30
|
|
304
|
+
|
|
305
|
+
### Patch Changes
|
|
306
|
+
|
|
307
|
+
- 58a2ad7: fix: more precise default message for tool execution denial
|
|
308
|
+
- Updated dependencies [785fe16]
|
|
309
|
+
- Updated dependencies [67df0a0]
|
|
310
|
+
- Updated dependencies [befb78c]
|
|
311
|
+
- Updated dependencies [0458559]
|
|
312
|
+
- Updated dependencies [5852c0a]
|
|
313
|
+
- Updated dependencies [fc92055]
|
|
314
|
+
- @ai-sdk/provider-utils@5.0.0-beta.27
|
|
315
|
+
|
|
316
|
+
## 2.0.0-beta.29
|
|
317
|
+
|
|
318
|
+
### Patch Changes
|
|
319
|
+
|
|
320
|
+
- Updated dependencies [2e98477]
|
|
321
|
+
- @ai-sdk/provider-utils@5.0.0-beta.26
|
|
322
|
+
|
|
323
|
+
## 2.0.0-beta.28
|
|
324
|
+
|
|
325
|
+
### Patch Changes
|
|
326
|
+
|
|
327
|
+
- Updated dependencies [eea8d98]
|
|
328
|
+
- @ai-sdk/provider-utils@5.0.0-beta.25
|
|
329
|
+
|
|
330
|
+
## 2.0.0-beta.27
|
|
331
|
+
|
|
332
|
+
### Patch Changes
|
|
333
|
+
|
|
334
|
+
- Updated dependencies [f807e45]
|
|
335
|
+
- @ai-sdk/provider-utils@5.0.0-beta.24
|
|
336
|
+
|
|
337
|
+
## 2.0.0-beta.26
|
|
338
|
+
|
|
339
|
+
### Patch Changes
|
|
340
|
+
|
|
341
|
+
- Updated dependencies [350ea38]
|
|
342
|
+
- @ai-sdk/provider-utils@5.0.0-beta.23
|
|
343
|
+
|
|
344
|
+
## 2.0.0-beta.25
|
|
345
|
+
|
|
346
|
+
### Patch Changes
|
|
347
|
+
|
|
348
|
+
- Updated dependencies [083947b]
|
|
349
|
+
- @ai-sdk/provider-utils@5.0.0-beta.22
|
|
350
|
+
|
|
351
|
+
## 2.0.0-beta.24
|
|
352
|
+
|
|
353
|
+
### Patch Changes
|
|
354
|
+
|
|
355
|
+
- Updated dependencies [add1126]
|
|
356
|
+
- @ai-sdk/provider-utils@5.0.0-beta.21
|
|
357
|
+
|
|
358
|
+
## 2.0.0-beta.23
|
|
359
|
+
|
|
360
|
+
### Patch Changes
|
|
361
|
+
|
|
362
|
+
- b3976a2: Add workflow serialization support to all provider models.
|
|
363
|
+
|
|
364
|
+
**`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
|
|
365
|
+
|
|
366
|
+
**All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
|
|
367
|
+
|
|
368
|
+
All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
|
|
369
|
+
|
|
370
|
+
- ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
|
|
371
|
+
- Updated dependencies [b3976a2]
|
|
372
|
+
- Updated dependencies [ff5eba1]
|
|
373
|
+
- @ai-sdk/provider-utils@5.0.0-beta.20
|
|
374
|
+
- @ai-sdk/provider@4.0.0-beta.12
|
|
375
|
+
|
|
376
|
+
## 2.0.0-beta.22
|
|
377
|
+
|
|
378
|
+
### Major Changes
|
|
379
|
+
|
|
380
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
381
|
+
|
|
382
|
+
### Patch Changes
|
|
383
|
+
|
|
384
|
+
- Updated dependencies [ef992f8]
|
|
385
|
+
- @ai-sdk/provider@4.0.0-beta.11
|
|
386
|
+
- @ai-sdk/provider-utils@5.0.0-beta.19
|
|
387
|
+
|
|
388
|
+
## 2.0.0-beta.21
|
|
389
|
+
|
|
390
|
+
### Patch Changes
|
|
391
|
+
|
|
392
|
+
- 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
|
|
393
|
+
- Updated dependencies [90e2d8a]
|
|
394
|
+
- @ai-sdk/provider-utils@5.0.0-beta.18
|
|
395
|
+
|
|
396
|
+
## 2.0.0-beta.20
|
|
397
|
+
|
|
398
|
+
### Patch Changes
|
|
399
|
+
|
|
400
|
+
- Updated dependencies [3ae1786]
|
|
401
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
402
|
+
|
|
403
|
+
## 2.0.0-beta.19
|
|
404
|
+
|
|
405
|
+
### Patch Changes
|
|
406
|
+
|
|
407
|
+
- Updated dependencies [176466a]
|
|
408
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
409
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
410
|
+
|
|
411
|
+
## 2.0.0-beta.18
|
|
412
|
+
|
|
413
|
+
### Patch Changes
|
|
414
|
+
|
|
415
|
+
- Updated dependencies [e311194]
|
|
416
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
417
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
418
|
+
|
|
419
|
+
## 2.0.0-beta.17
|
|
420
|
+
|
|
421
|
+
### Patch Changes
|
|
422
|
+
|
|
423
|
+
- e69a836: feat(open-responses): add option to pass reasoning summary for OpenResponses
|
|
424
|
+
|
|
425
|
+
## 2.0.0-beta.16
|
|
426
|
+
|
|
427
|
+
### Patch Changes
|
|
428
|
+
|
|
429
|
+
- Updated dependencies [34bd95d]
|
|
430
|
+
- Updated dependencies [008271d]
|
|
431
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
432
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
433
|
+
|
|
434
|
+
## 2.0.0-beta.15
|
|
435
|
+
|
|
436
|
+
### Patch Changes
|
|
437
|
+
|
|
438
|
+
- Updated dependencies [b0c2869]
|
|
439
|
+
- Updated dependencies [7e26e81]
|
|
440
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
441
|
+
|
|
442
|
+
## 2.0.0-beta.14
|
|
443
|
+
|
|
444
|
+
### Patch Changes
|
|
445
|
+
|
|
446
|
+
- Updated dependencies [46d1149]
|
|
447
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
448
|
+
|
|
449
|
+
## 2.0.0-beta.13
|
|
450
|
+
|
|
451
|
+
### Patch Changes
|
|
452
|
+
|
|
453
|
+
- Updated dependencies [6fd51c0]
|
|
454
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
455
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
456
|
+
|
|
457
|
+
## 2.0.0-beta.12
|
|
458
|
+
|
|
459
|
+
### Patch Changes
|
|
460
|
+
|
|
461
|
+
- c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
|
|
462
|
+
- Updated dependencies [c29a26f]
|
|
463
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
464
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
465
|
+
|
|
466
|
+
## 2.0.0-beta.11
|
|
467
|
+
|
|
468
|
+
### Patch Changes
|
|
469
|
+
|
|
470
|
+
- Updated dependencies [2e17091]
|
|
471
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
472
|
+
|
|
473
|
+
## 2.0.0-beta.10
|
|
474
|
+
|
|
475
|
+
### Patch Changes
|
|
476
|
+
|
|
477
|
+
- Updated dependencies [986c6fd]
|
|
478
|
+
- Updated dependencies [493295c]
|
|
479
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
480
|
+
|
|
481
|
+
## 2.0.0-beta.9
|
|
482
|
+
|
|
483
|
+
### Patch Changes
|
|
484
|
+
|
|
485
|
+
- Updated dependencies [1f509d4]
|
|
486
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
487
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
488
|
+
|
|
489
|
+
## 2.0.0-beta.8
|
|
490
|
+
|
|
491
|
+
### Patch Changes
|
|
492
|
+
|
|
493
|
+
- 74d520f: feat: migrate providers to support new top-level `reasoning` parameter
|
|
494
|
+
|
|
495
|
+
## 2.0.0-beta.7
|
|
496
|
+
|
|
497
|
+
### Patch Changes
|
|
498
|
+
|
|
499
|
+
- Updated dependencies [3887c70]
|
|
500
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
501
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
502
|
+
|
|
503
|
+
## 2.0.0-beta.6
|
|
504
|
+
|
|
505
|
+
### Patch Changes
|
|
506
|
+
|
|
507
|
+
- Updated dependencies [776b617]
|
|
508
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
509
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
510
|
+
|
|
511
|
+
## 2.0.0-beta.5
|
|
512
|
+
|
|
513
|
+
### Patch Changes
|
|
514
|
+
|
|
515
|
+
- Updated dependencies [61753c3]
|
|
516
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
517
|
+
|
|
518
|
+
## 2.0.0-beta.4
|
|
519
|
+
|
|
520
|
+
### Patch Changes
|
|
521
|
+
|
|
522
|
+
- Updated dependencies [f7d4f01]
|
|
523
|
+
- @ai-sdk/provider-utils@5.0.0-beta.3
|
|
524
|
+
- @ai-sdk/provider@4.0.0-beta.2
|
|
525
|
+
|
|
526
|
+
## 2.0.0-beta.3
|
|
527
|
+
|
|
528
|
+
### Patch Changes
|
|
529
|
+
|
|
530
|
+
- Updated dependencies [5c2a5a2]
|
|
531
|
+
- @ai-sdk/provider@4.0.0-beta.1
|
|
532
|
+
- @ai-sdk/provider-utils@5.0.0-beta.2
|
|
533
|
+
|
|
534
|
+
## 2.0.0-beta.2
|
|
535
|
+
|
|
536
|
+
### Patch Changes
|
|
537
|
+
|
|
538
|
+
- 8831e80: chore(provider/open-responses): update provider to use v4 types
|
|
539
|
+
|
|
540
|
+
## 2.0.0-beta.1
|
|
541
|
+
|
|
542
|
+
### Patch Changes
|
|
543
|
+
|
|
544
|
+
- Updated dependencies [531251e]
|
|
545
|
+
- @ai-sdk/provider-utils@5.0.0-beta.1
|
|
546
|
+
|
|
547
|
+
## 2.0.0-beta.0
|
|
548
|
+
|
|
549
|
+
### Major Changes
|
|
550
|
+
|
|
551
|
+
- 8359612: Start v7 pre-release
|
|
552
|
+
|
|
553
|
+
### Patch Changes
|
|
554
|
+
|
|
555
|
+
- Updated dependencies [8359612]
|
|
556
|
+
- @ai-sdk/provider@4.0.0-beta.0
|
|
557
|
+
- @ai-sdk/provider-utils@5.0.0-beta.0
|
|
558
|
+
|
|
559
|
+
## 1.0.6
|
|
560
|
+
|
|
561
|
+
### Patch Changes
|
|
562
|
+
|
|
563
|
+
- Updated dependencies [ad4cfc2]
|
|
564
|
+
- @ai-sdk/provider-utils@4.0.19
|
|
565
|
+
|
|
566
|
+
## 1.0.5
|
|
567
|
+
|
|
568
|
+
### Patch Changes
|
|
569
|
+
|
|
570
|
+
- Updated dependencies [824b295]
|
|
571
|
+
- @ai-sdk/provider-utils@4.0.18
|
|
572
|
+
|
|
573
|
+
## 1.0.4
|
|
574
|
+
|
|
575
|
+
### Patch Changes
|
|
576
|
+
|
|
577
|
+
- Updated dependencies [08336f1]
|
|
578
|
+
- @ai-sdk/provider-utils@4.0.17
|
|
579
|
+
|
|
580
|
+
## 1.0.3
|
|
581
|
+
|
|
582
|
+
### Patch Changes
|
|
583
|
+
|
|
584
|
+
- Updated dependencies [58bc42d]
|
|
585
|
+
- @ai-sdk/provider-utils@4.0.16
|
|
586
|
+
|
|
587
|
+
## 1.0.2
|
|
588
|
+
|
|
589
|
+
### Patch Changes
|
|
590
|
+
|
|
591
|
+
- Updated dependencies [4024a3a]
|
|
592
|
+
- @ai-sdk/provider-utils@4.0.15
|
|
593
|
+
|
|
594
|
+
## 1.0.1
|
|
595
|
+
|
|
596
|
+
### Patch Changes
|
|
597
|
+
|
|
598
|
+
- Updated dependencies [7168375]
|
|
599
|
+
- @ai-sdk/provider@3.0.8
|
|
600
|
+
- @ai-sdk/provider-utils@4.0.14
|
|
601
|
+
|
|
602
|
+
## 1.0.0
|
|
603
|
+
|
|
604
|
+
### Major Changes
|
|
605
|
+
|
|
606
|
+
- 8a4f19d: feat(open-responses): add Open Responses provider
|
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2023 Vercel, Inc.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# AI SDK - Open Responses Provider
|
|
2
|
+
|
|
3
|
+
The **[Open Responses provider](https://ai-sdk.dev/providers/ai-sdk-providers/open-responses)** for the [AI SDK](https://ai-sdk.dev/docs)
|
|
4
|
+
contains language model support for [Open Responses](https://www.openresponses.org/) compatible APIs.
|
|
5
|
+
|
|
6
|
+
## Setup
|
|
7
|
+
|
|
8
|
+
The Open Responses provider is available in the `@ai-sdk/open-responses` module. You can install it with
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm i @ai-sdk/open-responses
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Skill for Coding Agents
|
|
15
|
+
|
|
16
|
+
If you use coding agents such as Claude Code or Cursor, we highly recommend adding the AI SDK skill to your repository:
|
|
17
|
+
|
|
18
|
+
```shell
|
|
19
|
+
npx skills add vercel/ai
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Provider Instance
|
|
23
|
+
|
|
24
|
+
Create an Open Responses provider instance using `createOpenResponses`:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { createOpenResponses } from '@ai-sdk/open-responses';
|
|
28
|
+
|
|
29
|
+
const openResponses = createOpenResponses({
|
|
30
|
+
name: 'aProvider',
|
|
31
|
+
url: 'http://localhost:1234/v1/responses',
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
You can use this instance to access models served by any Open Responses compatible endpoint.
|
|
36
|
+
|
|
37
|
+
## Example
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { createOpenResponses } from '@ai-sdk/open-responses';
|
|
41
|
+
import { generateText } from 'ai';
|
|
42
|
+
|
|
43
|
+
const openResponses = createOpenResponses({
|
|
44
|
+
name: 'aProvider',
|
|
45
|
+
url: 'http://localhost:1234/v1/responses',
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const { text } = await generateText({
|
|
49
|
+
model: openResponses('mistralai/ministral-3-14b-reasoning'),
|
|
50
|
+
prompt: 'Invent a new holiday and describe its traditions.',
|
|
51
|
+
maxOutputTokens: 100,
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Documentation
|
|
56
|
+
|
|
57
|
+
Please check out the **[Open Responses provider documentation](https://ai-sdk.dev/providers/ai-sdk-providers/open-responses)** for more information.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ProviderV4, LanguageModelV4 } from '@ai-sdk/provider';
|
|
2
|
+
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
3
|
+
import { FetchFunction, InferSchema } from '@ai-sdk/provider-utils';
|
|
4
|
+
|
|
5
|
+
declare const VERSION: string;
|
|
6
|
+
|
|
7
|
+
interface OpenResponsesProvider extends ProviderV4 {
|
|
8
|
+
(modelId: string): LanguageModelV4;
|
|
9
|
+
}
|
|
10
|
+
interface OpenResponsesProviderSettings {
|
|
11
|
+
/**
|
|
12
|
+
* URL for the Open Responses API POST endpoint.
|
|
13
|
+
*/
|
|
14
|
+
url: string;
|
|
15
|
+
/**
|
|
16
|
+
* Provider name. Used as key for provider options and metadata.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* API key for authenticating requests.
|
|
21
|
+
*/
|
|
22
|
+
apiKey?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Custom headers to include in the requests.
|
|
25
|
+
*/
|
|
26
|
+
headers?: Record<string, string>;
|
|
27
|
+
/**
|
|
28
|
+
* Custom fetch implementation. You can use it as a middleware to intercept requests,
|
|
29
|
+
* or to provide a custom fetch implementation for e.g. testing.
|
|
30
|
+
*/
|
|
31
|
+
fetch?: FetchFunction;
|
|
32
|
+
}
|
|
33
|
+
declare function createOpenResponses(options: OpenResponsesProviderSettings): OpenResponsesProvider;
|
|
34
|
+
|
|
35
|
+
declare const openResponsesLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
36
|
+
reasoningSummary?: "auto" | "concise" | "detailed" | null | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
type OpenResponsesLanguageModelOptions = InferSchema<typeof openResponsesLanguageModelOptions>;
|
|
39
|
+
|
|
40
|
+
export { type OpenResponsesLanguageModelOptions, type OpenResponsesLanguageModelOptions as OpenResponsesOptions, type OpenResponsesProvider, type OpenResponsesProviderSettings, VERSION, createOpenResponses };
|