@ai-sdk/openai 3.0.125 → 3.0.126
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 +6 -0
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +11 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/responses/openai-responses-language-model.ts +15 -1
package/package.json
CHANGED
|
@@ -1404,6 +1404,14 @@ export class OpenAIResponsesLanguageModel implements LanguageModelV3 {
|
|
|
1404
1404
|
id: value.item.call_id,
|
|
1405
1405
|
toolName,
|
|
1406
1406
|
});
|
|
1407
|
+
|
|
1408
|
+
// Custom tool input is a string, so stream its JSON encoding
|
|
1409
|
+
// consistently with the final tool call input.
|
|
1410
|
+
controller.enqueue({
|
|
1411
|
+
type: 'tool-input-delta',
|
|
1412
|
+
id: value.item.call_id,
|
|
1413
|
+
delta: '"',
|
|
1414
|
+
});
|
|
1407
1415
|
} else if (value.item.type === 'web_search_call') {
|
|
1408
1416
|
ongoingToolCalls[value.output_index] = {
|
|
1409
1417
|
toolName: toolNameMapping.toCustomToolName(
|
|
@@ -1739,6 +1747,12 @@ export class OpenAIResponsesLanguageModel implements LanguageModelV3 {
|
|
|
1739
1747
|
value.item.name,
|
|
1740
1748
|
);
|
|
1741
1749
|
|
|
1750
|
+
controller.enqueue({
|
|
1751
|
+
type: 'tool-input-delta',
|
|
1752
|
+
id: value.item.call_id,
|
|
1753
|
+
delta: '"',
|
|
1754
|
+
});
|
|
1755
|
+
|
|
1742
1756
|
controller.enqueue({
|
|
1743
1757
|
type: 'tool-input-end',
|
|
1744
1758
|
id: value.item.call_id,
|
|
@@ -2151,7 +2165,7 @@ export class OpenAIResponsesLanguageModel implements LanguageModelV3 {
|
|
|
2151
2165
|
controller.enqueue({
|
|
2152
2166
|
type: 'tool-input-delta',
|
|
2153
2167
|
id: toolCall.toolCallId,
|
|
2154
|
-
delta: value.delta,
|
|
2168
|
+
delta: escapeJSONDelta(value.delta),
|
|
2155
2169
|
});
|
|
2156
2170
|
}
|
|
2157
2171
|
} else if (isResponseApplyPatchCallOperationDiffDeltaChunk(value)) {
|