@ai-sdk/openai 1.3.4 → 1.3.5
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 +8 -0
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -1
- package/dist/index.mjs.map +1 -1
- package/internal/dist/index.js +11 -1
- package/internal/dist/index.js.map +1 -1
- package/internal/dist/index.mjs +11 -1
- package/internal/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1798,7 +1798,16 @@ function prepareResponsesTools({
|
|
|
1798
1798
|
case "none":
|
|
1799
1799
|
case "required":
|
|
1800
1800
|
return { tools: openaiTools2, tool_choice: type, toolWarnings };
|
|
1801
|
-
case "tool":
|
|
1801
|
+
case "tool": {
|
|
1802
|
+
if (toolChoice.toolName === "web_search_preview") {
|
|
1803
|
+
return {
|
|
1804
|
+
tools: openaiTools2,
|
|
1805
|
+
tool_choice: {
|
|
1806
|
+
type: "web_search_preview"
|
|
1807
|
+
},
|
|
1808
|
+
toolWarnings
|
|
1809
|
+
};
|
|
1810
|
+
}
|
|
1802
1811
|
return {
|
|
1803
1812
|
tools: openaiTools2,
|
|
1804
1813
|
tool_choice: {
|
|
@@ -1807,6 +1816,7 @@ function prepareResponsesTools({
|
|
|
1807
1816
|
},
|
|
1808
1817
|
toolWarnings
|
|
1809
1818
|
};
|
|
1819
|
+
}
|
|
1810
1820
|
default: {
|
|
1811
1821
|
const _exhaustiveCheck = type;
|
|
1812
1822
|
throw new import_provider8.UnsupportedFunctionalityError({
|