@ai-sdk/openai
Advanced tools
+3
-3
| { | ||
| "name": "@ai-sdk/openai", | ||
| "version": "3.0.72", | ||
| "version": "3.0.73", | ||
| "license": "Apache-2.0", | ||
@@ -39,4 +39,4 @@ "sideEffects": false, | ||
| "dependencies": { | ||
| "@ai-sdk/provider-utils": "4.0.30", | ||
| "@ai-sdk/provider": "3.0.10" | ||
| "@ai-sdk/provider": "3.0.10", | ||
| "@ai-sdk/provider-utils": "4.0.30" | ||
| }, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
@@ -284,6 +284,25 @@ import { | ||
| if (store && id != null) { | ||
| if (hasPreviousResponseId) { | ||
| break; | ||
| } | ||
| // When chaining with a previous response id, items already part | ||
| // of that response chain must not be resent. | ||
| if (hasPreviousResponseId && store && id != null) { | ||
| break; | ||
| } | ||
| // Provider-defined tool calls (local_shell, shell, apply_patch, | ||
| // and custom tools) are stored by the API and can be sent as an | ||
| // `item_reference` to reduce payload size. Plain client-executed | ||
| // function calls must NOT be: the matching `function_call_output` | ||
| // can only reference the call by `call_id` (`call_...`), which | ||
| // the API cannot reconcile with an item id (`fc_...`) or an | ||
| // `item_reference`. Sending either breaks call/output pairing and | ||
| // makes follow-up requests fail with "No tool call found for | ||
| // function call output with call_id", most visibly with parallel | ||
| // tool calls across multiple steps. | ||
| const isProviderDefinedToolCall = | ||
| (hasLocalShellTool && resolvedToolName === 'local_shell') || | ||
| (hasShellTool && resolvedToolName === 'shell') || | ||
| (hasApplyPatchTool && resolvedToolName === 'apply_patch') || | ||
| (customProviderToolNames?.has(resolvedToolName) ?? false); | ||
| if (store && id != null && isProviderDefinedToolCall) { | ||
| input.push({ type: 'item_reference', id }); | ||
@@ -370,3 +389,2 @@ break; | ||
| arguments: serializeToolCallArguments(part.input), | ||
| id, | ||
| ...(namespace != null && { namespace }), | ||
@@ -373,0 +391,0 @@ }); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
3704946
0.23%40153
0.05%