@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/dist/index.mjs CHANGED
@@ -1128,7 +1128,7 @@ var GatewayEmbeddingModel = class {
1128
1128
  };
1129
1129
  }
1130
1130
  };
1131
- var gatewayEmbeddingWarningSchema = z9.discriminatedUnion("type", [
1131
+ var gatewayEmbeddingWarningSchema = () => z9.discriminatedUnion("type", [
1132
1132
  z9.object({
1133
1133
  type: z9.literal("unsupported"),
1134
1134
  feature: z9.string(),
@@ -1149,7 +1149,7 @@ var gatewayEmbeddingResponseSchema = lazySchema8(
1149
1149
  z9.object({
1150
1150
  embeddings: z9.array(z9.array(z9.number())),
1151
1151
  usage: z9.object({ tokens: z9.number() }).nullish(),
1152
- warnings: z9.array(gatewayEmbeddingWarningSchema).optional(),
1152
+ warnings: z9.array(gatewayEmbeddingWarningSchema()).optional(),
1153
1153
  providerMetadata: z9.record(z9.string(), z9.record(z9.string(), z9.unknown())).optional()
1154
1154
  })
1155
1155
  )
@@ -1157,6 +1157,8 @@ var gatewayEmbeddingResponseSchema = lazySchema8(
1157
1157
 
1158
1158
  // src/gateway-image-model.ts
1159
1159
  import {
1160
+ lazySchema as lazySchema9,
1161
+ zodSchema as zodSchema9,
1160
1162
  combineHeaders as combineHeaders3,
1161
1163
  convertUint8ArrayToBase64,
1162
1164
  createJsonErrorResponseHandler as createJsonErrorResponseHandler6,
@@ -1282,10 +1284,10 @@ function maybeEncodeImageFile(file) {
1282
1284
  }
1283
1285
  return file;
1284
1286
  }
1285
- var providerMetadataEntrySchema = z10.object({
1287
+ var providerMetadataEntrySchema = () => z10.object({
1286
1288
  images: z10.array(z10.unknown()).optional()
1287
1289
  }).catchall(z10.unknown());
1288
- var gatewayImageWarningSchema = z10.discriminatedUnion("type", [
1290
+ var gatewayImageWarningSchema = () => z10.discriminatedUnion("type", [
1289
1291
  z10.object({
1290
1292
  type: z10.literal("unsupported"),
1291
1293
  feature: z10.string(),
@@ -1306,25 +1308,31 @@ var gatewayImageWarningSchema = z10.discriminatedUnion("type", [
1306
1308
  message: z10.string()
1307
1309
  })
1308
1310
  ]);
1309
- var gatewayImageUsageSchema = z10.object({
1311
+ var gatewayImageUsageSchema = () => z10.object({
1310
1312
  inputTokens: z10.number().nullish(),
1311
1313
  outputTokens: z10.number().nullish(),
1312
1314
  totalTokens: z10.number().nullish()
1313
1315
  });
1314
- var gatewayImageResponseSchema = z10.object({
1315
- images: z10.array(z10.string()),
1316
- // Always base64 strings over the wire
1317
- isRetryable: z10.boolean().optional(),
1318
- warnings: z10.array(gatewayImageWarningSchema).optional(),
1319
- providerMetadata: z10.record(z10.string(), providerMetadataEntrySchema).optional(),
1320
- usage: gatewayImageUsageSchema.optional()
1321
- });
1316
+ var gatewayImageResponseSchema = lazySchema9(
1317
+ () => zodSchema9(
1318
+ z10.object({
1319
+ images: z10.array(z10.string()),
1320
+ // Always base64 strings over the wire
1321
+ isRetryable: z10.boolean().optional(),
1322
+ warnings: z10.array(gatewayImageWarningSchema()).optional(),
1323
+ providerMetadata: z10.record(z10.string(), providerMetadataEntrySchema()).optional(),
1324
+ usage: gatewayImageUsageSchema().optional()
1325
+ })
1326
+ )
1327
+ );
1322
1328
 
1323
1329
  // src/gateway-video-model.ts
1324
1330
  import {
1325
1331
  APICallError as APICallError2
1326
1332
  } from "@ai-sdk/provider";
1327
1333
  import {
1334
+ lazySchema as lazySchema10,
1335
+ zodSchema as zodSchema10,
1328
1336
  combineHeaders as combineHeaders4,
1329
1337
  convertUint8ArrayToBase64 as convertUint8ArrayToBase642,
1330
1338
  createJsonErrorResponseHandler as createJsonErrorResponseHandler7,
@@ -1502,10 +1510,10 @@ function maybeEncodeVideoFile(file) {
1502
1510
  }
1503
1511
  return file;
1504
1512
  }
1505
- var providerMetadataEntrySchema2 = z11.object({
1513
+ var providerMetadataEntrySchema2 = () => z11.object({
1506
1514
  videos: z11.array(z11.unknown()).optional()
1507
1515
  }).catchall(z11.unknown());
1508
- var gatewayVideoDataSchema = z11.union([
1516
+ var gatewayVideoDataSchema = () => z11.union([
1509
1517
  z11.object({
1510
1518
  type: z11.literal("url"),
1511
1519
  url: z11.string(),
@@ -1517,7 +1525,7 @@ var gatewayVideoDataSchema = z11.union([
1517
1525
  mediaType: z11.string()
1518
1526
  })
1519
1527
  ]);
1520
- var gatewayVideoWarningSchema = z11.discriminatedUnion("type", [
1528
+ var gatewayVideoWarningSchema = () => z11.discriminatedUnion("type", [
1521
1529
  z11.object({
1522
1530
  type: z11.literal("unsupported"),
1523
1531
  feature: z11.string(),
@@ -1538,21 +1546,25 @@ var gatewayVideoWarningSchema = z11.discriminatedUnion("type", [
1538
1546
  message: z11.string()
1539
1547
  })
1540
1548
  ]);
1541
- var gatewayVideoEventSchema = z11.discriminatedUnion("type", [
1542
- z11.object({
1543
- type: z11.literal("result"),
1544
- videos: z11.array(gatewayVideoDataSchema),
1545
- warnings: z11.array(gatewayVideoWarningSchema).optional(),
1546
- providerMetadata: z11.record(z11.string(), providerMetadataEntrySchema2).optional()
1547
- }),
1548
- z11.object({
1549
- type: z11.literal("error"),
1550
- message: z11.string(),
1551
- errorType: z11.string(),
1552
- statusCode: z11.number(),
1553
- param: z11.unknown().nullable()
1554
- })
1555
- ]);
1549
+ var gatewayVideoEventSchema = lazySchema10(
1550
+ () => zodSchema10(
1551
+ z11.discriminatedUnion("type", [
1552
+ z11.object({
1553
+ type: z11.literal("result"),
1554
+ videos: z11.array(gatewayVideoDataSchema()),
1555
+ warnings: z11.array(gatewayVideoWarningSchema()).optional(),
1556
+ providerMetadata: z11.record(z11.string(), providerMetadataEntrySchema2()).optional()
1557
+ }),
1558
+ z11.object({
1559
+ type: z11.literal("error"),
1560
+ message: z11.string(),
1561
+ errorType: z11.string(),
1562
+ statusCode: z11.number(),
1563
+ param: z11.unknown().nullable()
1564
+ })
1565
+ ])
1566
+ )
1567
+ );
1556
1568
 
1557
1569
  // src/gateway-reranking-model.ts
1558
1570
  import {
@@ -1560,10 +1572,10 @@ import {
1560
1572
  createJsonErrorResponseHandler as createJsonErrorResponseHandler8,
1561
1573
  createJsonResponseHandler as createJsonResponseHandler7,
1562
1574
  getErrorMessage as getErrorMessage8,
1563
- lazySchema as lazySchema9,
1575
+ lazySchema as lazySchema11,
1564
1576
  postJsonToApi as postJsonToApi5,
1565
1577
  resolve as resolve8,
1566
- zodSchema as zodSchema9
1578
+ zodSchema as zodSchema11
1567
1579
  } from "@ai-sdk/provider-utils";
1568
1580
  import { z as z12 } from "zod/v4";
1569
1581
  var GatewayRerankingModel = class {
@@ -1637,7 +1649,7 @@ var GatewayRerankingModel = class {
1637
1649
  };
1638
1650
  }
1639
1651
  };
1640
- var gatewayRerankingWarningSchema = z12.discriminatedUnion("type", [
1652
+ var gatewayRerankingWarningSchema = () => z12.discriminatedUnion("type", [
1641
1653
  z12.object({
1642
1654
  type: z12.literal("unsupported"),
1643
1655
  feature: z12.string(),
@@ -1653,8 +1665,8 @@ var gatewayRerankingWarningSchema = z12.discriminatedUnion("type", [
1653
1665
  message: z12.string()
1654
1666
  })
1655
1667
  ]);
1656
- var gatewayRerankingResponseSchema = lazySchema9(
1657
- () => zodSchema9(
1668
+ var gatewayRerankingResponseSchema = lazySchema11(
1669
+ () => zodSchema11(
1658
1670
  z12.object({
1659
1671
  ranking: z12.array(
1660
1672
  z12.object({
@@ -1662,7 +1674,7 @@ var gatewayRerankingResponseSchema = lazySchema9(
1662
1674
  relevanceScore: z12.number()
1663
1675
  })
1664
1676
  ),
1665
- warnings: z12.array(gatewayRerankingWarningSchema).optional(),
1677
+ warnings: z12.array(gatewayRerankingWarningSchema()).optional(),
1666
1678
  providerMetadata: z12.record(z12.string(), z12.record(z12.string(), z12.unknown())).optional()
1667
1679
  })
1668
1680
  )
@@ -1670,6 +1682,8 @@ var gatewayRerankingResponseSchema = lazySchema9(
1670
1682
 
1671
1683
  // src/gateway-speech-model.ts
1672
1684
  import {
1685
+ lazySchema as lazySchema12,
1686
+ zodSchema as zodSchema12,
1673
1687
  combineHeaders as combineHeaders6,
1674
1688
  createJsonErrorResponseHandler as createJsonErrorResponseHandler9,
1675
1689
  createJsonResponseHandler as createJsonResponseHandler8,
@@ -1762,8 +1776,8 @@ var GatewaySpeechModel = class {
1762
1776
  };
1763
1777
  }
1764
1778
  };
1765
- var providerMetadataEntrySchema3 = z13.object({}).catchall(z13.unknown());
1766
- var gatewaySpeechWarningSchema = z13.discriminatedUnion("type", [
1779
+ var providerMetadataEntrySchema3 = () => z13.object({}).catchall(z13.unknown());
1780
+ var gatewaySpeechWarningSchema = () => z13.discriminatedUnion("type", [
1767
1781
  z13.object({
1768
1782
  type: z13.literal("unsupported"),
1769
1783
  feature: z13.string(),
@@ -1784,14 +1798,20 @@ var gatewaySpeechWarningSchema = z13.discriminatedUnion("type", [
1784
1798
  message: z13.string()
1785
1799
  })
1786
1800
  ]);
1787
- var gatewaySpeechResponseSchema = z13.object({
1788
- audio: z13.string(),
1789
- warnings: z13.array(gatewaySpeechWarningSchema).optional(),
1790
- providerMetadata: z13.record(z13.string(), providerMetadataEntrySchema3).optional()
1791
- });
1801
+ var gatewaySpeechResponseSchema = lazySchema12(
1802
+ () => zodSchema12(
1803
+ z13.object({
1804
+ audio: z13.string(),
1805
+ warnings: z13.array(gatewaySpeechWarningSchema()).optional(),
1806
+ providerMetadata: z13.record(z13.string(), providerMetadataEntrySchema3()).optional()
1807
+ })
1808
+ )
1809
+ );
1792
1810
 
1793
1811
  // src/gateway-transcription-model.ts
1794
1812
  import {
1813
+ lazySchema as lazySchema13,
1814
+ zodSchema as zodSchema13,
1795
1815
  combineHeaders as combineHeaders7,
1796
1816
  convertUint8ArrayToBase64 as convertUint8ArrayToBase643,
1797
1817
  createJsonErrorResponseHandler as createJsonErrorResponseHandler10,
@@ -1881,8 +1901,8 @@ var GatewayTranscriptionModel = class {
1881
1901
  };
1882
1902
  }
1883
1903
  };
1884
- var providerMetadataEntrySchema4 = z14.object({}).catchall(z14.unknown());
1885
- var gatewayTranscriptionWarningSchema = z14.discriminatedUnion("type", [
1904
+ var providerMetadataEntrySchema4 = () => z14.object({}).catchall(z14.unknown());
1905
+ var gatewayTranscriptionWarningSchema = () => z14.discriminatedUnion("type", [
1886
1906
  z14.object({
1887
1907
  type: z14.literal("unsupported"),
1888
1908
  feature: z14.string(),
@@ -1903,31 +1923,35 @@ var gatewayTranscriptionWarningSchema = z14.discriminatedUnion("type", [
1903
1923
  message: z14.string()
1904
1924
  })
1905
1925
  ]);
1906
- var gatewayTranscriptionResponseSchema = z14.object({
1907
- text: z14.string(),
1908
- segments: z14.array(
1926
+ var gatewayTranscriptionResponseSchema = lazySchema13(
1927
+ () => zodSchema13(
1909
1928
  z14.object({
1910
1929
  text: z14.string(),
1911
- startSecond: z14.number(),
1912
- endSecond: z14.number()
1930
+ segments: z14.array(
1931
+ z14.object({
1932
+ text: z14.string(),
1933
+ startSecond: z14.number(),
1934
+ endSecond: z14.number()
1935
+ })
1936
+ ).optional(),
1937
+ language: z14.string().nullish(),
1938
+ durationInSeconds: z14.number().nullish(),
1939
+ warnings: z14.array(gatewayTranscriptionWarningSchema()).optional(),
1940
+ providerMetadata: z14.record(z14.string(), providerMetadataEntrySchema4()).optional()
1913
1941
  })
1914
- ).optional(),
1915
- language: z14.string().nullish(),
1916
- durationInSeconds: z14.number().nullish(),
1917
- warnings: z14.array(gatewayTranscriptionWarningSchema).optional(),
1918
- providerMetadata: z14.record(z14.string(), providerMetadataEntrySchema4).optional()
1919
- });
1942
+ )
1943
+ );
1920
1944
 
1921
1945
  // src/tool/browserbase-fetch.ts
1922
1946
  import {
1923
1947
  createProviderToolFactoryWithOutputSchema,
1924
- lazySchema as lazySchema10,
1925
- zodSchema as zodSchema10
1948
+ lazySchema as lazySchema14,
1949
+ zodSchema as zodSchema14
1926
1950
  } from "@ai-sdk/provider-utils";
1927
1951
  import { z as z15 } from "zod";
1928
- var jsonObjectSchema = z15.record(z15.string(), z15.unknown());
1929
- var browserbaseFetchInputSchema = lazySchema10(
1930
- () => zodSchema10(
1952
+ var jsonObjectSchema = () => z15.record(z15.string(), z15.unknown());
1953
+ var browserbaseFetchInputSchema = lazySchema14(
1954
+ () => zodSchema14(
1931
1955
  z15.object({
1932
1956
  url: z15.string().url().describe("URL of the page to fetch."),
1933
1957
  allow_redirects: z15.boolean().optional().describe("Whether to follow HTTP redirects (default: false)."),
@@ -1940,18 +1964,18 @@ var browserbaseFetchInputSchema = lazySchema10(
1940
1964
  format: z15.enum(["raw", "json", "markdown"]).optional().describe(
1941
1965
  "Output format. raw returns the response body unchanged, markdown returns page content as Markdown, and json returns structured content using schema."
1942
1966
  ),
1943
- schema: jsonObjectSchema.optional().describe(
1967
+ schema: jsonObjectSchema().optional().describe(
1944
1968
  "JSON Schema for structured extraction. Only use with format set to json."
1945
1969
  )
1946
1970
  })
1947
1971
  )
1948
1972
  );
1949
- var browserbaseFetchOutputSchema = lazySchema10(
1950
- () => zodSchema10(
1973
+ var browserbaseFetchOutputSchema = lazySchema14(
1974
+ () => zodSchema14(
1951
1975
  z15.union([
1952
1976
  z15.object({
1953
1977
  id: z15.string(),
1954
- content: z15.union([z15.string(), jsonObjectSchema]),
1978
+ content: z15.union([z15.string(), jsonObjectSchema()]),
1955
1979
  contentType: z15.string(),
1956
1980
  encoding: z15.string(),
1957
1981
  headers: z15.record(z15.string(), z15.string()),
@@ -1983,20 +2007,20 @@ var browserbaseFetch = (config = {}) => browserbaseFetchToolFactory(config);
1983
2007
  // src/tool/browserbase-search.ts
1984
2008
  import {
1985
2009
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema2,
1986
- lazySchema as lazySchema11,
1987
- zodSchema as zodSchema11
2010
+ lazySchema as lazySchema15,
2011
+ zodSchema as zodSchema15
1988
2012
  } from "@ai-sdk/provider-utils";
1989
2013
  import { z as z16 } from "zod";
1990
- var browserbaseSearchInputSchema = lazySchema11(
1991
- () => zodSchema11(
2014
+ var browserbaseSearchInputSchema = lazySchema15(
2015
+ () => zodSchema15(
1992
2016
  z16.object({
1993
2017
  query: z16.string().min(1).max(200).describe("Web search query. Must be between 1 and 200 characters."),
1994
2018
  num_results: z16.number().int().min(1).max(25).optional().describe("Maximum number of results to return (1-25, default: 10).")
1995
2019
  })
1996
2020
  )
1997
2021
  );
1998
- var browserbaseSearchOutputSchema = lazySchema11(
1999
- () => zodSchema11(
2022
+ var browserbaseSearchOutputSchema = lazySchema15(
2023
+ () => zodSchema15(
2000
2024
  z16.union([
2001
2025
  z16.object({
2002
2026
  query: z16.string(),
@@ -2039,12 +2063,12 @@ var browserbaseSearch = (config = {}) => browserbaseSearchToolFactory(config);
2039
2063
  // src/tool/exa-search.ts
2040
2064
  import {
2041
2065
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema3,
2042
- lazySchema as lazySchema12,
2043
- zodSchema as zodSchema12
2066
+ lazySchema as lazySchema16,
2067
+ zodSchema as zodSchema16
2044
2068
  } from "@ai-sdk/provider-utils";
2045
2069
  import { z as z17 } from "zod";
2046
- var exaSearchInputSchema = lazySchema12(
2047
- () => zodSchema12(
2070
+ var exaSearchInputSchema = lazySchema16(
2071
+ () => zodSchema16(
2048
2072
  z17.object({
2049
2073
  query: z17.string().describe("Natural-language web search query. This is required."),
2050
2074
  type: z17.enum(["auto", "fast", "instant"]).optional().describe(
@@ -2114,8 +2138,8 @@ var exaSearchInputSchema = lazySchema12(
2114
2138
  })
2115
2139
  )
2116
2140
  );
2117
- var exaSearchOutputSchema = lazySchema12(
2118
- () => zodSchema12(
2141
+ var exaSearchOutputSchema = lazySchema16(
2142
+ () => zodSchema16(
2119
2143
  z17.union([
2120
2144
  z17.object({
2121
2145
  requestId: z17.string(),
@@ -2172,12 +2196,12 @@ var exaSearch = (config = {}) => exaSearchToolFactory(config);
2172
2196
  // src/tool/parallel-search.ts
2173
2197
  import {
2174
2198
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema4,
2175
- lazySchema as lazySchema13,
2176
- zodSchema as zodSchema13
2199
+ lazySchema as lazySchema17,
2200
+ zodSchema as zodSchema17
2177
2201
  } from "@ai-sdk/provider-utils";
2178
2202
  import { z as z18 } from "zod";
2179
- var parallelSearchInputSchema = lazySchema13(
2180
- () => zodSchema13(
2203
+ var parallelSearchInputSchema = lazySchema17(
2204
+ () => zodSchema17(
2181
2205
  z18.object({
2182
2206
  objective: z18.string().describe(
2183
2207
  "Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."
@@ -2216,8 +2240,8 @@ var parallelSearchInputSchema = lazySchema13(
2216
2240
  })
2217
2241
  )
2218
2242
  );
2219
- var parallelSearchOutputSchema = lazySchema13(
2220
- () => zodSchema13(
2243
+ var parallelSearchOutputSchema = lazySchema17(
2244
+ () => zodSchema17(
2221
2245
  z18.union([
2222
2246
  // Success response
2223
2247
  z18.object({
@@ -2258,12 +2282,12 @@ var parallelSearch = (config = {}) => parallelSearchToolFactory(config);
2258
2282
  // src/tool/perplexity-search.ts
2259
2283
  import {
2260
2284
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema5,
2261
- lazySchema as lazySchema14,
2262
- zodSchema as zodSchema14
2285
+ lazySchema as lazySchema18,
2286
+ zodSchema as zodSchema18
2263
2287
  } from "@ai-sdk/provider-utils";
2264
2288
  import { z as z19 } from "zod";
2265
- var perplexitySearchInputSchema = lazySchema14(
2266
- () => zodSchema14(
2289
+ var perplexitySearchInputSchema = lazySchema18(
2290
+ () => zodSchema18(
2267
2291
  z19.object({
2268
2292
  query: z19.union([z19.string(), z19.array(z19.string())]).describe(
2269
2293
  "Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."
@@ -2304,8 +2328,8 @@ var perplexitySearchInputSchema = lazySchema14(
2304
2328
  })
2305
2329
  )
2306
2330
  );
2307
- var perplexitySearchOutputSchema = lazySchema14(
2308
- () => zodSchema14(
2331
+ var perplexitySearchOutputSchema = lazySchema18(
2332
+ () => zodSchema18(
2309
2333
  z19.union([
2310
2334
  // Success response
2311
2335
  z19.object({
@@ -2345,11 +2369,11 @@ var perplexitySearch = (config = {}) => perplexitySearchToolFactory(config);
2345
2369
  // src/tool/tako-search.ts
2346
2370
  import {
2347
2371
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6,
2348
- lazySchema as lazySchema15,
2349
- zodSchema as zodSchema15
2372
+ lazySchema as lazySchema19,
2373
+ zodSchema as zodSchema19
2350
2374
  } from "@ai-sdk/provider-utils";
2351
2375
  import { z as z20 } from "zod";
2352
- var takoDataSourceInputSchema = z20.object({
2376
+ var takoDataSourceInputSchema = () => z20.object({
2353
2377
  count: z20.number().optional().describe(
2354
2378
  "Maximum number of data results to return (1-20). When include_contents is true, each additional result adds its own data surcharge."
2355
2379
  ),
@@ -2368,7 +2392,7 @@ var takoDataSourceInputSchema = z20.object({
2368
2392
  "Only return cards matching node_ids. Requires a non-empty node_ids."
2369
2393
  )
2370
2394
  });
2371
- var takoWebSourceInputSchema = z20.object({
2395
+ var takoWebSourceInputSchema = () => z20.object({
2372
2396
  count: z20.number().optional().describe("Maximum number of web results to return (1-20)."),
2373
2397
  include_contents: z20.boolean().optional().describe("Inline extracted web page text. This can add a data charge."),
2374
2398
  category: z20.enum(["finance", "news", "sports"]).optional().describe("Optional web-result category filter."),
@@ -2381,13 +2405,15 @@ var takoWebSourceInputSchema = z20.object({
2381
2405
  article_content_max_chars: z20.number().optional().describe(
2382
2406
  "Maximum extracted characters per web page when including contents."
2383
2407
  ),
2384
- published_after: z20.string().optional().describe("Keep results published on or after this ISO date (YYYY-MM-DD)."),
2408
+ published_after: z20.string().optional().describe(
2409
+ "Keep results published on or after this ISO date (YYYY-MM-DD)."
2410
+ ),
2385
2411
  published_before: z20.string().optional().describe(
2386
2412
  "Keep results published on or before this ISO date (YYYY-MM-DD)."
2387
2413
  )
2388
2414
  });
2389
- var takoSearchInputSchema = lazySchema15(
2390
- () => zodSchema15(
2415
+ var takoSearchInputSchema = lazySchema19(
2416
+ () => zodSchema19(
2391
2417
  z20.object({
2392
2418
  query: z20.string().describe(
2393
2419
  'Natural-language search query. Include the entity, metric, and time period. Quote a phrase to force it to one entity, for example "Tesla":PRODUCT price.'
@@ -2396,8 +2422,8 @@ var takoSearchInputSchema = lazySchema15(
2396
2422
  "Search effort. fast is the balanced default, instant favors cached results and low latency, and deep broadens retrieval with reranking at higher cost and latency."
2397
2423
  ),
2398
2424
  sources: z20.object({
2399
- data: takoDataSourceInputSchema.optional(),
2400
- web: takoWebSourceInputSchema.optional()
2425
+ data: takoDataSourceInputSchema().optional(),
2426
+ web: takoWebSourceInputSchema().optional()
2401
2427
  }).optional().describe(
2402
2428
  "Sources to search. Omit to search both curated data and the web. When provided, only keys present are searched."
2403
2429
  ),
@@ -2418,12 +2444,12 @@ var takoSearchInputSchema = lazySchema15(
2418
2444
  })
2419
2445
  )
2420
2446
  );
2421
- var takoDatasetCellSchema = z20.union([z20.boolean(), z20.number(), z20.string()]).nullable();
2422
- var takoResultContentSchema = z20.object({
2447
+ var takoDatasetCellSchema = () => z20.union([z20.boolean(), z20.number(), z20.string()]).nullable();
2448
+ var takoResultContentSchema = () => z20.object({
2423
2449
  content_format: z20.enum(["card_json", "csv", "json_compact", "json_records"]).nullish(),
2424
2450
  cost: z20.number().optional(),
2425
2451
  data: z20.string().nullish(),
2426
- records: z20.array(z20.record(z20.string(), takoDatasetCellSchema)).nullish(),
2452
+ records: z20.array(z20.record(z20.string(), takoDatasetCellSchema())).nullish(),
2427
2453
  dataset: z20.object({
2428
2454
  columns: z20.array(
2429
2455
  z20.object({
@@ -2432,7 +2458,7 @@ var takoResultContentSchema = z20.object({
2432
2458
  unit: z20.string().nullish()
2433
2459
  })
2434
2460
  ),
2435
- rows: z20.array(z20.array(takoDatasetCellSchema)),
2461
+ rows: z20.array(z20.array(takoDatasetCellSchema())),
2436
2462
  total_rows: z20.number(),
2437
2463
  truncated: z20.boolean(),
2438
2464
  ref: z20.string(),
@@ -2466,7 +2492,7 @@ var takoResultContentSchema = z20.object({
2466
2492
  })
2467
2493
  ).nullish()
2468
2494
  }).passthrough();
2469
- var takoCardSchema = z20.object({
2495
+ var takoCardSchema = () => z20.object({
2470
2496
  card_id: z20.string().nullish(),
2471
2497
  title: z20.string().nullish(),
2472
2498
  description: z20.string().nullish(),
@@ -2492,7 +2518,7 @@ var takoCardSchema = z20.object({
2492
2518
  source_indexes: z20.array(z20.enum(["data", "web"])).nullish(),
2493
2519
  card_type: z20.string().nullish(),
2494
2520
  relevance: z20.enum(["High", "Low", "Medium"]).nullish(),
2495
- content: takoResultContentSchema.nullish(),
2521
+ content: takoResultContentSchema().nullish(),
2496
2522
  exportable: z20.boolean().optional(),
2497
2523
  nodes: z20.array(
2498
2524
  z20.object({
@@ -2509,21 +2535,21 @@ var takoCardSchema = z20.object({
2509
2535
  last_updated: z20.string().nullish()
2510
2536
  }).nullish()
2511
2537
  }).passthrough();
2512
- var takoWebResultSchema = z20.object({
2538
+ var takoWebResultSchema = () => z20.object({
2513
2539
  title: z20.string(),
2514
2540
  url: z20.string(),
2515
2541
  snippet: z20.string().nullish(),
2516
2542
  source_name: z20.string().nullish(),
2517
2543
  publish_date: z20.string().nullish(),
2518
- content: takoResultContentSchema.nullish()
2544
+ content: takoResultContentSchema().nullish()
2519
2545
  }).passthrough();
2520
- var takoSearchOutputSchema = lazySchema15(
2521
- () => zodSchema15(
2546
+ var takoSearchOutputSchema = lazySchema19(
2547
+ () => zodSchema19(
2522
2548
  z20.union([
2523
2549
  z20.object({
2524
2550
  request_id: z20.string(),
2525
- cards: z20.array(takoCardSchema).optional(),
2526
- web_results: z20.array(takoWebResultSchema).optional(),
2551
+ cards: z20.array(takoCardSchema()).optional(),
2552
+ web_results: z20.array(takoWebResultSchema()).optional(),
2527
2553
  usage: z20.object({
2528
2554
  total_cost_usd: z20.number(),
2529
2555
  compute: z20.object({ cost_usd: z20.number() }).nullish(),
@@ -2615,7 +2641,7 @@ async function getVercelRequestId() {
2615
2641
  }
2616
2642
 
2617
2643
  // src/version.ts
2618
- var VERSION = true ? "3.0.218" : "0.0.0-test";
2644
+ var VERSION = true ? "3.0.219" : "0.0.0-test";
2619
2645
 
2620
2646
  // src/gateway-provider.ts
2621
2647
  var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";