@ai-sdk/openai 3.0.65 → 3.0.67
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 +12 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +196 -1
- package/dist/internal/index.d.ts +196 -1
- package/dist/internal/index.js +20 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +15 -3
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/internal/index.ts +1 -0
- package/src/responses/openai-responses-api.ts +2 -0
- package/src/responses/openai-responses-language-model.ts +5 -1
- package/src/tool/web-search.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.67
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c679fec: feat(provider/azure):web search tool in the Azure OpenAI Responses API.
|
|
8
|
+
|
|
9
|
+
## 3.0.66
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- c82ab42: feat(openai): forward `web_search_call.action.queries` from Responses API
|
|
14
|
+
|
|
3
15
|
## 3.0.65
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -83,8 +83,14 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWi
|
|
|
83
83
|
type: "search";
|
|
84
84
|
/**
|
|
85
85
|
* The search query.
|
|
86
|
+
*
|
|
87
|
+
* @deprecated Use `queries` instead.
|
|
86
88
|
*/
|
|
87
89
|
query?: string;
|
|
90
|
+
/**
|
|
91
|
+
* The search queries the model used.
|
|
92
|
+
*/
|
|
93
|
+
queries?: string[];
|
|
88
94
|
} | {
|
|
89
95
|
/**
|
|
90
96
|
* Action type "openPage" - Opens a specific URL from search results.
|
|
@@ -429,6 +435,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
429
435
|
action?: {
|
|
430
436
|
type: "search";
|
|
431
437
|
query?: string | null | undefined;
|
|
438
|
+
queries?: string[] | null | undefined;
|
|
432
439
|
sources?: ({
|
|
433
440
|
type: "url";
|
|
434
441
|
url: string;
|
|
@@ -956,6 +963,7 @@ declare const openaiTools: {
|
|
|
956
963
|
action?: {
|
|
957
964
|
type: "search";
|
|
958
965
|
query?: string;
|
|
966
|
+
queries?: string[];
|
|
959
967
|
} | {
|
|
960
968
|
type: "openPage";
|
|
961
969
|
url?: string | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -83,8 +83,14 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWi
|
|
|
83
83
|
type: "search";
|
|
84
84
|
/**
|
|
85
85
|
* The search query.
|
|
86
|
+
*
|
|
87
|
+
* @deprecated Use `queries` instead.
|
|
86
88
|
*/
|
|
87
89
|
query?: string;
|
|
90
|
+
/**
|
|
91
|
+
* The search queries the model used.
|
|
92
|
+
*/
|
|
93
|
+
queries?: string[];
|
|
88
94
|
} | {
|
|
89
95
|
/**
|
|
90
96
|
* Action type "openPage" - Opens a specific URL from search results.
|
|
@@ -429,6 +435,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
429
435
|
action?: {
|
|
430
436
|
type: "search";
|
|
431
437
|
query?: string | null | undefined;
|
|
438
|
+
queries?: string[] | null | undefined;
|
|
432
439
|
sources?: ({
|
|
433
440
|
type: "url";
|
|
434
441
|
url: string;
|
|
@@ -956,6 +963,7 @@ declare const openaiTools: {
|
|
|
956
963
|
action?: {
|
|
957
964
|
type: "search";
|
|
958
965
|
query?: string;
|
|
966
|
+
queries?: string[];
|
|
959
967
|
} | {
|
|
960
968
|
type: "openPage";
|
|
961
969
|
url?: string | null;
|
package/dist/index.js
CHANGED
|
@@ -2425,7 +2425,8 @@ var webSearchOutputSchema = (0, import_provider_utils23.lazySchema)(
|
|
|
2425
2425
|
action: import_v418.z.discriminatedUnion("type", [
|
|
2426
2426
|
import_v418.z.object({
|
|
2427
2427
|
type: import_v418.z.literal("search"),
|
|
2428
|
-
query: import_v418.z.string().optional()
|
|
2428
|
+
query: import_v418.z.string().optional(),
|
|
2429
|
+
queries: import_v418.z.array(import_v418.z.string()).optional()
|
|
2429
2430
|
}),
|
|
2430
2431
|
import_v418.z.object({
|
|
2431
2432
|
type: import_v418.z.literal("openPage"),
|
|
@@ -3633,6 +3634,7 @@ var openaiResponsesChunkSchema = (0, import_provider_utils27.lazySchema)(
|
|
|
3633
3634
|
import_v422.z.object({
|
|
3634
3635
|
type: import_v422.z.literal("search"),
|
|
3635
3636
|
query: import_v422.z.string().nullish(),
|
|
3637
|
+
queries: import_v422.z.array(import_v422.z.string()).nullish(),
|
|
3636
3638
|
sources: import_v422.z.array(
|
|
3637
3639
|
import_v422.z.discriminatedUnion("type", [
|
|
3638
3640
|
import_v422.z.object({ type: import_v422.z.literal("url"), url: import_v422.z.string() }),
|
|
@@ -3985,6 +3987,7 @@ var openaiResponsesResponseSchema = (0, import_provider_utils27.lazySchema)(
|
|
|
3985
3987
|
import_v422.z.object({
|
|
3986
3988
|
type: import_v422.z.literal("search"),
|
|
3987
3989
|
query: import_v422.z.string().nullish(),
|
|
3990
|
+
queries: import_v422.z.array(import_v422.z.string()).nullish(),
|
|
3988
3991
|
sources: import_v422.z.array(
|
|
3989
3992
|
import_v422.z.discriminatedUnion("type", [
|
|
3990
3993
|
import_v422.z.object({ type: import_v422.z.literal("url"), url: import_v422.z.string() }),
|
|
@@ -6432,7 +6435,11 @@ function mapWebSearchOutput(action) {
|
|
|
6432
6435
|
switch (action.type) {
|
|
6433
6436
|
case "search":
|
|
6434
6437
|
return {
|
|
6435
|
-
action: {
|
|
6438
|
+
action: {
|
|
6439
|
+
type: "search",
|
|
6440
|
+
query: (_a = action.query) != null ? _a : void 0,
|
|
6441
|
+
...action.queries != null && { queries: action.queries }
|
|
6442
|
+
},
|
|
6436
6443
|
// include sources when provided by the Responses API (behind include flag)
|
|
6437
6444
|
...action.sources != null && { sources: action.sources }
|
|
6438
6445
|
};
|
|
@@ -6805,7 +6812,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6805
6812
|
};
|
|
6806
6813
|
|
|
6807
6814
|
// src/version.ts
|
|
6808
|
-
var VERSION = true ? "3.0.
|
|
6815
|
+
var VERSION = true ? "3.0.67" : "0.0.0-test";
|
|
6809
6816
|
|
|
6810
6817
|
// src/openai-provider.ts
|
|
6811
6818
|
function createOpenAI(options = {}) {
|