@ai-sdk/gateway 2.0.169 → 2.0.170

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/dist/index.mjs CHANGED
@@ -1058,6 +1058,8 @@ var gatewayEmbeddingResponseSchema = lazyValidator6(
1058
1058
 
1059
1059
  // src/gateway-image-model.ts
1060
1060
  import {
1061
+ lazySchema as lazySchema3,
1062
+ zodSchema as zodSchema9,
1061
1063
  combineHeaders as combineHeaders3,
1062
1064
  createJsonErrorResponseHandler as createJsonErrorResponseHandler6,
1063
1065
  createJsonResponseHandler as createJsonResponseHandler6,
@@ -1158,37 +1160,41 @@ var GatewayImageModel = class {
1158
1160
  };
1159
1161
  }
1160
1162
  };
1161
- var providerMetadataEntrySchema = z10.object({
1163
+ var providerMetadataEntrySchema = () => z10.object({
1162
1164
  images: z10.array(z10.unknown()).optional()
1163
1165
  }).catchall(z10.unknown());
1164
- var gatewayImageUsageSchema = z10.object({
1166
+ var gatewayImageUsageSchema = () => z10.object({
1165
1167
  inputTokens: z10.number().nullish(),
1166
1168
  outputTokens: z10.number().nullish(),
1167
1169
  totalTokens: z10.number().nullish()
1168
1170
  });
1169
- var gatewayImageResponseSchema = z10.object({
1170
- images: z10.array(z10.string()),
1171
- // Always base64 strings over the wire
1172
- isRetryable: z10.boolean().optional(),
1173
- warnings: z10.array(
1171
+ var gatewayImageResponseSchema = lazySchema3(
1172
+ () => zodSchema9(
1174
1173
  z10.object({
1175
- type: z10.literal("other"),
1176
- message: z10.string()
1174
+ images: z10.array(z10.string()),
1175
+ // Always base64 strings over the wire
1176
+ isRetryable: z10.boolean().optional(),
1177
+ warnings: z10.array(
1178
+ z10.object({
1179
+ type: z10.literal("other"),
1180
+ message: z10.string()
1181
+ })
1182
+ ).optional(),
1183
+ providerMetadata: z10.record(z10.string(), providerMetadataEntrySchema()).optional(),
1184
+ usage: gatewayImageUsageSchema().optional()
1177
1185
  })
1178
- ).optional(),
1179
- providerMetadata: z10.record(z10.string(), providerMetadataEntrySchema).optional(),
1180
- usage: gatewayImageUsageSchema.optional()
1181
- });
1186
+ )
1187
+ );
1182
1188
 
1183
1189
  // src/tool/parallel-search.ts
1184
1190
  import {
1185
1191
  createProviderDefinedToolFactoryWithOutputSchema,
1186
- lazySchema as lazySchema3,
1187
- zodSchema as zodSchema9
1192
+ lazySchema as lazySchema4,
1193
+ zodSchema as zodSchema10
1188
1194
  } from "@ai-sdk/provider-utils";
1189
1195
  import { z as z11 } from "zod";
1190
- var parallelSearchInputSchema = lazySchema3(
1191
- () => zodSchema9(
1196
+ var parallelSearchInputSchema = lazySchema4(
1197
+ () => zodSchema10(
1192
1198
  z11.object({
1193
1199
  objective: z11.string().describe(
1194
1200
  "Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."
@@ -1223,8 +1229,8 @@ var parallelSearchInputSchema = lazySchema3(
1223
1229
  })
1224
1230
  )
1225
1231
  );
1226
- var parallelSearchOutputSchema = lazySchema3(
1227
- () => zodSchema9(
1232
+ var parallelSearchOutputSchema = lazySchema4(
1233
+ () => zodSchema10(
1228
1234
  z11.union([
1229
1235
  // Success response
1230
1236
  z11.object({
@@ -1266,12 +1272,12 @@ var parallelSearch = (config = {}) => parallelSearchToolFactory(config);
1266
1272
  // src/tool/perplexity-search.ts
1267
1273
  import {
1268
1274
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema2,
1269
- lazySchema as lazySchema4,
1270
- zodSchema as zodSchema10
1275
+ lazySchema as lazySchema5,
1276
+ zodSchema as zodSchema11
1271
1277
  } from "@ai-sdk/provider-utils";
1272
1278
  import { z as z12 } from "zod";
1273
- var perplexitySearchInputSchema = lazySchema4(
1274
- () => zodSchema10(
1279
+ var perplexitySearchInputSchema = lazySchema5(
1280
+ () => zodSchema11(
1275
1281
  z12.object({
1276
1282
  query: z12.union([z12.string(), z12.array(z12.string())]).describe(
1277
1283
  "Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."
@@ -1312,8 +1318,8 @@ var perplexitySearchInputSchema = lazySchema4(
1312
1318
  })
1313
1319
  )
1314
1320
  );
1315
- var perplexitySearchOutputSchema = lazySchema4(
1316
- () => zodSchema10(
1321
+ var perplexitySearchOutputSchema = lazySchema5(
1322
+ () => zodSchema11(
1317
1323
  z12.union([
1318
1324
  // Success response
1319
1325
  z12.object({
@@ -1381,7 +1387,7 @@ async function getVercelRequestId() {
1381
1387
  }
1382
1388
 
1383
1389
  // src/version.ts
1384
- var VERSION = true ? "2.0.169" : "0.0.0-test";
1390
+ var VERSION = true ? "2.0.170" : "0.0.0-test";
1385
1391
 
1386
1392
  // src/gateway-provider.ts
1387
1393
  var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";