@ai-sdk/gateway 3.0.218 → 3.0.219
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 +10 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +90 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +138 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/gateway-embedding-model.ts +18 -17
- package/src/gateway-image-model.ts +49 -40
- package/src/gateway-language-model-settings.ts +1 -1
- package/src/gateway-reranking-model.ts +18 -17
- package/src/gateway-speech-model.ts +36 -29
- package/src/gateway-transcription-model.ts +47 -40
- package/src/gateway-video-model.ts +64 -55
- package/src/tool/browserbase-fetch.ts +3 -3
- package/src/tool/tako-search.ts +220 -214
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/gateway",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.219",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@vercel/oidc": "3.2.0",
|
|
34
34
|
"@ai-sdk/provider": "3.0.19",
|
|
35
|
-
"@ai-sdk/provider-utils": "4.0.
|
|
35
|
+
"@ai-sdk/provider-utils": "4.0.62"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "18.15.11",
|
|
@@ -97,29 +97,30 @@ export class GatewayEmbeddingModel implements EmbeddingModelV3 {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
const gatewayEmbeddingWarningSchema =
|
|
101
|
-
z.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
100
|
+
const gatewayEmbeddingWarningSchema = () =>
|
|
101
|
+
z.discriminatedUnion('type', [
|
|
102
|
+
z.object({
|
|
103
|
+
type: z.literal('unsupported'),
|
|
104
|
+
feature: z.string(),
|
|
105
|
+
details: z.string().optional(),
|
|
106
|
+
}),
|
|
107
|
+
z.object({
|
|
108
|
+
type: z.literal('compatibility'),
|
|
109
|
+
feature: z.string(),
|
|
110
|
+
details: z.string().optional(),
|
|
111
|
+
}),
|
|
112
|
+
z.object({
|
|
113
|
+
type: z.literal('other'),
|
|
114
|
+
message: z.string(),
|
|
115
|
+
}),
|
|
116
|
+
]);
|
|
116
117
|
|
|
117
118
|
const gatewayEmbeddingResponseSchema = lazySchema(() =>
|
|
118
119
|
zodSchema(
|
|
119
120
|
z.object({
|
|
120
121
|
embeddings: z.array(z.array(z.number())),
|
|
121
122
|
usage: z.object({ tokens: z.number() }).nullish(),
|
|
122
|
-
warnings: z.array(gatewayEmbeddingWarningSchema).optional(),
|
|
123
|
+
warnings: z.array(gatewayEmbeddingWarningSchema()).optional(),
|
|
123
124
|
providerMetadata: z
|
|
124
125
|
.record(z.string(), z.record(z.string(), z.unknown()))
|
|
125
126
|
.optional(),
|
|
@@ -4,6 +4,8 @@ import type {
|
|
|
4
4
|
ImageModelV3ProviderMetadata,
|
|
5
5
|
} from '@ai-sdk/provider';
|
|
6
6
|
import {
|
|
7
|
+
lazySchema,
|
|
8
|
+
zodSchema,
|
|
7
9
|
combineHeaders,
|
|
8
10
|
convertUint8ArrayToBase64,
|
|
9
11
|
createJsonErrorResponseHandler,
|
|
@@ -135,46 +137,53 @@ function maybeEncodeImageFile(file: ImageModelV3File) {
|
|
|
135
137
|
return file;
|
|
136
138
|
}
|
|
137
139
|
|
|
138
|
-
const providerMetadataEntrySchema =
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
const providerMetadataEntrySchema = () =>
|
|
141
|
+
z
|
|
142
|
+
.object({
|
|
143
|
+
images: z.array(z.unknown()).optional(),
|
|
144
|
+
})
|
|
145
|
+
.catchall(z.unknown());
|
|
143
146
|
|
|
144
|
-
const gatewayImageWarningSchema =
|
|
145
|
-
z.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
147
|
+
const gatewayImageWarningSchema = () =>
|
|
148
|
+
z.discriminatedUnion('type', [
|
|
149
|
+
z.object({
|
|
150
|
+
type: z.literal('unsupported'),
|
|
151
|
+
feature: z.string(),
|
|
152
|
+
details: z.string().optional(),
|
|
153
|
+
}),
|
|
154
|
+
z.object({
|
|
155
|
+
type: z.literal('compatibility'),
|
|
156
|
+
feature: z.string(),
|
|
157
|
+
details: z.string().optional(),
|
|
158
|
+
}),
|
|
159
|
+
z.object({
|
|
160
|
+
type: z.literal('deprecated'),
|
|
161
|
+
setting: z.string(),
|
|
162
|
+
message: z.string(),
|
|
163
|
+
}),
|
|
164
|
+
z.object({
|
|
165
|
+
type: z.literal('other'),
|
|
166
|
+
message: z.string(),
|
|
167
|
+
}),
|
|
168
|
+
]);
|
|
165
169
|
|
|
166
|
-
const gatewayImageUsageSchema =
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
170
|
+
const gatewayImageUsageSchema = () =>
|
|
171
|
+
z.object({
|
|
172
|
+
inputTokens: z.number().nullish(),
|
|
173
|
+
outputTokens: z.number().nullish(),
|
|
174
|
+
totalTokens: z.number().nullish(),
|
|
175
|
+
});
|
|
171
176
|
|
|
172
|
-
const gatewayImageResponseSchema =
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
const gatewayImageResponseSchema = lazySchema(() =>
|
|
178
|
+
zodSchema(
|
|
179
|
+
z.object({
|
|
180
|
+
images: z.array(z.string()), // Always base64 strings over the wire
|
|
181
|
+
isRetryable: z.boolean().optional(),
|
|
182
|
+
warnings: z.array(gatewayImageWarningSchema()).optional(),
|
|
183
|
+
providerMetadata: z
|
|
184
|
+
.record(z.string(), providerMetadataEntrySchema())
|
|
185
|
+
.optional(),
|
|
186
|
+
usage: gatewayImageUsageSchema().optional(),
|
|
187
|
+
}),
|
|
188
|
+
),
|
|
189
|
+
);
|
|
@@ -113,6 +113,7 @@ export type GatewayModelId =
|
|
|
113
113
|
| 'google/gemma-4-31b-it'
|
|
114
114
|
| 'inception/mercury-2'
|
|
115
115
|
| 'inception/mercury-2.5'
|
|
116
|
+
| 'inception/mercury-3'
|
|
116
117
|
| 'inception/mercury-coder-small'
|
|
117
118
|
| 'inclusionai/ling-3.0-flash'
|
|
118
119
|
| 'inclusionai/ling-3.0-flash-fin'
|
|
@@ -287,7 +288,6 @@ export type GatewayModelId =
|
|
|
287
288
|
| 'spacexai/grok-4.6'
|
|
288
289
|
| 'spacexai/grok-4.7'
|
|
289
290
|
| 'spacexai/grok-build-0.1'
|
|
290
|
-
| 'stealth/cat-jam'
|
|
291
291
|
| 'stealth/glyph-cluster'
|
|
292
292
|
| 'stepfun/step-3.7-flash'
|
|
293
293
|
| 'stepfun/step-5-preview'
|
|
@@ -98,22 +98,23 @@ export class GatewayRerankingModel implements RerankingModelV3 {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
const gatewayRerankingWarningSchema =
|
|
102
|
-
z.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
101
|
+
const gatewayRerankingWarningSchema = () =>
|
|
102
|
+
z.discriminatedUnion('type', [
|
|
103
|
+
z.object({
|
|
104
|
+
type: z.literal('unsupported'),
|
|
105
|
+
feature: z.string(),
|
|
106
|
+
details: z.string().optional(),
|
|
107
|
+
}),
|
|
108
|
+
z.object({
|
|
109
|
+
type: z.literal('compatibility'),
|
|
110
|
+
feature: z.string(),
|
|
111
|
+
details: z.string().optional(),
|
|
112
|
+
}),
|
|
113
|
+
z.object({
|
|
114
|
+
type: z.literal('other'),
|
|
115
|
+
message: z.string(),
|
|
116
|
+
}),
|
|
117
|
+
]);
|
|
117
118
|
|
|
118
119
|
const gatewayRerankingResponseSchema = lazySchema(() =>
|
|
119
120
|
zodSchema(
|
|
@@ -124,7 +125,7 @@ const gatewayRerankingResponseSchema = lazySchema(() =>
|
|
|
124
125
|
relevanceScore: z.number(),
|
|
125
126
|
}),
|
|
126
127
|
),
|
|
127
|
-
warnings: z.array(gatewayRerankingWarningSchema).optional(),
|
|
128
|
+
warnings: z.array(gatewayRerankingWarningSchema()).optional(),
|
|
128
129
|
providerMetadata: z
|
|
129
130
|
.record(z.string(), z.record(z.string(), z.unknown()))
|
|
130
131
|
.optional(),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { SharedV3ProviderMetadata, SpeechModelV3 } from '@ai-sdk/provider';
|
|
2
2
|
import {
|
|
3
|
+
lazySchema,
|
|
4
|
+
zodSchema,
|
|
3
5
|
combineHeaders,
|
|
4
6
|
createJsonErrorResponseHandler,
|
|
5
7
|
createJsonResponseHandler,
|
|
@@ -108,34 +110,39 @@ export class GatewaySpeechModel implements SpeechModelV3 {
|
|
|
108
110
|
}
|
|
109
111
|
}
|
|
110
112
|
|
|
111
|
-
const providerMetadataEntrySchema = z.object({}).catchall(z.unknown());
|
|
113
|
+
const providerMetadataEntrySchema = () => z.object({}).catchall(z.unknown());
|
|
112
114
|
|
|
113
|
-
const gatewaySpeechWarningSchema =
|
|
114
|
-
z.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
115
|
+
const gatewaySpeechWarningSchema = () =>
|
|
116
|
+
z.discriminatedUnion('type', [
|
|
117
|
+
z.object({
|
|
118
|
+
type: z.literal('unsupported'),
|
|
119
|
+
feature: z.string(),
|
|
120
|
+
details: z.string().optional(),
|
|
121
|
+
}),
|
|
122
|
+
z.object({
|
|
123
|
+
type: z.literal('compatibility'),
|
|
124
|
+
feature: z.string(),
|
|
125
|
+
details: z.string().optional(),
|
|
126
|
+
}),
|
|
127
|
+
z.object({
|
|
128
|
+
type: z.literal('deprecated'),
|
|
129
|
+
setting: z.string(),
|
|
130
|
+
message: z.string(),
|
|
131
|
+
}),
|
|
132
|
+
z.object({
|
|
133
|
+
type: z.literal('other'),
|
|
134
|
+
message: z.string(),
|
|
135
|
+
}),
|
|
136
|
+
]);
|
|
134
137
|
|
|
135
|
-
const gatewaySpeechResponseSchema =
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
const gatewaySpeechResponseSchema = lazySchema(() =>
|
|
139
|
+
zodSchema(
|
|
140
|
+
z.object({
|
|
141
|
+
audio: z.string(),
|
|
142
|
+
warnings: z.array(gatewaySpeechWarningSchema()).optional(),
|
|
143
|
+
providerMetadata: z
|
|
144
|
+
.record(z.string(), providerMetadataEntrySchema())
|
|
145
|
+
.optional(),
|
|
146
|
+
}),
|
|
147
|
+
),
|
|
148
|
+
);
|
|
@@ -3,6 +3,8 @@ import type {
|
|
|
3
3
|
TranscriptionModelV3,
|
|
4
4
|
} from '@ai-sdk/provider';
|
|
5
5
|
import {
|
|
6
|
+
lazySchema,
|
|
7
|
+
zodSchema,
|
|
6
8
|
combineHeaders,
|
|
7
9
|
convertUint8ArrayToBase64,
|
|
8
10
|
createJsonErrorResponseHandler,
|
|
@@ -110,45 +112,50 @@ export class GatewayTranscriptionModel implements TranscriptionModelV3 {
|
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
114
|
|
|
113
|
-
const providerMetadataEntrySchema = z.object({}).catchall(z.unknown());
|
|
115
|
+
const providerMetadataEntrySchema = () => z.object({}).catchall(z.unknown());
|
|
114
116
|
|
|
115
|
-
const gatewayTranscriptionWarningSchema =
|
|
116
|
-
z.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
117
|
+
const gatewayTranscriptionWarningSchema = () =>
|
|
118
|
+
z.discriminatedUnion('type', [
|
|
119
|
+
z.object({
|
|
120
|
+
type: z.literal('unsupported'),
|
|
121
|
+
feature: z.string(),
|
|
122
|
+
details: z.string().optional(),
|
|
123
|
+
}),
|
|
124
|
+
z.object({
|
|
125
|
+
type: z.literal('compatibility'),
|
|
126
|
+
feature: z.string(),
|
|
127
|
+
details: z.string().optional(),
|
|
128
|
+
}),
|
|
129
|
+
z.object({
|
|
130
|
+
type: z.literal('deprecated'),
|
|
131
|
+
setting: z.string(),
|
|
132
|
+
message: z.string(),
|
|
133
|
+
}),
|
|
134
|
+
z.object({
|
|
135
|
+
type: z.literal('other'),
|
|
136
|
+
message: z.string(),
|
|
137
|
+
}),
|
|
138
|
+
]);
|
|
136
139
|
|
|
137
|
-
const gatewayTranscriptionResponseSchema =
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
z
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
140
|
+
const gatewayTranscriptionResponseSchema = lazySchema(() =>
|
|
141
|
+
zodSchema(
|
|
142
|
+
z.object({
|
|
143
|
+
text: z.string(),
|
|
144
|
+
segments: z
|
|
145
|
+
.array(
|
|
146
|
+
z.object({
|
|
147
|
+
text: z.string(),
|
|
148
|
+
startSecond: z.number(),
|
|
149
|
+
endSecond: z.number(),
|
|
150
|
+
}),
|
|
151
|
+
)
|
|
152
|
+
.optional(),
|
|
153
|
+
language: z.string().nullish(),
|
|
154
|
+
durationInSeconds: z.number().nullish(),
|
|
155
|
+
warnings: z.array(gatewayTranscriptionWarningSchema()).optional(),
|
|
156
|
+
providerMetadata: z
|
|
157
|
+
.record(z.string(), providerMetadataEntrySchema())
|
|
158
|
+
.optional(),
|
|
159
|
+
}),
|
|
160
|
+
),
|
|
161
|
+
);
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
type SharedV3Warning,
|
|
9
9
|
} from '@ai-sdk/provider';
|
|
10
10
|
import {
|
|
11
|
+
lazySchema,
|
|
12
|
+
zodSchema,
|
|
11
13
|
combineHeaders,
|
|
12
14
|
convertUint8ArrayToBase64,
|
|
13
15
|
createJsonErrorResponseHandler,
|
|
@@ -221,61 +223,68 @@ function maybeEncodeVideoFile(file: Experimental_VideoModelV3File) {
|
|
|
221
223
|
return file;
|
|
222
224
|
}
|
|
223
225
|
|
|
224
|
-
const providerMetadataEntrySchema =
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
226
|
+
const providerMetadataEntrySchema = () =>
|
|
227
|
+
z
|
|
228
|
+
.object({
|
|
229
|
+
videos: z.array(z.unknown()).optional(),
|
|
230
|
+
})
|
|
231
|
+
.catchall(z.unknown());
|
|
229
232
|
|
|
230
|
-
const gatewayVideoDataSchema =
|
|
231
|
-
z.
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
233
|
+
const gatewayVideoDataSchema = () =>
|
|
234
|
+
z.union([
|
|
235
|
+
z.object({
|
|
236
|
+
type: z.literal('url'),
|
|
237
|
+
url: z.string(),
|
|
238
|
+
mediaType: z.string(),
|
|
239
|
+
}),
|
|
240
|
+
z.object({
|
|
241
|
+
type: z.literal('base64'),
|
|
242
|
+
data: z.string(),
|
|
243
|
+
mediaType: z.string(),
|
|
244
|
+
}),
|
|
245
|
+
]);
|
|
242
246
|
|
|
243
|
-
const gatewayVideoWarningSchema =
|
|
244
|
-
z.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
247
|
+
const gatewayVideoWarningSchema = () =>
|
|
248
|
+
z.discriminatedUnion('type', [
|
|
249
|
+
z.object({
|
|
250
|
+
type: z.literal('unsupported'),
|
|
251
|
+
feature: z.string(),
|
|
252
|
+
details: z.string().optional(),
|
|
253
|
+
}),
|
|
254
|
+
z.object({
|
|
255
|
+
type: z.literal('compatibility'),
|
|
256
|
+
feature: z.string(),
|
|
257
|
+
details: z.string().optional(),
|
|
258
|
+
}),
|
|
259
|
+
z.object({
|
|
260
|
+
type: z.literal('deprecated'),
|
|
261
|
+
setting: z.string(),
|
|
262
|
+
message: z.string(),
|
|
263
|
+
}),
|
|
264
|
+
z.object({
|
|
265
|
+
type: z.literal('other'),
|
|
266
|
+
message: z.string(),
|
|
267
|
+
}),
|
|
268
|
+
]);
|
|
264
269
|
|
|
265
|
-
const gatewayVideoEventSchema =
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
270
|
+
const gatewayVideoEventSchema = lazySchema(() =>
|
|
271
|
+
zodSchema(
|
|
272
|
+
z.discriminatedUnion('type', [
|
|
273
|
+
z.object({
|
|
274
|
+
type: z.literal('result'),
|
|
275
|
+
videos: z.array(gatewayVideoDataSchema()),
|
|
276
|
+
warnings: z.array(gatewayVideoWarningSchema()).optional(),
|
|
277
|
+
providerMetadata: z
|
|
278
|
+
.record(z.string(), providerMetadataEntrySchema())
|
|
279
|
+
.optional(),
|
|
280
|
+
}),
|
|
281
|
+
z.object({
|
|
282
|
+
type: z.literal('error'),
|
|
283
|
+
message: z.string(),
|
|
284
|
+
errorType: z.string(),
|
|
285
|
+
statusCode: z.number(),
|
|
286
|
+
param: z.unknown().nullable(),
|
|
287
|
+
}),
|
|
288
|
+
]),
|
|
289
|
+
),
|
|
290
|
+
);
|
|
@@ -76,7 +76,7 @@ export type BrowserbaseFetchOutput =
|
|
|
76
76
|
| BrowserbaseFetchError
|
|
77
77
|
| BrowserbaseFetchResponse;
|
|
78
78
|
|
|
79
|
-
const jsonObjectSchema = z.record(z.string(), z.unknown());
|
|
79
|
+
const jsonObjectSchema = () => z.record(z.string(), z.unknown());
|
|
80
80
|
|
|
81
81
|
const browserbaseFetchInputSchema = lazySchema(() =>
|
|
82
82
|
zodSchema(
|
|
@@ -104,7 +104,7 @@ const browserbaseFetchInputSchema = lazySchema(() =>
|
|
|
104
104
|
.describe(
|
|
105
105
|
'Output format. raw returns the response body unchanged, markdown returns page content as Markdown, and json returns structured content using schema.',
|
|
106
106
|
),
|
|
107
|
-
schema: jsonObjectSchema
|
|
107
|
+
schema: jsonObjectSchema()
|
|
108
108
|
.optional()
|
|
109
109
|
.describe(
|
|
110
110
|
'JSON Schema for structured extraction. Only use with format set to json.',
|
|
@@ -118,7 +118,7 @@ const browserbaseFetchOutputSchema = lazySchema(() =>
|
|
|
118
118
|
z.union([
|
|
119
119
|
z.object({
|
|
120
120
|
id: z.string(),
|
|
121
|
-
content: z.union([z.string(), jsonObjectSchema]),
|
|
121
|
+
content: z.union([z.string(), jsonObjectSchema()]),
|
|
122
122
|
contentType: z.string(),
|
|
123
123
|
encoding: z.string(),
|
|
124
124
|
headers: z.record(z.string(), z.string()),
|