@ai-sdk/openai 4.0.37 → 4.0.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai",
3
- "version": "4.0.37",
3
+ "version": "4.0.39",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -36,15 +36,15 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@ai-sdk/provider": "4.0.7",
39
- "@ai-sdk/provider-utils": "5.0.26"
39
+ "@ai-sdk/provider-utils": "5.0.27"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "22.19.19",
43
43
  "tsup": "^8.5.1",
44
44
  "typescript": "5.8.3",
45
45
  "zod": "3.25.76",
46
- "@ai-sdk/test-server": "2.0.1",
47
- "@vercel/ai-tsconfig": "0.0.0"
46
+ "@vercel/ai-tsconfig": "0.0.0",
47
+ "@ai-sdk/test-server": "2.0.1"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "zod": "^3.25.76 || ^4.1.8"
@@ -443,9 +443,21 @@ export async function convertToOpenAIResponsesInput({
443
443
  break;
444
444
  }
445
445
 
446
+ const isProviderDefinedToolCall =
447
+ (hasLocalShellTool && resolvedToolName === 'local_shell') ||
448
+ (hasShellTool && resolvedToolName === 'shell') ||
449
+ (hasApplyPatchTool && resolvedToolName === 'apply_patch') ||
450
+ (hasComputerTool && resolvedToolName === 'computer') ||
451
+ (customProviderToolNames?.has(resolvedToolName) ?? false);
452
+
446
453
  // When chaining with a previous response id, items already part
447
454
  // of that response chain must not be resent.
448
- if (hasPreviousResponseId && store && id != null) {
455
+ if (
456
+ hasPreviousResponseId &&
457
+ store &&
458
+ id != null &&
459
+ isProviderDefinedToolCall
460
+ ) {
449
461
  break;
450
462
  }
451
463
 
@@ -459,13 +471,6 @@ export async function convertToOpenAIResponsesInput({
459
471
  // makes follow-up requests fail with "No tool call found for
460
472
  // function call output with call_id", most visibly with parallel
461
473
  // tool calls across multiple steps.
462
- const isProviderDefinedToolCall =
463
- (hasLocalShellTool && resolvedToolName === 'local_shell') ||
464
- (hasShellTool && resolvedToolName === 'shell') ||
465
- (hasApplyPatchTool && resolvedToolName === 'apply_patch') ||
466
- (hasComputerTool && resolvedToolName === 'computer') ||
467
- (customProviderToolNames?.has(resolvedToolName) ?? false);
468
-
469
474
  if (store && id != null && isProviderDefinedToolCall) {
470
475
  input.push({ type: 'item_reference', id });
471
476
  break;