@ai-sdk/openai 3.0.86 → 3.0.87

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": "3.0.86",
3
+ "version": "3.0.87",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -482,12 +482,16 @@ export async function convertToOpenAIResponsesInput({
482
482
  );
483
483
 
484
484
  if (resolvedResultToolName === 'tool_search') {
485
- const itemId =
485
+ const itemId = (part.providerOptions?.[providerOptionsName]
486
+ ?.itemId ??
486
487
  (
487
- part.providerOptions?.[providerOptionsName] as
488
- | { itemId?: string }
489
- | undefined
490
- )?.itemId ?? part.toolCallId;
488
+ part as {
489
+ providerMetadata?: {
490
+ [providerOptionsName]?: { itemId?: string };
491
+ };
492
+ }
493
+ ).providerMetadata?.[providerOptionsName]?.itemId ??
494
+ part.toolCallId) as string;
491
495
 
492
496
  if (store) {
493
497
  input.push({ type: 'item_reference', id: itemId });