@ai-sdk/openai 3.0.0-beta.48 → 3.0.0-beta.49
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.d.mts +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +19 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +18 -3
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +18 -3
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -68,10 +68,13 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderDefinedToolFa
|
|
|
68
68
|
/**
|
|
69
69
|
* Optional sources cited by the model for the web search call.
|
|
70
70
|
*/
|
|
71
|
-
sources?: {
|
|
71
|
+
sources?: Array<{
|
|
72
72
|
type: "url";
|
|
73
73
|
url: string;
|
|
74
|
-
}
|
|
74
|
+
} | {
|
|
75
|
+
type: "api";
|
|
76
|
+
name: string;
|
|
77
|
+
}>;
|
|
75
78
|
}, {
|
|
76
79
|
/**
|
|
77
80
|
* Filters for the search.
|
|
@@ -315,10 +318,13 @@ declare const openaiTools: {
|
|
|
315
318
|
url: string;
|
|
316
319
|
pattern: string;
|
|
317
320
|
};
|
|
318
|
-
sources?: {
|
|
321
|
+
sources?: Array<{
|
|
319
322
|
type: "url";
|
|
320
323
|
url: string;
|
|
321
|
-
}
|
|
324
|
+
} | {
|
|
325
|
+
type: "api";
|
|
326
|
+
name: string;
|
|
327
|
+
}>;
|
|
322
328
|
}>;
|
|
323
329
|
};
|
|
324
330
|
|
package/dist/index.d.ts
CHANGED
|
@@ -68,10 +68,13 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderDefinedToolFa
|
|
|
68
68
|
/**
|
|
69
69
|
* Optional sources cited by the model for the web search call.
|
|
70
70
|
*/
|
|
71
|
-
sources?: {
|
|
71
|
+
sources?: Array<{
|
|
72
72
|
type: "url";
|
|
73
73
|
url: string;
|
|
74
|
-
}
|
|
74
|
+
} | {
|
|
75
|
+
type: "api";
|
|
76
|
+
name: string;
|
|
77
|
+
}>;
|
|
75
78
|
}, {
|
|
76
79
|
/**
|
|
77
80
|
* Filters for the search.
|
|
@@ -315,10 +318,13 @@ declare const openaiTools: {
|
|
|
315
318
|
url: string;
|
|
316
319
|
pattern: string;
|
|
317
320
|
};
|
|
318
|
-
sources?: {
|
|
321
|
+
sources?: Array<{
|
|
319
322
|
type: "url";
|
|
320
323
|
url: string;
|
|
321
|
-
}
|
|
324
|
+
} | {
|
|
325
|
+
type: "api";
|
|
326
|
+
name: string;
|
|
327
|
+
}>;
|
|
322
328
|
}>;
|
|
323
329
|
};
|
|
324
330
|
|
package/dist/index.js
CHANGED
|
@@ -1939,7 +1939,12 @@ var webSearchOutputSchema = (0, import_provider_utils18.lazySchema)(
|
|
|
1939
1939
|
pattern: import_v413.z.string()
|
|
1940
1940
|
})
|
|
1941
1941
|
]),
|
|
1942
|
-
sources: import_v413.z.array(
|
|
1942
|
+
sources: import_v413.z.array(
|
|
1943
|
+
import_v413.z.discriminatedUnion("type", [
|
|
1944
|
+
import_v413.z.object({ type: import_v413.z.literal("url"), url: import_v413.z.string() }),
|
|
1945
|
+
import_v413.z.object({ type: import_v413.z.literal("api"), name: import_v413.z.string() })
|
|
1946
|
+
])
|
|
1947
|
+
).optional()
|
|
1943
1948
|
})
|
|
1944
1949
|
)
|
|
1945
1950
|
);
|
|
@@ -2540,7 +2545,12 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazySchema)(
|
|
|
2540
2545
|
import_v416.z.object({
|
|
2541
2546
|
type: import_v416.z.literal("search"),
|
|
2542
2547
|
query: import_v416.z.string().nullish(),
|
|
2543
|
-
sources: import_v416.z.array(
|
|
2548
|
+
sources: import_v416.z.array(
|
|
2549
|
+
import_v416.z.discriminatedUnion("type", [
|
|
2550
|
+
import_v416.z.object({ type: import_v416.z.literal("url"), url: import_v416.z.string() }),
|
|
2551
|
+
import_v416.z.object({ type: import_v416.z.literal("api"), name: import_v416.z.string() })
|
|
2552
|
+
])
|
|
2553
|
+
).nullish()
|
|
2544
2554
|
}),
|
|
2545
2555
|
import_v416.z.object({
|
|
2546
2556
|
type: import_v416.z.literal("open_page"),
|
|
@@ -2727,7 +2737,12 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazySchema)(
|
|
|
2727
2737
|
import_v416.z.object({
|
|
2728
2738
|
type: import_v416.z.literal("search"),
|
|
2729
2739
|
query: import_v416.z.string().nullish(),
|
|
2730
|
-
sources: import_v416.z.array(
|
|
2740
|
+
sources: import_v416.z.array(
|
|
2741
|
+
import_v416.z.discriminatedUnion("type", [
|
|
2742
|
+
import_v416.z.object({ type: import_v416.z.literal("url"), url: import_v416.z.string() }),
|
|
2743
|
+
import_v416.z.object({ type: import_v416.z.literal("api"), name: import_v416.z.string() })
|
|
2744
|
+
])
|
|
2745
|
+
).nullish()
|
|
2731
2746
|
}),
|
|
2732
2747
|
import_v416.z.object({
|
|
2733
2748
|
type: import_v416.z.literal("open_page"),
|
|
@@ -4465,7 +4480,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4465
4480
|
};
|
|
4466
4481
|
|
|
4467
4482
|
// src/version.ts
|
|
4468
|
-
var VERSION = true ? "3.0.0-beta.
|
|
4483
|
+
var VERSION = true ? "3.0.0-beta.49" : "0.0.0-test";
|
|
4469
4484
|
|
|
4470
4485
|
// src/openai-provider.ts
|
|
4471
4486
|
function createOpenAI(options = {}) {
|