@ai-sdk/openai 3.0.93 → 3.0.94
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 +8 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +2 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +2 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/responses/convert-to-openai-responses-input.ts +12 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/openai",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.94",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@ai-sdk/provider": "3.0.15",
|
|
40
|
-
"@ai-sdk/provider-utils": "4.0.
|
|
40
|
+
"@ai-sdk/provider-utils": "4.0.45"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "20.17.24",
|
|
@@ -348,9 +348,20 @@ export async function convertToOpenAIResponsesInput({
|
|
|
348
348
|
break;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
const isProviderDefinedToolCall =
|
|
352
|
+
(hasLocalShellTool && resolvedToolName === 'local_shell') ||
|
|
353
|
+
(hasShellTool && resolvedToolName === 'shell') ||
|
|
354
|
+
(hasApplyPatchTool && resolvedToolName === 'apply_patch') ||
|
|
355
|
+
(customProviderToolNames?.has(resolvedToolName) ?? false);
|
|
356
|
+
|
|
351
357
|
// When chaining with a previous response id, items already part
|
|
352
358
|
// of that response chain must not be resent.
|
|
353
|
-
if (
|
|
359
|
+
if (
|
|
360
|
+
hasPreviousResponseId &&
|
|
361
|
+
store &&
|
|
362
|
+
id != null &&
|
|
363
|
+
isProviderDefinedToolCall
|
|
364
|
+
) {
|
|
354
365
|
break;
|
|
355
366
|
}
|
|
356
367
|
|
|
@@ -364,12 +375,6 @@ export async function convertToOpenAIResponsesInput({
|
|
|
364
375
|
// makes follow-up requests fail with "No tool call found for
|
|
365
376
|
// function call output with call_id", most visibly with parallel
|
|
366
377
|
// tool calls across multiple steps.
|
|
367
|
-
const isProviderDefinedToolCall =
|
|
368
|
-
(hasLocalShellTool && resolvedToolName === 'local_shell') ||
|
|
369
|
-
(hasShellTool && resolvedToolName === 'shell') ||
|
|
370
|
-
(hasApplyPatchTool && resolvedToolName === 'apply_patch') ||
|
|
371
|
-
(customProviderToolNames?.has(resolvedToolName) ?? false);
|
|
372
|
-
|
|
373
378
|
if (store && id != null && isProviderDefinedToolCall) {
|
|
374
379
|
input.push({ type: 'item_reference', id });
|
|
375
380
|
break;
|