@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/dist/index.mjs
CHANGED
|
@@ -1819,7 +1819,16 @@ function prepareResponsesTools({
|
|
|
1819
1819
|
case "none":
|
|
1820
1820
|
case "required":
|
|
1821
1821
|
return { tools: openaiTools2, tool_choice: type, toolWarnings };
|
|
1822
|
-
case "tool":
|
|
1822
|
+
case "tool": {
|
|
1823
|
+
if (toolChoice.toolName === "web_search_preview") {
|
|
1824
|
+
return {
|
|
1825
|
+
tools: openaiTools2,
|
|
1826
|
+
tool_choice: {
|
|
1827
|
+
type: "web_search_preview"
|
|
1828
|
+
},
|
|
1829
|
+
toolWarnings
|
|
1830
|
+
};
|
|
1831
|
+
}
|
|
1823
1832
|
return {
|
|
1824
1833
|
tools: openaiTools2,
|
|
1825
1834
|
tool_choice: {
|
|
@@ -1828,6 +1837,7 @@ function prepareResponsesTools({
|
|
|
1828
1837
|
},
|
|
1829
1838
|
toolWarnings
|
|
1830
1839
|
};
|
|
1840
|
+
}
|
|
1831
1841
|
default: {
|
|
1832
1842
|
const _exhaustiveCheck = type;
|
|
1833
1843
|
throw new UnsupportedFunctionalityError7({
|