@ai-sdk/gateway 4.0.119 → 4.0.121

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @ai-sdk/gateway
2
2
 
3
+ ## 4.0.121
4
+
5
+ ### Patch Changes
6
+
7
+ - f1b550e: Defer construction of provider validation schemas until first use to reduce package import time.
8
+ - Updated dependencies [b089ce8]
9
+ - Updated dependencies [39a776b]
10
+ - @ai-sdk/provider-utils@5.0.65
11
+
12
+ ## 4.0.120
13
+
14
+ ### Patch Changes
15
+
16
+ - 9bec2c3: chore(provider/gateway): update gateway model settings files
17
+
3
18
  ## 4.0.119
4
19
 
5
20
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -103,7 +103,7 @@ type GatewayEmbeddingModelId = 'alibaba/qwen3-embedding-0.6b' | 'alibaba/qwen3-e
103
103
  type GatewayImageModelId = 'bfl/flux-2-flex' | 'bfl/flux-2-klein-4b' | 'bfl/flux-2-klein-9b' | 'bfl/flux-2-max' | 'bfl/flux-2-pro' | 'bfl/flux-3-image' | 'bfl/flux-3-image-klein' | 'bfl/flux-kontext-max' | 'bfl/flux-kontext-pro' | 'bfl/flux-pro-1.0-fill' | 'bfl/flux-pro-1.1' | 'bfl/flux-pro-1.1-ultra' | 'bytedance/seedream-4.0' | 'bytedance/seedream-4.5' | 'bytedance/seedream-5.0-lite' | 'bytedance/seedream-5.0-pro' | 'meta/muse-image-1.0' | 'microsoft/mai-image-2.6' | 'microsoft/mai-image-2.6-flash' | 'openai/gpt-image-1' | 'openai/gpt-image-1-mini' | 'openai/gpt-image-1.5' | 'openai/gpt-image-2' | 'openai/gpt-image-2.5-flare' | 'openai/gpt-image-2.5-sunburst' | 'prodia/flux-fast-schnell' | 'recraft/recraft-v2' | 'recraft/recraft-v3' | 'recraft/recraft-v4' | 'recraft/recraft-v4-pro' | 'recraft/recraft-v4.1' | 'recraft/recraft-v4.1-flash' | 'recraft/recraft-v4.1-pro' | 'recraft/recraft-v4.1-utility' | 'recraft/recraft-v4.1-utility-pro' | 'spacexai/grok-imagine-image' | 'spacexai/grok-imagine-image-2.0' | 'topaz/wonder-3.5' | (string & {});
104
104
  //#endregion
105
105
  //#region src/gateway-language-model-settings.d.ts
106
- type GatewayModelId = 'alibaba/qwen-3-14b' | 'alibaba/qwen-3-235b' | 'alibaba/qwen-3-30b' | 'alibaba/qwen-3-32b' | 'alibaba/qwen3-coder' | 'alibaba/qwen3-coder-30b-a3b' | 'alibaba/qwen3-coder-next' | 'alibaba/qwen3-max-thinking' | 'alibaba/qwen3-next-80b-a3b-instruct' | 'alibaba/qwen3-next-80b-a3b-thinking' | 'alibaba/qwen3-vl-instruct' | 'alibaba/qwen3.5-flash' | 'alibaba/qwen3.5-plus' | 'alibaba/qwen3.6-27b' | 'alibaba/qwen3.6-plus' | 'alibaba/qwen3.7-flash' | 'alibaba/qwen3.7-max' | 'alibaba/qwen3.7-plus' | 'alibaba/qwen3.8-2.4t-a95b' | 'alibaba/qwen3.8-27b' | 'alibaba/qwen3.8-flash' | 'alibaba/qwen3.8-max' | 'alibaba/qwen3.8-max-0902' | 'alibaba/qwen3.8-max-prime' | 'alibaba/qwen3.8-omni-flash' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-fable-5' | 'anthropic/claude-fable-5-batch' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-fable-5.1-batch' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-haiku-4.5-batch' | 'anthropic/claude-haiku-5.5' | 'anthropic/claude-haiku-5.5-batch' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.5-batch' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.6-batch' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.7-batch' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.8-batch' | 'anthropic/claude-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-batch' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5.5-batch' | 'anthropic/claude-opus-5.5-fast' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.5-batch' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-4.6-batch' | 'anthropic/claude-sonnet-5' | 'anthropic/claude-sonnet-5-batch' | 'anthropic/claude-sonnet-5.5' | 'anthropic/claude-sonnet-5.5-batch' | 'arcee-ai/trinity-large-thinking' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'bytedance/seed-2.1-turbo' | 'callstack/apex' | 'cohere/command-a' | 'deepseek/deepseek-r1' | 'deepseek/deepseek-v3.1' | 'deepseek/deepseek-v3.2' | 'deepseek/deepseek-v3.2-thinking' | 'deepseek/deepseek-v4-flash' | 'deepseek/deepseek-v4-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | 'deepseek/deepseek-v4.1-flash' | 'deepseek/deepseek-v4.1-flash-1017' | 'deepseek/deepseek-v4.1-flash-1017-fast' | 'deepseek/deepseek-v4.1-flash-fast' | 'elorian/glimpse' | 'fireworks/ember-1' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-batch' | 'google/gemini-2.5-flash-image' | 'google/gemini-2.5-flash-lite' | 'google/gemini-2.5-flash-lite-batch' | 'google/gemini-2.5-pro' | 'google/gemini-2.5-pro-batch' | 'google/gemini-3-flash' | 'google/gemini-3-flash-batch' | 'google/gemini-3-pro-image' | 'google/gemini-3.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-batch' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.1-pro-preview-batch' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-batch' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.5-flash-lite-batch' | 'google/gemini-3.6-flash' | 'google/gemini-3.6-flash-batch' | 'google/gemini-3.7-flash' | 'google/gemini-3.7-flash-batch' | 'google/gemini-3.8-flash' | 'google/gemini-4-argon' | 'google/gemini-nano-banana-2.1' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-2.5' | 'inception/mercury-coder-small' | 'inclusionai/ling-3.0-flash' | 'inclusionai/ling-3.0-flash-fin' | 'inclusionai/ling-3.0-flash-sante' | 'inclusionai/ling-3.0-flash-vl' | 'inclusionai/ling-3.1-flash' | 'inference-net/schematron-v2-small' | 'inference-net/schematron-v2-turbo' | 'interfaze/interfaze-beta' | 'liquid/lfm2.5-24b-a2b' | 'meituan/longcat-2.5-preview' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | 'meta/llama-3.3-70b' | 'meta/llama-4-maverick' | 'meta/llama-4-scout' | 'meta/muse-glimmer-30b' | 'meta/muse-spark-1.1' | 'meta/muse-spark-1.2' | 'meta/muse-spark-1.2-contributor' | 'meta/muse-spark-1.3' | 'meta/muse-spark-1.3-contributor' | 'meta/muse-spark-open' | 'meta/muse-wonder-1.0' | 'minimax/minimax-m2' | 'minimax/minimax-m2.1' | 'minimax/minimax-m2.1-lightning' | 'minimax/minimax-m2.5' | 'minimax/minimax-m2.5-highspeed' | 'minimax/minimax-m2.7' | 'minimax/minimax-m2.7-highspeed' | 'minimax/minimax-m3' | 'minimax/minimax-m3.1-flash' | 'mistral/codestral' | 'mistral/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-large-4' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mixedbread/toast-1' | 'moonshotai/kimi-k2' | 'moonshotai/kimi-k2.5' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.7-code' | 'moonshotai/kimi-k2.7-code-highspeed' | 'moonshotai/kimi-k3' | 'moonshotai/kimi-k3-fast' | 'morph/morph-v3-fast' | 'morph/morph-v3-large' | 'nvidia/nemotron-3-nano-30b-a3b' | 'nvidia/nemotron-3-super-120b-a12b' | 'nvidia/nemotron-3-ultra-550b-a55b' | 'nvidia/nemotron-3.5-lightning' | 'nvidia/nemotron-3.5-lightning-free' | 'nvidia/nemotron-3.5-super-vl' | 'nvidia/nemotron-nano-12b-v2-vl' | 'nvidia/nemotron-nano-9b-v2' | 'openai/gpt-3.5-turbo' | 'openai/gpt-4-turbo' | 'openai/gpt-4.1' | 'openai/gpt-4.1-batch' | 'openai/gpt-4.1-fast' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-mini-batch' | 'openai/gpt-4.1-mini-fast' | 'openai/gpt-4.1-nano' | 'openai/gpt-4.1-nano-batch' | 'openai/gpt-4.1-nano-fast' | 'openai/gpt-4o' | 'openai/gpt-4o-batch' | 'openai/gpt-4o-fast' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-batch' | 'openai/gpt-4o-mini-fast' | 'openai/gpt-5' | 'openai/gpt-5-batch' | 'openai/gpt-5-codex' | 'openai/gpt-5-fast' | 'openai/gpt-5-mini' | 'openai/gpt-5-mini-batch' | 'openai/gpt-5-mini-fast' | 'openai/gpt-5-nano' | 'openai/gpt-5-nano-batch' | 'openai/gpt-5-pro' | 'openai/gpt-5-pro-batch' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-5.1-codex-mini' | 'openai/gpt-5.1-thinking' | 'openai/gpt-5.1-thinking-fast' | 'openai/gpt-5.2' | 'openai/gpt-5.2-batch' | 'openai/gpt-5.2-codex' | 'openai/gpt-5.2-fast' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.3-codex' | 'openai/gpt-5.3-codex-fast' | 'openai/gpt-5.4' | 'openai/gpt-5.4-batch' | 'openai/gpt-5.4-fast' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-mini-batch' | 'openai/gpt-5.4-mini-fast' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-nano-batch' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-batch' | 'openai/gpt-5.5-fast' | 'openai/gpt-5.5-pro' | 'openai/gpt-5.5-pro-batch' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.6-luna-batch' | 'openai/gpt-5.6-luna-fast' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-sol-batch' | 'openai/gpt-5.6-sol-fast' | 'openai/gpt-5.6-terra' | 'openai/gpt-5.6-terra-batch' | 'openai/gpt-5.6-terra-fast' | 'openai/gpt-6-astra' | 'openai/gpt-6-astra-batch' | 'openai/gpt-6-astra-fast' | 'openai/gpt-6-luna' | 'openai/gpt-6-luna-batch' | 'openai/gpt-6-luna-fast' | 'openai/gpt-6-sol' | 'openai/gpt-6-sol-batch' | 'openai/gpt-6-sol-fast' | 'openai/gpt-6.1-sol' | 'openai/gpt-6.1-sol-batch' | 'openai/gpt-6.1-sol-fast' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-120b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-fast' | 'openai/o3-mini' | 'openai/o3-pro' | 'openai/o4-mini' | 'openai/o4-mini-fast' | 'perplexity/sonar' | 'poolside/laguna-s-2.1' | 'poolside/laguna-s-2.1-free' | 'quiverai/arrow-2' | 'quiverai/arrow-2-telos' | 'reflection/beam' | 'reflection/beam-free' | 'sakana/fugu-max' | 'sakana/fugu-ultra' | 'sakana/fugu-ultra-v2' | 'sakana/namazu' | 'spacexai/grok-4.1-fast-non-reasoning' | 'spacexai/grok-4.1-fast-reasoning' | 'spacexai/grok-4.20-multi-agent' | 'spacexai/grok-4.20-multi-agent-batch' | 'spacexai/grok-4.20-multi-agent-beta' | 'spacexai/grok-4.20-non-reasoning' | 'spacexai/grok-4.20-non-reasoning-batch' | 'spacexai/grok-4.20-non-reasoning-beta' | 'spacexai/grok-4.20-reasoning' | 'spacexai/grok-4.20-reasoning-batch' | 'spacexai/grok-4.20-reasoning-beta' | 'spacexai/grok-4.3' | 'spacexai/grok-4.3-batch' | 'spacexai/grok-4.5' | 'spacexai/grok-4.6' | 'spacexai/grok-4.7' | 'spacexai/grok-build-0.1' | 'stealth/cat-jam' | 'stealth/glyph-cluster' | 'stepfun/step-3.7-flash' | 'stepfun/step-5-preview' | 'tencent/hy-mt2-lite' | 'tencent/hy-mt2-plus' | 'tencent/hy-mt2-pro' | 'tencent/hy3' | 'tencent/hy4-preview' | 'thinkingmachines/inkling' | 'thinkingmachines/inkling-small' | 'xiaomi/mimo-v2.5' | 'xiaomi/mimo-v2.5-pro' | 'xiaomi/mimo-v2.6-flash' | 'xiaomi/mimo-v2.6-pro' | 'xiaomi/mimo-v2.6-pro-ultraspeed' | 'zai/glm-4.5' | 'zai/glm-4.5-air' | 'zai/glm-4.5v' | 'zai/glm-4.6' | 'zai/glm-4.7' | 'zai/glm-4.7-flash' | 'zai/glm-4.7-flashx' | 'zai/glm-5' | 'zai/glm-5-turbo' | 'zai/glm-5.1' | 'zai/glm-5.2' | 'zai/glm-5.2-fast' | 'zai/glm-5.3' | 'zai/glm-5.3-fast' | 'zai/glm-5.3-flash' | 'zai/glm-5.3-flashx' | 'zai/glm-5v-turbo' | (string & {});
106
+ type GatewayModelId = 'alibaba/qwen-3-14b' | 'alibaba/qwen-3-235b' | 'alibaba/qwen-3-30b' | 'alibaba/qwen-3-32b' | 'alibaba/qwen3-coder' | 'alibaba/qwen3-coder-30b-a3b' | 'alibaba/qwen3-coder-next' | 'alibaba/qwen3-max-thinking' | 'alibaba/qwen3-next-80b-a3b-instruct' | 'alibaba/qwen3-next-80b-a3b-thinking' | 'alibaba/qwen3-vl-instruct' | 'alibaba/qwen3.5-flash' | 'alibaba/qwen3.5-plus' | 'alibaba/qwen3.6-27b' | 'alibaba/qwen3.6-plus' | 'alibaba/qwen3.7-flash' | 'alibaba/qwen3.7-max' | 'alibaba/qwen3.7-plus' | 'alibaba/qwen3.8-2.4t-a95b' | 'alibaba/qwen3.8-27b' | 'alibaba/qwen3.8-flash' | 'alibaba/qwen3.8-max' | 'alibaba/qwen3.8-max-0902' | 'alibaba/qwen3.8-max-prime' | 'alibaba/qwen3.8-omni-flash' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-fable-5' | 'anthropic/claude-fable-5-batch' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-fable-5.1-batch' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-haiku-4.5-batch' | 'anthropic/claude-haiku-5.5' | 'anthropic/claude-haiku-5.5-batch' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.5-batch' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.6-batch' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.7-batch' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.8-batch' | 'anthropic/claude-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-batch' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5.5-batch' | 'anthropic/claude-opus-5.5-fast' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.5-batch' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-4.6-batch' | 'anthropic/claude-sonnet-5' | 'anthropic/claude-sonnet-5-batch' | 'anthropic/claude-sonnet-5.5' | 'anthropic/claude-sonnet-5.5-batch' | 'arcee-ai/trinity-large-thinking' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'bytedance/seed-2.1-turbo' | 'callstack/apex' | 'cohere/command-a' | 'deepseek/deepseek-r1' | 'deepseek/deepseek-v3.1' | 'deepseek/deepseek-v3.2' | 'deepseek/deepseek-v3.2-thinking' | 'deepseek/deepseek-v4-flash' | 'deepseek/deepseek-v4-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | 'deepseek/deepseek-v4.1-flash' | 'deepseek/deepseek-v4.1-flash-1017' | 'deepseek/deepseek-v4.1-flash-1017-fast' | 'deepseek/deepseek-v4.1-flash-fast' | 'elorian/glimpse' | 'fireworks/ember-1' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-batch' | 'google/gemini-2.5-flash-image' | 'google/gemini-2.5-flash-lite' | 'google/gemini-2.5-flash-lite-batch' | 'google/gemini-2.5-pro' | 'google/gemini-2.5-pro-batch' | 'google/gemini-3-flash' | 'google/gemini-3-flash-batch' | 'google/gemini-3-pro-image' | 'google/gemini-3.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-batch' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.1-pro-preview-batch' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-batch' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.5-flash-lite-batch' | 'google/gemini-3.6-flash' | 'google/gemini-3.6-flash-batch' | 'google/gemini-3.7-flash' | 'google/gemini-3.7-flash-batch' | 'google/gemini-3.8-flash' | 'google/gemini-4-argon' | 'google/gemini-nano-banana-2.1' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-2.5' | 'inception/mercury-3' | 'inception/mercury-coder-small' | 'inclusionai/ling-3.0-flash' | 'inclusionai/ling-3.0-flash-fin' | 'inclusionai/ling-3.0-flash-sante' | 'inclusionai/ling-3.0-flash-vl' | 'inclusionai/ling-3.1-flash' | 'inference-net/schematron-v2-small' | 'inference-net/schematron-v2-turbo' | 'interfaze/interfaze-beta' | 'liquid/lfm2.5-24b-a2b' | 'meituan/longcat-2.5-preview' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | 'meta/llama-3.3-70b' | 'meta/llama-4-maverick' | 'meta/llama-4-scout' | 'meta/muse-glimmer-30b' | 'meta/muse-spark-1.1' | 'meta/muse-spark-1.2' | 'meta/muse-spark-1.2-contributor' | 'meta/muse-spark-1.3' | 'meta/muse-spark-1.3-contributor' | 'meta/muse-spark-open' | 'meta/muse-wonder-1.0' | 'minimax/minimax-m2' | 'minimax/minimax-m2.1' | 'minimax/minimax-m2.1-lightning' | 'minimax/minimax-m2.5' | 'minimax/minimax-m2.5-highspeed' | 'minimax/minimax-m2.7' | 'minimax/minimax-m2.7-highspeed' | 'minimax/minimax-m3' | 'minimax/minimax-m3.1-flash' | 'mistral/codestral' | 'mistral/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-large-4' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mixedbread/toast-1' | 'moonshotai/kimi-k2' | 'moonshotai/kimi-k2.5' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.7-code' | 'moonshotai/kimi-k2.7-code-highspeed' | 'moonshotai/kimi-k3' | 'moonshotai/kimi-k3-fast' | 'morph/morph-v3-fast' | 'morph/morph-v3-large' | 'nvidia/nemotron-3-nano-30b-a3b' | 'nvidia/nemotron-3-super-120b-a12b' | 'nvidia/nemotron-3-ultra-550b-a55b' | 'nvidia/nemotron-3.5-lightning' | 'nvidia/nemotron-3.5-lightning-free' | 'nvidia/nemotron-3.5-super-vl' | 'nvidia/nemotron-nano-12b-v2-vl' | 'nvidia/nemotron-nano-9b-v2' | 'openai/gpt-3.5-turbo' | 'openai/gpt-4-turbo' | 'openai/gpt-4.1' | 'openai/gpt-4.1-batch' | 'openai/gpt-4.1-fast' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-mini-batch' | 'openai/gpt-4.1-mini-fast' | 'openai/gpt-4.1-nano' | 'openai/gpt-4.1-nano-batch' | 'openai/gpt-4.1-nano-fast' | 'openai/gpt-4o' | 'openai/gpt-4o-batch' | 'openai/gpt-4o-fast' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-batch' | 'openai/gpt-4o-mini-fast' | 'openai/gpt-5' | 'openai/gpt-5-batch' | 'openai/gpt-5-codex' | 'openai/gpt-5-fast' | 'openai/gpt-5-mini' | 'openai/gpt-5-mini-batch' | 'openai/gpt-5-mini-fast' | 'openai/gpt-5-nano' | 'openai/gpt-5-nano-batch' | 'openai/gpt-5-pro' | 'openai/gpt-5-pro-batch' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-5.1-codex-mini' | 'openai/gpt-5.1-thinking' | 'openai/gpt-5.1-thinking-fast' | 'openai/gpt-5.2' | 'openai/gpt-5.2-batch' | 'openai/gpt-5.2-codex' | 'openai/gpt-5.2-fast' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.3-codex' | 'openai/gpt-5.3-codex-fast' | 'openai/gpt-5.4' | 'openai/gpt-5.4-batch' | 'openai/gpt-5.4-fast' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-mini-batch' | 'openai/gpt-5.4-mini-fast' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-nano-batch' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-batch' | 'openai/gpt-5.5-fast' | 'openai/gpt-5.5-pro' | 'openai/gpt-5.5-pro-batch' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.6-luna-batch' | 'openai/gpt-5.6-luna-fast' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-sol-batch' | 'openai/gpt-5.6-sol-fast' | 'openai/gpt-5.6-terra' | 'openai/gpt-5.6-terra-batch' | 'openai/gpt-5.6-terra-fast' | 'openai/gpt-6-astra' | 'openai/gpt-6-astra-batch' | 'openai/gpt-6-astra-fast' | 'openai/gpt-6-luna' | 'openai/gpt-6-luna-batch' | 'openai/gpt-6-luna-fast' | 'openai/gpt-6-sol' | 'openai/gpt-6-sol-batch' | 'openai/gpt-6-sol-fast' | 'openai/gpt-6.1-sol' | 'openai/gpt-6.1-sol-batch' | 'openai/gpt-6.1-sol-fast' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-120b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-fast' | 'openai/o3-mini' | 'openai/o3-pro' | 'openai/o4-mini' | 'openai/o4-mini-fast' | 'perplexity/sonar' | 'poolside/laguna-s-2.1' | 'poolside/laguna-s-2.1-free' | 'quiverai/arrow-2' | 'quiverai/arrow-2-telos' | 'reflection/beam' | 'reflection/beam-free' | 'sakana/fugu-max' | 'sakana/fugu-ultra' | 'sakana/fugu-ultra-v2' | 'sakana/namazu' | 'spacexai/grok-4.1-fast-non-reasoning' | 'spacexai/grok-4.1-fast-reasoning' | 'spacexai/grok-4.20-multi-agent' | 'spacexai/grok-4.20-multi-agent-batch' | 'spacexai/grok-4.20-multi-agent-beta' | 'spacexai/grok-4.20-non-reasoning' | 'spacexai/grok-4.20-non-reasoning-batch' | 'spacexai/grok-4.20-non-reasoning-beta' | 'spacexai/grok-4.20-reasoning' | 'spacexai/grok-4.20-reasoning-batch' | 'spacexai/grok-4.20-reasoning-beta' | 'spacexai/grok-4.3' | 'spacexai/grok-4.3-batch' | 'spacexai/grok-4.5' | 'spacexai/grok-4.6' | 'spacexai/grok-4.7' | 'spacexai/grok-build-0.1' | 'stealth/glyph-cluster' | 'stepfun/step-3.7-flash' | 'stepfun/step-5-preview' | 'tencent/hy-mt2-lite' | 'tencent/hy-mt2-plus' | 'tencent/hy-mt2-pro' | 'tencent/hy3' | 'tencent/hy4-preview' | 'thinkingmachines/inkling' | 'thinkingmachines/inkling-small' | 'xiaomi/mimo-v2.5' | 'xiaomi/mimo-v2.5-pro' | 'xiaomi/mimo-v2.6-flash' | 'xiaomi/mimo-v2.6-pro' | 'xiaomi/mimo-v2.6-pro-ultraspeed' | 'zai/glm-4.5' | 'zai/glm-4.5-air' | 'zai/glm-4.5v' | 'zai/glm-4.6' | 'zai/glm-4.7' | 'zai/glm-4.7-flash' | 'zai/glm-4.7-flashx' | 'zai/glm-5' | 'zai/glm-5-turbo' | 'zai/glm-5.1' | 'zai/glm-5.2' | 'zai/glm-5.2-fast' | 'zai/glm-5.3' | 'zai/glm-5.3-fast' | 'zai/glm-5.3-flash' | 'zai/glm-5.3-flashx' | 'zai/glm-5v-turbo' | (string & {});
107
107
  //#endregion
108
108
  //#region src/gateway-realtime-auth.d.ts
109
109
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["_$__tool_browserbase_fetch0.BrowserbaseFetchConfig","_$__tool_browserbase_fetch0.browserbaseFetchToolFactory","_$__tool_browserbase_search0.BrowserbaseSearchConfig","_$__tool_browserbase_search0.browserbaseSearchToolFactory","_$__tool_exa_search0.ExaSearchConfig","_$__tool_exa_search0.exaSearchToolFactory","_$__tool_parallel_search0.ParallelSearchConfig","_$__tool_parallel_search0.parallelSearchToolFactory","_$__tool_perplexity_search0.PerplexitySearchConfig","_$__tool_perplexity_search0.perplexitySearchToolFactory","_$__tool_tako_search0.TakoSearchConfig","_$__tool_tako_search0.takoSearchToolFactory","BatchV4","RealtimeFactoryV4","symbol","symbol","symbol","symbol","symbol","symbol","symbol","symbol","symbol"],"sources":["../src/gateway-decision-model-settings.ts","../src/gateway-provider-options.ts","../src/gateway-embedding-model-settings.ts","../src/gateway-image-model-settings.ts","../src/gateway-language-model-settings.ts","../src/gateway-realtime-auth.ts","../src/gateway-realtime-model-settings.ts","../src/gateway-reranking-model-settings.ts","../src/gateway-speech-model-settings.ts","../src/gateway-transcription-model-settings.ts","../src/gateway-video-model-settings.ts","../src/gateway-model-entry.ts","../src/gateway-fetch-metadata.ts","../src/gateway-spend-report.ts","../src/gateway-generation-info.ts","../src/tool/browserbase-fetch.ts","../src/tool/browserbase-search.ts","../src/tool/exa-search.ts","../src/tool/parallel-search.ts","../src/tool/perplexity-search.ts","../src/tool/tako-search.ts","../src/gateway-tools.ts","../src/gateway-provider.ts","../src/gateway-provider-metadata.ts","../src/errors/gateway-error.ts","../src/errors/create-gateway-error.ts","../src/errors/gateway-authentication-error.ts","../src/errors/gateway-failed-dependency-error.ts","../src/errors/gateway-forbidden-error.ts","../src/errors/gateway-internal-server-error.ts","../src/errors/gateway-invalid-request-error.ts","../src/errors/gateway-model-not-found-error.ts","../src/errors/gateway-not-found-error.ts","../src/errors/gateway-rate-limit-error.ts","../src/errors/gateway-response-error.ts","../src/version.ts","../src/index.ts"],"mappings":";;;KAAY;;;;;;;;;;KC0BA,0BAA0B,uCAClC;EAAqB,WAAW;EAAa;KAC7C;EACE,WAAW;EACX;KAEF;EAAqB,KAAK,8BAA8B;KACxD;EAAqB,KAAK,8BAA8B;KACxD;EACE;IACE;IACA,YAAY,8BAA8B;;;KAItC,qBAAqB;EAG3B;EACA,MAAM,0BAA0B;;KAG1B,uBAAuB;;;;;GAKhC;;EAGD,OAAO,eAAe,MAAM;;EAG5B;;EAGA;;;;;;;;;;;;;EAcA,MAAM;;;;;EAcN;;;;;;;;EASA,SAAS,yBAAyB;;EAGlC;;EAGA;;EAGA;IACE,OAAO;;;EAIT;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;KAGG,8BAA8B,+BACjC,0BAA0B,iBACvB,0BAA0B;KAG1B;KASA,mBAAmB,aAAa,eAClC,OAAO,QAAQ,oBAAoB;KAGjC,gCAAgC,8BAA8B,QACjE,qBAAqB;KAIlB,yBAAyB,0CAEzB,gCAAgC;;;KC5JzB;;;KCAA;;;KCAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC2BC;;;;;qBAMA;;qBAGA;;qBAGA;;;;;wBAMG,4BACd,eACA;EAAY;;;;;;wBASE,iCACd,eACA;EAAY;;;;;;;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SACA,OACA;IAEA;IACA;IACA;IACA;IACA;;SAMK,WAAW,iBAAiB,SAAS;;;;cCvCxCC;;;;;;qBAOO,6BAA6B;oBACtBA;WAET;WACA;EAEG,cACV,SACA,YACA,OACA;IAEA;IACA;IACA;IACA;;SAKK,WAAW,iBAAiB,SAAS;;;;cC3BxCC;;;;qBAKO,8BAA8B;oBACvBA;WAET;WACA;EAEG,cACV,SACA,YACA,OACA;IAEA;IACA;IACA;IACA;;SAKK,WAAW,iBAAiB,SAAS;;;;cCxBxC;;;;qBAKO,6BAA6B;oBACtB;WAET;WACA;WACA;WACA,kBAAkB;EAEf,cACV,SACA,YACA,UACA,iBACA,OACA,cACA;IAEA;IACA;IACA;IACA,kBAAkB;IAClB;IACA;IACA;;SAOK,WAAW,iBAAiB,SAAS;;;;qBCtCjC;;;;YCwED,2BAA2B;;YAE3B,4BAA4B,uCACtC,0BAA0B"}
1
+ {"version":3,"file":"index.d.ts","names":["_$__tool_browserbase_fetch0.BrowserbaseFetchConfig","_$__tool_browserbase_fetch0.browserbaseFetchToolFactory","_$__tool_browserbase_search0.BrowserbaseSearchConfig","_$__tool_browserbase_search0.browserbaseSearchToolFactory","_$__tool_exa_search0.ExaSearchConfig","_$__tool_exa_search0.exaSearchToolFactory","_$__tool_parallel_search0.ParallelSearchConfig","_$__tool_parallel_search0.parallelSearchToolFactory","_$__tool_perplexity_search0.PerplexitySearchConfig","_$__tool_perplexity_search0.perplexitySearchToolFactory","_$__tool_tako_search0.TakoSearchConfig","_$__tool_tako_search0.takoSearchToolFactory","BatchV4","RealtimeFactoryV4","symbol","symbol","symbol","symbol","symbol","symbol","symbol","symbol","symbol"],"sources":["../src/gateway-decision-model-settings.ts","../src/gateway-provider-options.ts","../src/gateway-embedding-model-settings.ts","../src/gateway-image-model-settings.ts","../src/gateway-language-model-settings.ts","../src/gateway-realtime-auth.ts","../src/gateway-realtime-model-settings.ts","../src/gateway-reranking-model-settings.ts","../src/gateway-speech-model-settings.ts","../src/gateway-transcription-model-settings.ts","../src/gateway-video-model-settings.ts","../src/gateway-model-entry.ts","../src/gateway-fetch-metadata.ts","../src/gateway-spend-report.ts","../src/gateway-generation-info.ts","../src/tool/browserbase-fetch.ts","../src/tool/browserbase-search.ts","../src/tool/exa-search.ts","../src/tool/parallel-search.ts","../src/tool/perplexity-search.ts","../src/tool/tako-search.ts","../src/gateway-tools.ts","../src/gateway-provider.ts","../src/gateway-provider-metadata.ts","../src/errors/gateway-error.ts","../src/errors/create-gateway-error.ts","../src/errors/gateway-authentication-error.ts","../src/errors/gateway-failed-dependency-error.ts","../src/errors/gateway-forbidden-error.ts","../src/errors/gateway-internal-server-error.ts","../src/errors/gateway-invalid-request-error.ts","../src/errors/gateway-model-not-found-error.ts","../src/errors/gateway-not-found-error.ts","../src/errors/gateway-rate-limit-error.ts","../src/errors/gateway-response-error.ts","../src/version.ts","../src/index.ts"],"mappings":";;;KAAY;;;;;;;;;;KC0BA,0BAA0B,uCAClC;EAAqB,WAAW;EAAa;KAC7C;EACE,WAAW;EACX;KAEF;EAAqB,KAAK,8BAA8B;KACxD;EAAqB,KAAK,8BAA8B;KACxD;EACE;IACE;IACA,YAAY,8BAA8B;;;KAItC,qBAAqB;EAG3B;EACA,MAAM,0BAA0B;;KAG1B,uBAAuB;;;;;GAKhC;;EAGD,OAAO,eAAe,MAAM;;EAG5B;;EAGA;;;;;;;;;;;;;EAcA,MAAM;;;;;EAcN;;;;;;;;EASA,SAAS,yBAAyB;;EAGlC;;EAGA;;EAGA;IACE,OAAO;;;EAIT;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;KAGG,8BAA8B,+BACjC,0BAA0B,iBACvB,0BAA0B;KAG1B;KASA,mBAAmB,aAAa,eAClC,OAAO,QAAQ,oBAAoB;KAGjC,gCAAgC,8BAA8B,QACjE,qBAAqB;KAIlB,yBAAyB,0CAEzB,gCAAgC;;;KC5JzB;;;KCAA;;;KCAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC2BC;;;;;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BAAiB,SAAS;;;;cCvBxCC;;;;qBAaO,kCAAkC;oBAC3BA;WAET;WACA;WACA;EAEG,cACV,SACA,YACA,SACA,OACA;IAEA;IACA;IACA;IACA;IACA;;SAMK,WAAW,iBAAiB,SAAS;;;;cCvCxCC;;;;;;qBAOO,6BAA6B;oBACtBA;WAET;WACA;EAEG,cACV,SACA,YACA,OACA;IAEA;IACA;IACA;IACA;;SAKK,WAAW,iBAAiB,SAAS;;;;cC3BxCC;;;;qBAKO,8BAA8B;oBACvBA;WAET;WACA;EAEG,cACV,SACA,YACA,OACA;IAEA;IACA;IACA;IACA;;SAKK,WAAW,iBAAiB,SAAS;;;;cCxBxC;;;;qBAKO,6BAA6B;oBACtB;WAET;WACA;WACA;WACA,kBAAkB;EAEf,cACV,SACA,YACA,UACA,iBACA,OACA,cACA;IAEA;IACA;IACA;IACA,kBAAkB;IAClB;IACA;IACA;;SAOK,WAAW,iBAAiB,SAAS;;;;qBCtCjC;;;;YCwED,2BAA2B;;YAE3B,4BAA4B,uCACtC,0BAA0B"}
package/dist/index.js CHANGED
@@ -1086,7 +1086,7 @@ async function* convertGatewayBatchResultLines(lines) {
1086
1086
  yield item;
1087
1087
  }
1088
1088
  }
1089
- const gatewayBatchItemResultLineSchema = z.object({
1089
+ const gatewayBatchItemResultLineSchema = lazySchema(() => zodSchema(z.object({
1090
1090
  type: z.literal("text"),
1091
1091
  id: z.string(),
1092
1092
  status: z.enum([
@@ -1095,41 +1095,41 @@ const gatewayBatchItemResultLineSchema = z.object({
1095
1095
  "failed",
1096
1096
  "succeeded"
1097
1097
  ])
1098
- }).catchall(z.unknown());
1099
- const gatewayBatchErrorSchema = z.object({
1098
+ }).catchall(z.unknown())));
1099
+ const gatewayBatchErrorSchema = () => z.object({
1100
1100
  message: z.string(),
1101
1101
  type: z.string().nullish(),
1102
1102
  code: z.string().nullish(),
1103
1103
  statusCode: z.number().nullish()
1104
1104
  });
1105
- const gatewayBatchRequestCountsSchema = z.object({
1105
+ const gatewayBatchRequestCountsSchema = () => z.object({
1106
1106
  total: z.number().nullish(),
1107
1107
  pending: z.number().nullish(),
1108
1108
  completed: z.number().nullish(),
1109
1109
  failed: z.number().nullish()
1110
1110
  });
1111
- const gatewayBatchProviderMetadataSchema = z.record(z.string(), z.record(z.string(), z.unknown()));
1112
- const gatewayBatchStatusFieldsSchema = z.object({
1111
+ const gatewayBatchProviderMetadataSchema = () => z.record(z.string(), z.record(z.string(), z.unknown()));
1112
+ const gatewayBatchStatusFieldsSchema = () => z.object({
1113
1113
  status: z.enum([
1114
1114
  "completed",
1115
1115
  "failed",
1116
1116
  "pending"
1117
1117
  ]),
1118
1118
  rawStatus: z.string().nullish(),
1119
- requestCounts: gatewayBatchRequestCountsSchema.nullish(),
1120
- error: gatewayBatchErrorSchema.nullish(),
1119
+ requestCounts: gatewayBatchRequestCountsSchema().nullish(),
1120
+ error: gatewayBatchErrorSchema().nullish(),
1121
1121
  createdAt: z.string().nullish(),
1122
1122
  expiresAt: z.string().nullish(),
1123
- providerMetadata: gatewayBatchProviderMetadataSchema.nullish()
1123
+ providerMetadata: gatewayBatchProviderMetadataSchema().nullish()
1124
1124
  });
1125
- const gatewayBatchStartResponseSchema = gatewayBatchStatusFieldsSchema.extend({
1125
+ const gatewayBatchStartResponseSchema = lazySchema(() => zodSchema(gatewayBatchStatusFieldsSchema().extend({
1126
1126
  batchId: z.string(),
1127
1127
  warnings: z.array(z.object({
1128
1128
  requestId: z.string().nullish(),
1129
1129
  warning: z.unknown()
1130
1130
  }).catchall(z.unknown())).nullish()
1131
- });
1132
- const gatewayBatchStatusResponseSchema = gatewayBatchStatusFieldsSchema;
1131
+ })));
1132
+ const gatewayBatchStatusResponseSchema = lazySchema(() => zodSchema(gatewayBatchStatusFieldsSchema()));
1133
1133
  //#endregion
1134
1134
  //#region src/gateway-language-model.ts
1135
1135
  var GatewayLanguageModel = class GatewayLanguageModel {
@@ -1330,7 +1330,7 @@ var GatewayEmbeddingModel = class GatewayEmbeddingModel {
1330
1330
  };
1331
1331
  }
1332
1332
  };
1333
- const gatewayEmbeddingWarningSchema = z.discriminatedUnion("type", [
1333
+ const gatewayEmbeddingWarningSchema = () => z.discriminatedUnion("type", [
1334
1334
  z.object({
1335
1335
  type: z.literal("unsupported"),
1336
1336
  feature: z.string(),
@@ -1354,7 +1354,7 @@ const gatewayEmbeddingWarningSchema = z.discriminatedUnion("type", [
1354
1354
  const gatewayEmbeddingResponseSchema = lazySchema(() => zodSchema(z.object({
1355
1355
  embeddings: z.array(z.array(z.number())),
1356
1356
  usage: z.object({ tokens: z.number() }).nullish(),
1357
- warnings: z.array(gatewayEmbeddingWarningSchema).optional(),
1357
+ warnings: z.array(gatewayEmbeddingWarningSchema()).optional(),
1358
1358
  providerMetadata: z.record(z.string(), z.record(z.string(), z.unknown())).optional()
1359
1359
  })));
1360
1360
  //#endregion
@@ -1439,8 +1439,8 @@ function maybeEncodeImageFile(file) {
1439
1439
  };
1440
1440
  return file;
1441
1441
  }
1442
- const providerMetadataEntrySchema$3 = z.object({ images: z.array(z.unknown()).optional() }).catchall(z.unknown());
1443
- const gatewayImageWarningSchema = z.discriminatedUnion("type", [
1442
+ const providerMetadataEntrySchema$3 = () => z.object({ images: z.array(z.unknown()).optional() }).catchall(z.unknown());
1443
+ const gatewayImageWarningSchema = () => z.discriminatedUnion("type", [
1444
1444
  z.object({
1445
1445
  type: z.literal("unsupported"),
1446
1446
  feature: z.string(),
@@ -1461,18 +1461,18 @@ const gatewayImageWarningSchema = z.discriminatedUnion("type", [
1461
1461
  message: z.string()
1462
1462
  })
1463
1463
  ]);
1464
- const gatewayImageUsageSchema = z.object({
1464
+ const gatewayImageUsageSchema = () => z.object({
1465
1465
  inputTokens: z.number().nullish(),
1466
1466
  outputTokens: z.number().nullish(),
1467
1467
  totalTokens: z.number().nullish()
1468
1468
  });
1469
- const gatewayImageResponseSchema = z.object({
1469
+ const gatewayImageResponseSchema = lazySchema(() => zodSchema(z.object({
1470
1470
  images: z.array(z.string()),
1471
1471
  isRetryable: z.boolean().optional(),
1472
- warnings: z.array(gatewayImageWarningSchema).optional(),
1473
- providerMetadata: z.record(z.string(), providerMetadataEntrySchema$3).optional(),
1474
- usage: gatewayImageUsageSchema.optional()
1475
- });
1472
+ warnings: z.array(gatewayImageWarningSchema()).optional(),
1473
+ providerMetadata: z.record(z.string(), providerMetadataEntrySchema$3()).optional(),
1474
+ usage: gatewayImageUsageSchema().optional()
1475
+ })));
1476
1476
  //#endregion
1477
1477
  //#region src/gateway-video-model.ts
1478
1478
  var GatewayVideoModel = class {
@@ -1694,8 +1694,8 @@ function maybeEncodeVideoFile(file) {
1694
1694
  };
1695
1695
  return file;
1696
1696
  }
1697
- const providerMetadataEntrySchema$2 = z.object({ videos: z.array(z.unknown()).optional() }).catchall(z.unknown());
1698
- const gatewayVideoDataSchema = z.union([z.object({
1697
+ const providerMetadataEntrySchema$2 = () => z.object({ videos: z.array(z.unknown()).optional() }).catchall(z.unknown());
1698
+ const gatewayVideoDataSchema = () => z.union([z.object({
1699
1699
  type: z.literal("url"),
1700
1700
  url: z.string(),
1701
1701
  mediaType: z.string()
@@ -1704,7 +1704,7 @@ const gatewayVideoDataSchema = z.union([z.object({
1704
1704
  data: z.string(),
1705
1705
  mediaType: z.string()
1706
1706
  })]);
1707
- const gatewayVideoWarningSchema = z.discriminatedUnion("type", [
1707
+ const gatewayVideoWarningSchema = () => z.discriminatedUnion("type", [
1708
1708
  z.object({
1709
1709
  type: z.literal("unsupported"),
1710
1710
  feature: z.string(),
@@ -1725,56 +1725,56 @@ const gatewayVideoWarningSchema = z.discriminatedUnion("type", [
1725
1725
  message: z.string()
1726
1726
  })
1727
1727
  ]);
1728
- const gatewayVideoEventSchema = z.discriminatedUnion("type", [z.object({
1728
+ const gatewayVideoEventSchema = lazySchema(() => zodSchema(z.discriminatedUnion("type", [z.object({
1729
1729
  type: z.literal("result"),
1730
- videos: z.array(gatewayVideoDataSchema),
1731
- warnings: z.array(gatewayVideoWarningSchema).optional(),
1732
- providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2).optional()
1730
+ videos: z.array(gatewayVideoDataSchema()),
1731
+ warnings: z.array(gatewayVideoWarningSchema()).optional(),
1732
+ providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2()).optional()
1733
1733
  }), z.object({
1734
1734
  type: z.literal("error"),
1735
1735
  message: z.string(),
1736
1736
  errorType: z.string(),
1737
1737
  statusCode: z.number(),
1738
1738
  param: z.unknown().nullable()
1739
- })]);
1740
- const gatewayVideoStartResponseSchema = z.object({
1739
+ })])));
1740
+ const gatewayVideoStartResponseSchema = lazySchema(() => zodSchema(z.object({
1741
1741
  operation: z.unknown(),
1742
- warnings: z.array(gatewayVideoWarningSchema).nullish(),
1743
- providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2).nullish()
1744
- });
1745
- const gatewayVideoStatusResponseSchema = z.discriminatedUnion("status", [
1742
+ warnings: z.array(gatewayVideoWarningSchema()).nullish(),
1743
+ providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2()).nullish()
1744
+ })));
1745
+ const gatewayVideoStatusResponseSchema = lazySchema(() => zodSchema(z.discriminatedUnion("status", [
1746
1746
  z.object({
1747
1747
  status: z.literal("pending"),
1748
- warnings: z.array(gatewayVideoWarningSchema).nullish(),
1749
- providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2).nullish()
1748
+ warnings: z.array(gatewayVideoWarningSchema()).nullish(),
1749
+ providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2()).nullish()
1750
1750
  }),
1751
1751
  z.object({
1752
1752
  status: z.literal("completed"),
1753
- videos: z.array(gatewayVideoDataSchema),
1754
- warnings: z.array(gatewayVideoWarningSchema).nullish(),
1755
- providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2).nullish()
1753
+ videos: z.array(gatewayVideoDataSchema()),
1754
+ warnings: z.array(gatewayVideoWarningSchema()).nullish(),
1755
+ providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2()).nullish()
1756
1756
  }),
1757
1757
  z.object({
1758
1758
  status: z.literal("error"),
1759
1759
  error: z.string(),
1760
- providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2).nullish()
1760
+ providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2()).nullish()
1761
1761
  }),
1762
1762
  z.object({
1763
1763
  status: z.literal("cancelled"),
1764
- providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2).nullish()
1764
+ providerMetadata: z.record(z.string(), providerMetadataEntrySchema$2()).nullish()
1765
1765
  })
1766
- ]);
1767
- const gatewayDecisionProviderOptionsSchema = lazySchema(() => zodSchema(z.object({ models: gatewayModelFallbacksSchema.optional() }).catchall(z.unknown())));
1768
- const probabilitySchema = z.number().finite().min(0).max(1);
1769
- const questionSchema = z.string().min(1).max(256);
1770
- const directConditionSchema = z.union([z.object({
1771
- question: questionSchema.optional(),
1772
- confidenceBelow: probabilitySchema
1766
+ ])));
1767
+ const gatewayDecisionProviderOptionsSchema = lazySchema(() => zodSchema(z.object({ models: gatewayModelFallbacksSchema().optional() }).catchall(z.unknown())));
1768
+ const probabilitySchema = () => z.number().finite().min(0).max(1);
1769
+ const questionSchema = () => z.string().min(1).max(256);
1770
+ const directConditionSchema = () => z.union([z.object({
1771
+ question: questionSchema().optional(),
1772
+ confidenceBelow: probabilitySchema()
1773
1773
  }).strict(), z.object({
1774
- question: questionSchema.optional(),
1775
- probabilityBetween: z.array(probabilitySchema).length(2).refine(([minimum, maximum]) => minimum <= maximum, { message: "probabilityBetween minimum must be less than or equal to maximum" })
1774
+ question: questionSchema().optional(),
1775
+ probabilityBetween: z.array(probabilitySchema()).length(2).refine(([minimum, maximum]) => minimum <= maximum, { message: "probabilityBetween minimum must be less than or equal to maximum" })
1776
1776
  }).strict()]);
1777
- const groupBeyondMaxDepthSchema = z.union([
1777
+ const groupBeyondMaxDepthSchema = () => z.union([
1778
1778
  z.object({ any: z.unknown() }),
1779
1779
  z.object({ all: z.unknown() }),
1780
1780
  z.object({ atLeast: z.unknown() })
@@ -1784,11 +1784,11 @@ const groupBeyondMaxDepthSchema = z.union([
1784
1784
  message: `conditions can be nested at most 5 levels deep`
1785
1785
  });
1786
1786
  });
1787
- const conditionalModelFallbackSchema = z.object({
1787
+ const conditionalModelFallbackSchema = () => z.object({
1788
1788
  model: z.string().min(1),
1789
1789
  when: conditionSchema(1)
1790
1790
  }).strict();
1791
- const gatewayModelFallbacksSchema = z.array(z.union([z.string(), conditionalModelFallbackSchema])).superRefine((entries, context) => {
1791
+ const gatewayModelFallbacksSchema = () => z.array(z.union([z.string(), conditionalModelFallbackSchema()])).superRefine((entries, context) => {
1792
1792
  const conditionalIndexes = entries.flatMap((entry, index) => typeof entry === "string" ? [] : [index]);
1793
1793
  if (conditionalIndexes.length > 1) context.addIssue({
1794
1794
  code: "custom",
@@ -1801,11 +1801,11 @@ const gatewayModelFallbacksSchema = z.array(z.union([z.string(), conditionalMode
1801
1801
  });
1802
1802
  });
1803
1803
  function conditionSchema(depth) {
1804
- if (depth === 5) return z.union([directConditionSchema, groupBeyondMaxDepthSchema]);
1804
+ if (depth === 5) return z.union([directConditionSchema(), groupBeyondMaxDepthSchema()]);
1805
1805
  const childConditionSchema = conditionSchema(depth + 1);
1806
1806
  const conditionListSchema = z.array(childConditionSchema).min(1).max(20);
1807
1807
  return z.union([
1808
- directConditionSchema,
1808
+ directConditionSchema(),
1809
1809
  z.object({ any: conditionListSchema }).strict(),
1810
1810
  z.object({ all: conditionListSchema }).strict(),
1811
1811
  z.object({ atLeast: z.object({
@@ -1894,7 +1894,7 @@ var GatewayDecisionModel = class {
1894
1894
  };
1895
1895
  }
1896
1896
  };
1897
- const gatewayDecisionAnswerSchema = z.discriminatedUnion("type", [
1897
+ const gatewayDecisionAnswerSchema = () => z.discriminatedUnion("type", [
1898
1898
  z.object({
1899
1899
  type: z.literal("choice"),
1900
1900
  choice: z.string(),
@@ -1911,7 +1911,7 @@ const gatewayDecisionAnswerSchema = z.discriminatedUnion("type", [
1911
1911
  }),
1912
1912
  z.object({ type: z.literal("refusal") })
1913
1913
  ]);
1914
- const gatewayDecisionWarningSchema = z.discriminatedUnion("type", [
1914
+ const gatewayDecisionWarningSchema = () => z.discriminatedUnion("type", [
1915
1915
  z.object({
1916
1916
  type: z.literal("unsupported"),
1917
1917
  feature: z.string(),
@@ -1933,7 +1933,7 @@ const gatewayDecisionWarningSchema = z.discriminatedUnion("type", [
1933
1933
  })
1934
1934
  ]);
1935
1935
  const gatewayDecisionResponseSchema = lazySchema(() => zodSchema(z.object({
1936
- answers: z.record(z.string(), gatewayDecisionAnswerSchema),
1936
+ answers: z.record(z.string(), gatewayDecisionAnswerSchema()),
1937
1937
  model: z.string().optional(),
1938
1938
  rounding: z.object({
1939
1939
  probabilityDecimals: z.number().optional(),
@@ -1943,7 +1943,7 @@ const gatewayDecisionResponseSchema = lazySchema(() => zodSchema(z.object({
1943
1943
  inputTokens: z.number().optional(),
1944
1944
  outputTokens: z.number().optional()
1945
1945
  }).optional(),
1946
- warnings: z.array(gatewayDecisionWarningSchema).optional(),
1946
+ warnings: z.array(gatewayDecisionWarningSchema()).optional(),
1947
1947
  providerMetadata: z.record(z.string(), z.record(z.string(), z.unknown())).optional()
1948
1948
  })));
1949
1949
  function toGatewayDecisionState(state) {
@@ -2014,7 +2014,7 @@ var GatewayRerankingModel = class {
2014
2014
  };
2015
2015
  }
2016
2016
  };
2017
- const gatewayRerankingWarningSchema = z.discriminatedUnion("type", [
2017
+ const gatewayRerankingWarningSchema = () => z.discriminatedUnion("type", [
2018
2018
  z.object({
2019
2019
  type: z.literal("unsupported"),
2020
2020
  feature: z.string(),
@@ -2040,7 +2040,7 @@ const gatewayRerankingResponseSchema = lazySchema(() => zodSchema(z.object({
2040
2040
  index: z.number(),
2041
2041
  relevanceScore: z.number()
2042
2042
  })),
2043
- warnings: z.array(gatewayRerankingWarningSchema).optional(),
2043
+ warnings: z.array(gatewayRerankingWarningSchema()).optional(),
2044
2044
  providerMetadata: z.record(z.string(), z.record(z.string(), z.unknown())).optional()
2045
2045
  })));
2046
2046
  //#endregion
@@ -2103,8 +2103,8 @@ var GatewaySpeechModel = class {
2103
2103
  };
2104
2104
  }
2105
2105
  };
2106
- const providerMetadataEntrySchema$1 = z.object({}).catchall(z.unknown());
2107
- const gatewaySpeechWarningSchema = z.discriminatedUnion("type", [
2106
+ const providerMetadataEntrySchema$1 = () => z.object({}).catchall(z.unknown());
2107
+ const gatewaySpeechWarningSchema = () => z.discriminatedUnion("type", [
2108
2108
  z.object({
2109
2109
  type: z.literal("unsupported"),
2110
2110
  feature: z.string(),
@@ -2125,12 +2125,12 @@ const gatewaySpeechWarningSchema = z.discriminatedUnion("type", [
2125
2125
  message: z.string()
2126
2126
  })
2127
2127
  ]);
2128
- const gatewaySpeechResponseSchema = z.object({
2128
+ const gatewaySpeechResponseSchema = lazySchema(() => zodSchema(z.object({
2129
2129
  audio: z.string(),
2130
- warnings: z.array(gatewaySpeechWarningSchema).optional(),
2130
+ warnings: z.array(gatewaySpeechWarningSchema()).optional(),
2131
2131
  usage: z.record(z.string(), z.json()).optional(),
2132
- providerMetadata: z.record(z.string(), providerMetadataEntrySchema$1).optional()
2133
- });
2132
+ providerMetadata: z.record(z.string(), providerMetadataEntrySchema$1()).optional()
2133
+ })));
2134
2134
  //#endregion
2135
2135
  //#region src/gateway-transcription-model.ts
2136
2136
  var GatewayTranscriptionModel = class {
@@ -2363,8 +2363,8 @@ function createGatewayTranscriptionStream({ webSocket, url, protocols, headers,
2363
2363
  }
2364
2364
  });
2365
2365
  }
2366
- const providerMetadataEntrySchema = z.object({}).catchall(z.unknown());
2367
- const gatewayTranscriptionWarningSchema = z.discriminatedUnion("type", [
2366
+ const providerMetadataEntrySchema = () => z.object({}).catchall(z.unknown());
2367
+ const gatewayTranscriptionWarningSchema = () => z.discriminatedUnion("type", [
2368
2368
  z.object({
2369
2369
  type: z.literal("unsupported"),
2370
2370
  feature: z.string(),
@@ -2385,7 +2385,7 @@ const gatewayTranscriptionWarningSchema = z.discriminatedUnion("type", [
2385
2385
  message: z.string()
2386
2386
  })
2387
2387
  ]);
2388
- const gatewayTranscriptionResponseSchema = z.object({
2388
+ const gatewayTranscriptionResponseSchema = lazySchema(() => zodSchema(z.object({
2389
2389
  text: z.string(),
2390
2390
  segments: z.array(z.object({
2391
2391
  text: z.string(),
@@ -2394,10 +2394,10 @@ const gatewayTranscriptionResponseSchema = z.object({
2394
2394
  })).optional(),
2395
2395
  language: z.string().nullish(),
2396
2396
  durationInSeconds: z.number().nullish(),
2397
- warnings: z.array(gatewayTranscriptionWarningSchema).optional(),
2397
+ warnings: z.array(gatewayTranscriptionWarningSchema()).optional(),
2398
2398
  usage: z.record(z.string(), z.json()).optional(),
2399
- providerMetadata: z.record(z.string(), providerMetadataEntrySchema).optional()
2400
- });
2399
+ providerMetadata: z.record(z.string(), providerMetadataEntrySchema()).optional()
2400
+ })));
2401
2401
  /**
2402
2402
  * `asGatewayError` is async while the WebSocket event handlers are
2403
2403
  * synchronous, hence this helper.
@@ -2509,7 +2509,7 @@ function toGatewayRealtimeUrl(baseURL, modelId) {
2509
2509
  }
2510
2510
  //#endregion
2511
2511
  //#region src/tool/browserbase-fetch.ts
2512
- const jsonObjectSchema = z.record(z.string(), z.unknown());
2512
+ const jsonObjectSchema = () => z.record(z.string(), z.unknown());
2513
2513
  const browserbaseFetchInputSchema = lazySchema(() => zodSchema(z.object({
2514
2514
  url: z.string().url().describe("URL of the page to fetch."),
2515
2515
  allow_redirects: z.boolean().optional().describe("Whether to follow HTTP redirects (default: false)."),
@@ -2520,11 +2520,11 @@ const browserbaseFetchInputSchema = lazySchema(() => zodSchema(z.object({
2520
2520
  "json",
2521
2521
  "markdown"
2522
2522
  ]).optional().describe("Output format. raw returns the response body unchanged, markdown returns page content as Markdown, and json returns structured content using schema."),
2523
- schema: jsonObjectSchema.optional().describe("JSON Schema for structured extraction. Only use with format set to json.")
2523
+ schema: jsonObjectSchema().optional().describe("JSON Schema for structured extraction. Only use with format set to json.")
2524
2524
  })));
2525
2525
  const browserbaseFetchOutputSchema = lazySchema(() => zodSchema(z.union([z.object({
2526
2526
  id: z.string(),
2527
- content: z.union([z.string(), jsonObjectSchema]),
2527
+ content: z.union([z.string(), jsonObjectSchema()]),
2528
2528
  contentType: z.string(),
2529
2529
  encoding: z.string(),
2530
2530
  headers: z.record(z.string(), z.string()),
@@ -2789,7 +2789,7 @@ const perplexitySearchToolFactory = createProviderExecutedToolFactory({
2789
2789
  const perplexitySearch = (config = {}) => perplexitySearchToolFactory(config);
2790
2790
  //#endregion
2791
2791
  //#region src/tool/tako-search.ts
2792
- const takoDataSourceInputSchema = z.object({
2792
+ const takoDataSourceInputSchema = () => z.object({
2793
2793
  count: z.number().optional().describe("Maximum number of data results to return (1-20). When include_contents is true, each additional result adds its own data surcharge."),
2794
2794
  include_contents: z.boolean().optional().describe("Inline rows for each data result. This adds a data surcharge based on row count and dataset source. To estimate cost, search with include_contents disabled and inspect cards.content.export_pricing. This applies to every returned card; limit sources.data.count and sources.data.max_rows to control cost."),
2795
2795
  mode: z.enum(["inline", "url"]).optional().describe("Requested data delivery mode. Search card data is always inline."),
@@ -2803,7 +2803,7 @@ const takoDataSourceInputSchema = z.object({
2803
2803
  node_ids: z.array(z.string()).optional().describe("Data Graph node IDs to prioritize. Maximum 20."),
2804
2804
  strict: z.boolean().optional().describe("Only return cards matching node_ids. Requires a non-empty node_ids.")
2805
2805
  });
2806
- const takoWebSourceInputSchema = z.object({
2806
+ const takoWebSourceInputSchema = () => z.object({
2807
2807
  count: z.number().optional().describe("Maximum number of web results to return (1-20)."),
2808
2808
  include_contents: z.boolean().optional().describe("Inline extracted web page text. This can add a data charge."),
2809
2809
  category: z.enum([
@@ -2827,8 +2827,8 @@ const takoSearchInputSchema = lazySchema(() => zodSchema(z.object({
2827
2827
  "instant"
2828
2828
  ]).optional().describe("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."),
2829
2829
  sources: z.object({
2830
- data: takoDataSourceInputSchema.optional(),
2831
- web: takoWebSourceInputSchema.optional()
2830
+ data: takoDataSourceInputSchema().optional(),
2831
+ web: takoWebSourceInputSchema().optional()
2832
2832
  }).optional().describe("Sources to search. Omit to search both curated data and the web. When provided, only keys present are searched."),
2833
2833
  location: z.object({
2834
2834
  latitude: z.number().describe("Latitude between -90 and 90."),
@@ -2843,12 +2843,12 @@ const takoSearchInputSchema = lazySchema(() => zodSchema(z.object({
2843
2843
  }).optional().describe("Controls card rendering in the search response."),
2844
2844
  include_related: z.number().optional().describe("Maximum related search suggestions to include (1-20).")
2845
2845
  })));
2846
- const takoDatasetCellSchema = z.union([
2846
+ const takoDatasetCellSchema = () => z.union([
2847
2847
  z.boolean(),
2848
2848
  z.number(),
2849
2849
  z.string()
2850
2850
  ]).nullable();
2851
- const takoResultContentSchema = z.object({
2851
+ const takoResultContentSchema = () => z.object({
2852
2852
  content_format: z.enum([
2853
2853
  "card_json",
2854
2854
  "csv",
@@ -2857,7 +2857,7 @@ const takoResultContentSchema = z.object({
2857
2857
  ]).nullish(),
2858
2858
  cost: z.number().optional(),
2859
2859
  data: z.string().nullish(),
2860
- records: z.array(z.record(z.string(), takoDatasetCellSchema)).nullish(),
2860
+ records: z.array(z.record(z.string(), takoDatasetCellSchema())).nullish(),
2861
2861
  dataset: z.object({
2862
2862
  columns: z.array(z.object({
2863
2863
  name: z.string(),
@@ -2870,7 +2870,7 @@ const takoResultContentSchema = z.object({
2870
2870
  ]),
2871
2871
  unit: z.string().nullish()
2872
2872
  })),
2873
- rows: z.array(z.array(takoDatasetCellSchema)),
2873
+ rows: z.array(z.array(takoDatasetCellSchema())),
2874
2874
  total_rows: z.number(),
2875
2875
  truncated: z.boolean(),
2876
2876
  ref: z.string(),
@@ -2906,7 +2906,7 @@ const takoResultContentSchema = z.object({
2906
2906
  unit: z.string().nullish()
2907
2907
  })).nullish()
2908
2908
  }).passthrough();
2909
- const takoCardSchema = z.object({
2909
+ const takoCardSchema = () => z.object({
2910
2910
  card_id: z.string().nullish(),
2911
2911
  title: z.string().nullish(),
2912
2912
  description: z.string().nullish(),
@@ -2932,7 +2932,7 @@ const takoCardSchema = z.object({
2932
2932
  "Low",
2933
2933
  "Medium"
2934
2934
  ]).nullish(),
2935
- content: takoResultContentSchema.nullish(),
2935
+ content: takoResultContentSchema().nullish(),
2936
2936
  exportable: z.boolean().optional(),
2937
2937
  nodes: z.array(z.object({
2938
2938
  id: z.string(),
@@ -2950,18 +2950,18 @@ const takoCardSchema = z.object({
2950
2950
  last_updated: z.string().nullish()
2951
2951
  }).nullish()
2952
2952
  }).passthrough();
2953
- const takoWebResultSchema = z.object({
2953
+ const takoWebResultSchema = () => z.object({
2954
2954
  title: z.string(),
2955
2955
  url: z.string(),
2956
2956
  snippet: z.string().nullish(),
2957
2957
  source_name: z.string().nullish(),
2958
2958
  publish_date: z.string().nullish(),
2959
- content: takoResultContentSchema.nullish()
2959
+ content: takoResultContentSchema().nullish()
2960
2960
  }).passthrough();
2961
2961
  const takoSearchOutputSchema = lazySchema(() => zodSchema(z.union([z.object({
2962
2962
  request_id: z.string(),
2963
- cards: z.array(takoCardSchema).optional(),
2964
- web_results: z.array(takoWebResultSchema).optional(),
2963
+ cards: z.array(takoCardSchema()).optional(),
2964
+ web_results: z.array(takoWebResultSchema()).optional(),
2965
2965
  usage: z.object({
2966
2966
  total_cost_usd: z.number(),
2967
2967
  compute: z.object({ cost_usd: z.number() }).nullish(),
@@ -3052,15 +3052,15 @@ async function getVercelRequestId() {
3052
3052
  }
3053
3053
  //#endregion
3054
3054
  //#region src/version.ts
3055
- const VERSION = "4.0.119";
3055
+ const VERSION = "4.0.121";
3056
3056
  //#endregion
3057
3057
  //#region src/gateway-provider.ts
3058
3058
  const AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
3059
3059
  /** Response shape of `POST /v1/realtime/client-secrets`. `expiresAt` is epoch seconds. */
3060
- const gatewayClientSecretResponseSchema = z.object({
3060
+ const gatewayClientSecretResponseSchema = lazySchema(() => zodSchema(z.object({
3061
3061
  token: z.string(),
3062
3062
  expiresAt: z.number().nullish()
3063
- });
3063
+ })));
3064
3064
  /**
3065
3065
  * Create a remote provider instance.
3066
3066
  */