@ai-sdk/openai 4.0.17 → 4.0.18
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
|
@@ -581,12 +581,16 @@ export async function convertToOpenAIResponsesInput({
|
|
|
581
581
|
);
|
|
582
582
|
|
|
583
583
|
if (resolvedResultToolName === 'tool_search') {
|
|
584
|
-
const itemId =
|
|
584
|
+
const itemId = (part.providerOptions?.[providerOptionsName]
|
|
585
|
+
?.itemId ??
|
|
585
586
|
(
|
|
586
|
-
part
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
587
|
+
part as {
|
|
588
|
+
providerMetadata?: {
|
|
589
|
+
[providerOptionsName]?: { itemId?: string };
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
).providerMetadata?.[providerOptionsName]?.itemId ??
|
|
593
|
+
part.toolCallId) as string;
|
|
590
594
|
|
|
591
595
|
if (store) {
|
|
592
596
|
input.push({ type: 'item_reference', id: itemId });
|