@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/internal/dist/index.js
CHANGED
|
@@ -1799,7 +1799,16 @@ function prepareResponsesTools({
|
|
|
1799
1799
|
case "none":
|
|
1800
1800
|
case "required":
|
|
1801
1801
|
return { tools: openaiTools, tool_choice: type, toolWarnings };
|
|
1802
|
-
case "tool":
|
|
1802
|
+
case "tool": {
|
|
1803
|
+
if (toolChoice.toolName === "web_search_preview") {
|
|
1804
|
+
return {
|
|
1805
|
+
tools: openaiTools,
|
|
1806
|
+
tool_choice: {
|
|
1807
|
+
type: "web_search_preview"
|
|
1808
|
+
},
|
|
1809
|
+
toolWarnings
|
|
1810
|
+
};
|
|
1811
|
+
}
|
|
1803
1812
|
return {
|
|
1804
1813
|
tools: openaiTools,
|
|
1805
1814
|
tool_choice: {
|
|
@@ -1808,6 +1817,7 @@ function prepareResponsesTools({
|
|
|
1808
1817
|
},
|
|
1809
1818
|
toolWarnings
|
|
1810
1819
|
};
|
|
1820
|
+
}
|
|
1811
1821
|
default: {
|
|
1812
1822
|
const _exhaustiveCheck = type;
|
|
1813
1823
|
throw new import_provider8.UnsupportedFunctionalityError({
|