@ai-sdk/gateway 4.0.147 → 4.0.149

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,18 @@
1
1
  # @ai-sdk/gateway
2
2
 
3
+ ## 4.0.149
4
+
5
+ ### Patch Changes
6
+
7
+ - f886264: feat(gateway): add experimental extraction model support. String model ids passed to `experimental_extract` now resolve through the AI Gateway by default.
8
+ - d03d74a: chore(provider/gateway): update gateway model settings files
9
+
10
+ ## 4.0.148
11
+
12
+ ### Patch Changes
13
+
14
+ - ed981f8: feat(openai): add GPT-6.2 Astra and GPT-6.2 Sol model support
15
+
3
16
  ## 4.0.147
4
17
 
5
18
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { FetchFunction, InferSchema, Resolvable, WebSocketConstructor } from "@ai-sdk/provider-utils";
2
- import { APICallError, EmbeddingModelV4, Experimental_BatchV4, Experimental_DecisionModelV4, Experimental_RealtimeFactoryV4, Experimental_StreamingSpeechModelV4, Experimental_VideoModelV4, ImageModelV4, JSONValue, LanguageModelV4, ProviderV4, RerankingModelV4, SpeechModelV4, TranscriptionModelV4, TypeValidationError } from "@ai-sdk/provider";
2
+ import { APICallError, EmbeddingModelV4, Experimental_BatchV4, Experimental_DecisionModelV4, Experimental_ExtractionModelV4, Experimental_RealtimeFactoryV4, Experimental_StreamingSpeechModelV4, Experimental_VideoModelV4, ImageModelV4, JSONValue, LanguageModelV4, ProviderV4, RerankingModelV4, SpeechModelV4, TranscriptionModelV4, TypeValidationError } from "@ai-sdk/provider";
3
3
  //#region src/gateway-decision-model-settings.d.ts
4
- type GatewayDecisionModelId = 'baseten/elephant-1' | 'baseten/joey-1' | 'baseten/mammoth-1' | 'convaiinnovations/laya' | 'google/gemini-decision-1' | 'liquid/d1' | 'liquid/d1-ultra' | 'microsoft/microsoft-decision-1' | 'nace-ai/drex-max-finance' | 'nace-ai/drex-max-v1.1' | 'nace-ai/drex-v2.0' | 'openai/gpt-6-luna-decisions' | 'parallel/parallel-decisions-fast' | 'perplexity/pplx-decider-flash-v1.2' | 'perplexity/pplx-decider-flash-v1.3' | 'perplexity/pplx-decider-v1.2' | 'perplexity/pplx-decider-v1.3' | 'scaledown/scaledown-classify-1' | 'typesafe-ai/jev' | 'typesafe-ai/jev-1.13.0' | 'typesafe-ai/jev-1.14.0' | (string & {});
4
+ type GatewayDecisionModelId = 'baseten/elephant-1' | 'baseten/joey-1' | 'baseten/mammoth-1' | 'convaiinnovations/laya' | 'google/gemini-decision-1' | 'heygen/heygen-decision-1' | 'heygen/heygen-decision-1-turbo' | 'liquid/d1' | 'liquid/d1-ultra' | 'liquid/d1.2' | 'liquid/d1.2-ultra' | 'microsoft/microsoft-decision-1' | 'nace-ai/drex-max-finance' | 'nace-ai/drex-max-v1.1' | 'nace-ai/drex-v2.0' | 'openai/gpt-6-luna-decisions' | 'parallel/parallel-decisions-fast' | 'perplexity/pplx-decider-flash-v1.2' | 'perplexity/pplx-decider-flash-v1.3' | 'perplexity/pplx-decider-v1.2' | 'perplexity/pplx-decider-v1.3' | 'scaledown/scaledown-classify-1' | 'typesafe-ai/jev' | 'typesafe-ai/jev-1.13.0' | 'typesafe-ai/jev-1.14.0' | (string & {});
5
5
  //#endregion
6
6
  //#region src/gateway-provider-options.d.ts
7
7
  /**
@@ -112,11 +112,14 @@ type GatewayModelFallbackList<QUESTION_ID extends string> = string[] | [Conditio
112
112
  //#region src/gateway-embedding-model-settings.d.ts
113
113
  type GatewayEmbeddingModelId = 'alibaba/qwen3-embedding-0.6b' | 'alibaba/qwen3-embedding-4b' | 'alibaba/qwen3-embedding-8b' | 'amazon/titan-embed-text-v2' | 'cohere/embed-v4.0' | 'cohere/embed-v5.0-fast' | 'cohere/embed-v5.0-pro' | 'google/gemini-embedding-001' | 'google/gemini-embedding-2' | 'google/text-embedding-005' | 'google/text-multilingual-embedding-002' | 'mistral/codestral-embed' | 'mistral/mistral-embed' | 'openai/text-embedding-3-large' | 'openai/text-embedding-3-small' | 'openai/text-embedding-ada-002' | 'perplexity/pplx-embed-v1-0.6b' | 'perplexity/pplx-embed-v1-4b' | 'voyage/voyage-3-large' | 'voyage/voyage-3.5' | 'voyage/voyage-3.5-lite' | 'voyage/voyage-4' | 'voyage/voyage-4-large' | 'voyage/voyage-4-lite' | 'voyage/voyage-code-2' | 'voyage/voyage-code-3' | 'voyage/voyage-finance-2' | 'voyage/voyage-law-2' | (string & {});
114
114
  //#endregion
115
+ //#region src/gateway-extraction-model-settings.d.ts
116
+ type GatewayExtractionModelId = string & {};
117
+ //#endregion
115
118
  //#region src/gateway-image-model-settings.d.ts
116
119
  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' | 'minimax/minimax-h3-image' | 'minimax/minimax-h3-image-highspeed' | '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' | 'openai/gpt-image-2.6-flare' | 'openai/gpt-image-2.6-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 & {});
117
120
  //#endregion
118
121
  //#region src/gateway-language-model-settings.d.ts
119
- 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-35b-a3b' | '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' | 'alibaba/qwen4-max' | '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-fable-5.2' | 'anthropic/claude-fable-5.2-batch' | 'anthropic/claude-fable-5.2-fast' | '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' | '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-1017-ultrafast' | '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-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-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.8-flash' | 'google/gemini-4-argon' | 'google/gemini-4-carbon' | 'google/gemini-4-hydrogen' | 'google/gemini-nano-banana-2.1' | 'google/gemini-omni-1.2-flash' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'humansand/ampersand-v0.1' | 'inception/mercury-3' | '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' | 'inclusionai/ling-3.1-flash-1019' | 'inference-net/schematron-v2-small' | 'inference-net/schematron-v2-turbo' | 'interfaze/interfaze-beta' | 'liquid/lfm2.5-24b-a2b' | 'meituan/longcat-2.5' | '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-ember' | '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' | 'moonshotai/kimi-k3.1-pro' | 'moonshotai/kimi-k3.1-pro-highspeed' | 'morph/morph-v3-fast' | 'morph/morph-v3-large' | '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-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-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-6.1-terra' | 'openai/gpt-6.1-terra-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' | 'paperinstruments/ultramarine-1-flash' | 'particle/particle-1' | 'perplexity/sonar' | 'quiverai/arrow-2' | 'quiverai/arrow-2-telos' | 'reflection/beam' | 'reflection/beam-free' | 'sakana/fugu-max' | 'sakana/fugu-ultra' | 'sakana/fugu-ultra-v2' | 'sakana/namazu' | 'scaledown/scaledown-extract-1' | 'scaledown/scaledown-summarize-1' | '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' | 'tencent/hy4-flash' | 'tencent/hy4-preview' | 'thinkingmachines/inkling' | 'thinkingmachines/inkling-2-small' | 'thinkingmachines/inkling-small' | '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-5.3-flashx-legal' | 'zai/glm-5v-turbo' | (string & {});
122
+ 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-35b-a3b' | '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' | 'alibaba/qwen4-max' | '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-fable-5.2' | 'anthropic/claude-fable-5.2-batch' | 'anthropic/claude-fable-5.2-fast' | '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' | '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-1017-ultrafast' | '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-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-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.8-flash' | 'google/gemini-4-argon' | 'google/gemini-4-carbon' | 'google/gemini-4-hydrogen' | 'google/gemini-nano-banana-2.1' | 'google/gemini-omni-1.2-flash' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'humansand/ampersand-v0.1' | 'inception/mercury-3' | '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' | 'inclusionai/ling-3.1-flash-1019' | 'inference-net/schematron-v2-small' | 'inference-net/schematron-v2-turbo' | 'interfaze/interfaze-beta' | 'liquid/lfm2.5-24b-a2b' | 'meituan/longcat-2.5' | '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-ember' | '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' | 'moonshotai/kimi-k3.1-pro' | 'moonshotai/kimi-k3.1-pro-highspeed' | 'morph/morph-v3-fast' | 'morph/morph-v3-large' | '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-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-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-6.1-terra' | 'openai/gpt-6.1-terra-fast' | 'openai/gpt-6.2-astra' | 'openai/gpt-6.2-astra-fast' | 'openai/gpt-6.2-sol' | 'openai/gpt-6.2-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' | 'paperinstruments/ultramarine-1-flash' | 'particle/particle-1' | 'perplexity/sonar' | 'quiverai/arrow-2' | 'quiverai/arrow-2-telos' | 'recursive/flint-v1.0' | 'reflection/beam' | 'reflection/beam-free' | 'sakana/fugu-max' | 'sakana/fugu-ultra' | 'sakana/fugu-ultra-v2' | 'sakana/namazu' | 'scaledown/scaledown-extract-1' | 'scaledown/scaledown-summarize-1' | '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' | 'tencent/hy4-flash' | 'tencent/hy4-preview' | 'thinkingmachines/inkling' | 'thinkingmachines/inkling-2-small' | 'thinkingmachines/inkling-small' | '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-5.3-flashx-legal' | 'zai/glm-5v-turbo' | (string & {});
120
123
  //#endregion
121
124
  //#region src/gateway-realtime-auth.d.ts
122
125
  /**
@@ -212,10 +215,10 @@ type GatewaySpeechModelId = 'elevenlabs/eleven-flash-v2' | 'elevenlabs/eleven-fl
212
215
  type GatewayTranscriptionModelId = 'elevenlabs/scribe-v2' | 'elevenlabs/scribe-v2-realtime' | 'fish-audio/transcribe-1' | 'google/gemini-3.5-transcribe' | 'google/gemini-3.5-transcribe-live' | 'microsoft/mai-transcribe-2' | 'microsoft/mai-transcribe-2-streaming' | 'mistral/voxtral-mini-transcribe-3' | 'mistral/voxtral-small-transcribe-3' | 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/gpt-live-transcribe' | 'openai/gpt-realtime-whisper' | 'openai/gpt-transcribe' | 'openai/whisper-1' | 'spacexai/grok-stt' | (string & {});
213
216
  //#endregion
214
217
  //#region src/gateway-video-model-settings.d.ts
215
- type GatewayVideoModelId = 'alibaba/wan-v2.5-t2v-preview' | 'alibaba/wan-v2.6-i2v' | 'alibaba/wan-v2.6-i2v-flash' | 'alibaba/wan-v2.6-r2v' | 'alibaba/wan-v2.6-r2v-flash' | 'alibaba/wan-v2.6-t2v' | 'alibaba/wan-v2.7-r2v' | 'alibaba/wan-v2.7-t2v' | 'alibaba/wan-v3.0-video' | 'alibaba/wan-v3.0-video-prime' | 'bfl/flux-3-video' | 'bytedance/seedance-2.0' | 'bytedance/seedance-2.0-fast' | 'bytedance/seedance-2.0-mini' | 'bytedance/seedance-2.5' | 'bytedance/seedance-v1.0-pro' | 'bytedance/seedance-v1.0-pro-fast' | 'google/veo-3.1-fast-generate-001' | 'google/veo-3.1-generate-001' | 'google/veo-3.1-lite-generate-001' | 'heygen/heygen-video-1' | 'klingai/kling-v2.5-turbo-i2v' | 'klingai/kling-v2.5-turbo-t2v' | 'klingai/kling-v2.6-i2v' | 'klingai/kling-v2.6-motion-control' | 'klingai/kling-v2.6-t2v' | 'klingai/kling-v3.0-i2v' | 'klingai/kling-v3.0-motion-control' | 'klingai/kling-v3.0-t2v' | 'minimax/minimax-h3' | 'minimax/minimax-h3-max' | 'spacexai/grok-imagine-video' | 'spacexai/grok-imagine-video-1.5' | 'spacexai/grok-imagine-video-1.5-lite' | 'topaz/proteus' | 'topaz/starlight-precise-2.6' | (string & {});
218
+ type GatewayVideoModelId = 'alibaba/wan-v2.5-t2v-preview' | 'alibaba/wan-v2.6-i2v' | 'alibaba/wan-v2.6-i2v-flash' | 'alibaba/wan-v2.6-r2v' | 'alibaba/wan-v2.6-r2v-flash' | 'alibaba/wan-v2.6-t2v' | 'alibaba/wan-v2.7-r2v' | 'alibaba/wan-v2.7-t2v' | 'alibaba/wan-v3.0-video' | 'alibaba/wan-v3.0-video-prime' | 'bfl/flux-3-video' | 'bytedance/seedance-2.0' | 'bytedance/seedance-2.0-fast' | 'bytedance/seedance-2.0-mini' | 'bytedance/seedance-2.5' | 'bytedance/seedance-2.5-flash' | 'bytedance/seedance-v1.0-pro' | 'bytedance/seedance-v1.0-pro-fast' | 'google/veo-3.1-fast-generate-001' | 'google/veo-3.1-generate-001' | 'google/veo-3.1-lite-generate-001' | 'heygen/heygen-video-1' | 'klingai/kling-v2.5-turbo-i2v' | 'klingai/kling-v2.5-turbo-t2v' | 'klingai/kling-v2.6-i2v' | 'klingai/kling-v2.6-motion-control' | 'klingai/kling-v2.6-t2v' | 'klingai/kling-v3.0-i2v' | 'klingai/kling-v3.0-motion-control' | 'klingai/kling-v3.0-t2v' | 'minimax/minimax-h3' | 'minimax/minimax-h3-max' | 'spacexai/grok-imagine-video' | 'spacexai/grok-imagine-video-1.5' | 'spacexai/grok-imagine-video-1.5-lite' | 'topaz/proteus' | 'topaz/starlight-precise-2.6' | (string & {});
216
219
  //#endregion
217
220
  //#region src/gateway-model-entry.d.ts
218
- declare const KNOWN_MODEL_TYPES: readonly ["embedding", "decision", "evaluation", "image", "language", "realtime", "reranking", "speech", "transcription", "video"];
221
+ declare const KNOWN_MODEL_TYPES: readonly ["embedding", "decision", "evaluation", "extraction", "image", "language", "realtime", "reranking", "speech", "transcription", "video"];
219
222
  type KnownModelType = (typeof KNOWN_MODEL_TYPES)[number];
220
223
  interface GatewayLanguageModelEntry {
221
224
  /**
@@ -1409,6 +1412,14 @@ interface GatewayProvider extends ProviderV4 {
1409
1412
  };
1410
1413
  /** @deprecated Use `decision` instead. */
1411
1414
  evaluation(modelId: GatewayDecisionModelId): ReturnType<GatewayProvider['evaluationModel']>;
1415
+ /**
1416
+ * Creates a model for extracting typed field values from shared state.
1417
+ */
1418
+ extraction(modelId: GatewayExtractionModelId): Experimental_ExtractionModelV4;
1419
+ /**
1420
+ * Creates a model for extracting typed field values from shared state.
1421
+ */
1422
+ extractionModel(modelId: GatewayExtractionModelId): Experimental_ExtractionModelV4;
1412
1423
  /**
1413
1424
  * Creates a model for text-to-speech generation.
1414
1425
  */
@@ -1847,5 +1858,5 @@ export type GatewayEvaluationModelId = GatewayDecisionModelId;
1847
1858
  /** @deprecated Use `DecisionFallbackCondition` instead. */
1848
1859
  export type EvaluationFallbackCondition<QUESTION_ID extends string = string> = DecisionFallbackCondition<QUESTION_ID>;
1849
1860
  //#endregion
1850
- export { type DecisionFallbackCondition, type GatewayAsyncJobMetadata, type GatewayCreditsResponse, type GatewayDecisionModelId, type GatewayEmbeddingModelId, type GatewayErrorResponse, type GatewayGenerationInfo, type GatewayGenerationInfoParams, type GatewayImageModelId, type GatewayLanguageModelEntry, type GatewayLanguageModelEntry as GatewayModelEntry, type GatewayProviderOptions as GatewayLanguageModelOptions, type GatewayProviderOptions, type GatewayLanguageModelSpecification, type GatewayModelFallback, type GatewayModelId, type GatewayProvider, type GatewayProviderMetadata, type GatewayProviderSettings, type GatewayRealtimeModelId, type GatewayRerankingModelId, type GatewaySpeechModelId, type GatewaySpendReportParams, type GatewaySpendReportResponse, type GatewaySpendReportRow, type GatewayTranscriptionModelId, type GatewayVideoModelId, createGateway as createGatewayProvider };
1861
+ export { type DecisionFallbackCondition, type GatewayAsyncJobMetadata, type GatewayCreditsResponse, type GatewayDecisionModelId, type GatewayEmbeddingModelId, type GatewayErrorResponse, type GatewayExtractionModelId, type GatewayGenerationInfo, type GatewayGenerationInfoParams, type GatewayImageModelId, type GatewayLanguageModelEntry, type GatewayLanguageModelEntry as GatewayModelEntry, type GatewayProviderOptions as GatewayLanguageModelOptions, type GatewayProviderOptions, type GatewayLanguageModelSpecification, type GatewayModelFallback, type GatewayModelId, type GatewayProvider, type GatewayProviderMetadata, type GatewayProviderSettings, type GatewayRealtimeModelId, type GatewayRerankingModelId, type GatewaySpeechModelId, type GatewaySpendReportParams, type GatewaySpendReportResponse, type GatewaySpendReportRow, type GatewayTranscriptionModelId, type GatewayVideoModelId, createGateway as createGatewayProvider };
1851
1862
  //# sourceMappingURL=index.d.ts.map
@@ -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_deepseek_fetch0.DeepSeekFetchConfig","_$__tool_deepseek_fetch0.deepseekFetchToolFactory","_$__tool_deepseek_search0.DeepSeekSearchConfig","_$__tool_deepseek_search0.deepseekSearchToolFactory","_$__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","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/gateway-tool-error.ts","../src/tool/deepseek-fetch.ts","../src/tool/deepseek-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-access-policy-denied-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/g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ACA;IAEA;IACA;IACA;IACA;;SAKK,WAAW,iBAAiB,SAAS;;;;SAOrC,wBACL,gBACA,mBACA,YACA,OACA;IAEA;IACA;IACA;IACA;IACA;IACA;MACE;;;;cC7CAC;;;;;;qBAOO,qCAAqC;oBAC9BA;WAET;WACA;EAEG,cACV,SACA,YACA,OACA;IAEA;IACA;IACA;IACA;;SAKK,WAAW,iBAAiB,SAAS;;;;cCzBxCC;;;;;qBAcO,8BAA8B;oBACvBA;WAET;WACA;WACA;EAEG,cACV,SACA,YACA,OACA,cACA;IAEA;IACA;IACA;IACA;IACA;;SAMK,WAAW,iBAAiB,SAAS;;;;cCxCxCC;;;;qBAKO,mCAAmC;oBAC5BA;WAET;WACA;EAEG,cACV,SACA,YACA,OACA;IAEA;IACA;IACA;IACA;;SAKK,WAAW,iBAAiB,SAAS;;;;cCzBxCC;;;;qBAKO,mCAAmC;oBAC5BA;WAET;WACA;EAEG,cACV,SACA,YACA,OACA;IAEA;IACA;IACA;IACA;;SAKK,WAAW,iBAAiB,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;;;;YC2ED,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_deepseek_fetch0.DeepSeekFetchConfig","_$__tool_deepseek_fetch0.deepseekFetchToolFactory","_$__tool_deepseek_search0.DeepSeekSearchConfig","_$__tool_deepseek_search0.deepseekSearchToolFactory","_$__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","symbol"],"sources":["../src/gateway-decision-model-settings.ts","../src/gateway-provider-options.ts","../src/gateway-embedding-model-settings.ts","../src/gateway-extraction-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/gateway-tool-error.ts","../src/tool/deepseek-fetch.ts","../src/tool/deepseek-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-access-policy-denied-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;;;;;;;;;;KC2BA,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;;;;;;;EAQA;;EAGA;;;;;;EAOA;;;;;;;;;;;;;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;;;KC5KzB;;;KCAA;;;KCAA;;;KCAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC4BC;;;;;qBAMA;;;;;qBAMA;;qBAGA;;qBAGA;;;;;wBAMG,4BACd,eACA;EAAY;;;;;;wBASE,iCACd,eACA;EAAY;;;;;;wBAaE,0BACd,eACA;EAAY;;;;;;;;;;;wBA8BE,4BACd;;;;;;wBAgBc,+BACd;;;KChIU;;;KCAA;;;KCAA;;;KCAA;;;KCAA;;;cCEC;KAe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8B;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;;;;YC4ED,2BAA2B;;YAE3B,4BAA4B,uCACtC,0BAA0B"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { EXPERIMENTAL_SPEECH_STREAM_START_FRAME_TYPE, EXPERIMENTAL_SPEECH_STREAM_TEXT_DELTA_FRAME_TYPE, EXPERIMENTAL_SPEECH_STREAM_TEXT_DONE_FRAME_TYPE, EXPERIMENTAL_TRANSCRIPTION_STREAM_AUDIO_DONE_FRAME_TYPE, EXPERIMENTAL_TRANSCRIPTION_STREAM_START_FRAME_TYPE, WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE, combineHeaders, connectToWebSocket, convertAsyncIteratorToReadableStream, convertBase64ToUint8Array, convertUint8ArrayToBase64, createEventSourceResponseHandler, createJsonErrorResponseHandler, createJsonLinesResponseHandler, createJsonResponseHandler, createProviderExecutedToolFactory, experimental_parseSpeechStreamPart, experimental_parseTranscriptionStreamPart, getErrorMessage, getFromApi, lazySchema, loadOptionalSetting, normalizeBatchRequestCounts, normalizeHeaders, parseJsonEventStream, parseProviderOptions, postJsonToApi, removeUndefinedEntries, resolve, safeValidateTypes, secureJsonParse, serializeModelOptions, waitForWebSocketBufferDrain, withUserAgentSuffix, withoutTrailingSlash, zodSchema } from "@ai-sdk/provider-utils";
2
2
  import { any, array, boolean, catchall, discriminatedUnion, enum as enum$1, extend, globalRegistry, instanceof as instanceof$1, int, json, length, literal, maxLength, maximum, minLength, minimum, never, nullable, nullish, number, object, optional, pipe, record, refine, string, transform, union, unknown, url } from "zod/v4/mini";
3
- import { APICallError, InvalidArgumentError, LoadAPIKeyError, UnsupportedFunctionalityError, getErrorMessage as getErrorMessage$1 } from "@ai-sdk/provider";
3
+ import { APICallError, Experimental_ExtractionUnsupportedFieldTypeError, InvalidArgumentError, LoadAPIKeyError, UnsupportedFunctionalityError, getErrorMessage as getErrorMessage$1 } from "@ai-sdk/provider";
4
4
  import { getContext, getVercelOidcToken } from "@vercel/oidc";
5
5
  //#region src/gateway-realtime-auth.ts
6
6
  /**
@@ -706,6 +706,7 @@ const KNOWN_MODEL_TYPES = [
706
706
  "embedding",
707
707
  "decision",
708
708
  "evaluation",
709
+ "extraction",
709
710
  "image",
710
711
  "language",
711
712
  "realtime",
@@ -1937,6 +1938,47 @@ function conditionSchema(depth) {
1937
1938
  ]);
1938
1939
  }
1939
1940
  //#endregion
1941
+ //#region src/gateway-warning-schema.ts
1942
+ const gatewayWarningSchema = () => z.discriminatedUnion("type", [
1943
+ z.object({
1944
+ type: z.literal("unsupported"),
1945
+ feature: z.string(),
1946
+ details: z.optional(z.string())
1947
+ }),
1948
+ z.object({
1949
+ type: z.literal("compatibility"),
1950
+ feature: z.string(),
1951
+ details: z.optional(z.string())
1952
+ }),
1953
+ z.object({
1954
+ type: z.literal("deprecated"),
1955
+ setting: z.string(),
1956
+ message: z.string()
1957
+ }),
1958
+ z.object({
1959
+ type: z.literal("other"),
1960
+ message: z.string()
1961
+ })
1962
+ ]);
1963
+ //#endregion
1964
+ //#region src/to-gateway-state-parts.ts
1965
+ /** Converts inline file bytes to base64 and rejects file data that cannot be sent. */
1966
+ function toGatewayStateParts({ state, modelType, allowReferences = false }) {
1967
+ return state.map((part) => {
1968
+ if (part.type !== "file") return part;
1969
+ if (allowReferences && part.data.type === "reference") return part;
1970
+ if (part.data.type !== "data") throw new UnsupportedFunctionalityError({ functionality: `Gateway ${modelType} file input: ${part.data.type} data` });
1971
+ const { data } = part.data;
1972
+ return {
1973
+ ...part,
1974
+ data: {
1975
+ type: "data",
1976
+ data: typeof data === "string" ? data : convertUint8ArrayToBase64(data)
1977
+ }
1978
+ };
1979
+ });
1980
+ }
1981
+ //#endregion
1940
1982
  //#region src/gateway-decision-model.ts
1941
1983
  var GatewayDecisionModel = class {
1942
1984
  constructor(modelId, config) {
@@ -1957,7 +1999,10 @@ var GatewayDecisionModel = class {
1957
1999
  return this.doDecide(options);
1958
2000
  }
1959
2001
  async doDecide({ state, questions, maxOutputTokens, reasoning, headers, abortSignal, providerOptions }) {
1960
- const stateParts = toGatewayDecisionState(state);
2002
+ const stateParts = toGatewayStateParts({
2003
+ state,
2004
+ modelType: "decision"
2005
+ });
1961
2006
  const gatewayOptions = await parseProviderOptions({
1962
2007
  provider: "gateway",
1963
2008
  providerOptions,
@@ -2030,27 +2075,6 @@ const gatewayDecisionAnswerSchema = () => z.discriminatedUnion("type", [
2030
2075
  }),
2031
2076
  z.object({ type: z.literal("refusal") })
2032
2077
  ]);
2033
- const gatewayDecisionWarningSchema = () => z.discriminatedUnion("type", [
2034
- z.object({
2035
- type: z.literal("unsupported"),
2036
- feature: z.string(),
2037
- details: z.optional(z.string())
2038
- }),
2039
- z.object({
2040
- type: z.literal("compatibility"),
2041
- feature: z.string(),
2042
- details: z.optional(z.string())
2043
- }),
2044
- z.object({
2045
- type: z.literal("deprecated"),
2046
- setting: z.string(),
2047
- message: z.string()
2048
- }),
2049
- z.object({
2050
- type: z.literal("other"),
2051
- message: z.string()
2052
- })
2053
- ]);
2054
2078
  const gatewayDecisionResponseSchema = lazySchema(() => zodSchema(z.object({
2055
2079
  answers: z.record(z.string(), gatewayDecisionAnswerSchema()),
2056
2080
  model: z.optional(z.string()),
@@ -2062,22 +2086,175 @@ const gatewayDecisionResponseSchema = lazySchema(() => zodSchema(z.object({
2062
2086
  inputTokens: z.optional(z.number()),
2063
2087
  outputTokens: z.optional(z.number())
2064
2088
  })),
2065
- warnings: z.optional(z.array(gatewayDecisionWarningSchema())),
2089
+ warnings: z.optional(z.array(gatewayWarningSchema())),
2066
2090
  providerMetadata: z.optional(z.record(z.string(), z.record(z.string(), z.unknown())))
2067
2091
  })));
2068
- function toGatewayDecisionState(state) {
2069
- return state.map((part) => {
2070
- if (part.type !== "file") return part;
2071
- if (part.data.type !== "data") throw new UnsupportedFunctionalityError({ functionality: `Gateway decision file input: ${part.data.type} data` });
2072
- const { data } = part.data;
2092
+ //#endregion
2093
+ //#region src/gateway-extraction-model.ts
2094
+ var GatewayExtractionModel = class {
2095
+ constructor(modelId, config) {
2096
+ this.modelId = modelId;
2097
+ this.config = config;
2098
+ this.specificationVersion = "v4";
2099
+ this.supportedFieldTypes = [
2100
+ "text",
2101
+ "number",
2102
+ "date",
2103
+ "time",
2104
+ "datetime",
2105
+ "duration",
2106
+ "list"
2107
+ ];
2108
+ }
2109
+ get provider() {
2110
+ return this.config.provider;
2111
+ }
2112
+ async doExtract({ state, fields, referenceDate, maxOutputTokens, reasoning, headers, abortSignal, providerOptions }) {
2113
+ const stateParts = toGatewayStateParts({
2114
+ state,
2115
+ modelType: "extraction",
2116
+ allowReferences: true
2117
+ });
2118
+ const resolvedHeaders = this.config.headers ? await resolve(this.config.headers) : void 0;
2119
+ try {
2120
+ const { responseHeaders, value: responseBody, rawValue } = await postJsonToApi({
2121
+ url: this.getUrl(),
2122
+ headers: combineHeaders(resolvedHeaders, headers ?? {}, this.getModelConfigHeaders(), await resolve(this.config.o11yHeaders)),
2123
+ body: {
2124
+ stateParts,
2125
+ fields,
2126
+ referenceDate,
2127
+ maxOutputTokens,
2128
+ reasoning,
2129
+ ...providerOptions ? { providerOptions } : {}
2130
+ },
2131
+ successfulResponseHandler: createJsonResponseHandler(gatewayExtractionResponseSchema),
2132
+ failedResponseHandler: createJsonErrorResponseHandler({
2133
+ errorSchema: z.any(),
2134
+ errorToMessage: (data) => getErrorMessage(data) ?? "unknown error"
2135
+ }),
2136
+ ...abortSignal && { abortSignal },
2137
+ fetch: this.config.fetch
2138
+ });
2139
+ return {
2140
+ answers: omitNulls(responseBody.answers),
2141
+ ...responseBody.usage ? { usage: {
2142
+ inputTokens: responseBody.usage.inputTokens ?? void 0,
2143
+ outputTokens: responseBody.usage.outputTokens ?? void 0
2144
+ } } : {},
2145
+ warnings: responseBody.warnings ?? [],
2146
+ providerMetadata: responseBody.providerMetadata ?? void 0,
2147
+ response: {
2148
+ modelId: responseBody.model ?? this.modelId,
2149
+ headers: responseHeaders,
2150
+ body: rawValue
2151
+ }
2152
+ };
2153
+ } catch (error) {
2154
+ const unsupportedField = await getUnsupportedField(error);
2155
+ if (unsupportedField != null) throw new Experimental_ExtractionUnsupportedFieldTypeError({
2156
+ ...unsupportedField,
2157
+ provider: this.provider,
2158
+ modelId: this.modelId
2159
+ });
2160
+ throw await asGatewayError(error, await parseAuthMethod(resolvedHeaders ?? {}));
2161
+ }
2162
+ }
2163
+ getUrl() {
2164
+ return `${this.config.baseURL}/extraction-model`;
2165
+ }
2166
+ getModelConfigHeaders() {
2073
2167
  return {
2074
- ...part,
2075
- data: {
2076
- type: "data",
2077
- data: typeof data === "string" ? data : convertUint8ArrayToBase64(data)
2078
- }
2168
+ "ai-extraction-model-specification-version": "4",
2169
+ "ai-model-id": this.modelId
2079
2170
  };
2171
+ }
2172
+ };
2173
+ const gatewayExtractionSourceSchema = () => z.discriminatedUnion("type", [z.object({
2174
+ type: z.literal("text"),
2175
+ part: z.number(),
2176
+ start: z.number(),
2177
+ end: z.number()
2178
+ }), z.object({
2179
+ type: z.literal("file"),
2180
+ part: z.number()
2181
+ })]);
2182
+ const stringAnswerSchema = (type) => z.object({
2183
+ type: z.literal(type),
2184
+ value: z.nullable(z.string()),
2185
+ guess: z.nullish(z.string()),
2186
+ pNull: z.nullish(z.number()),
2187
+ confidence: z.nullish(z.number()),
2188
+ source: z.nullish(gatewayExtractionSourceSchema())
2189
+ });
2190
+ const numberAnswerSchema = (type) => z.object({
2191
+ type: z.literal(type),
2192
+ value: z.nullable(z.number()),
2193
+ guess: z.nullish(z.number()),
2194
+ pNull: z.nullish(z.number()),
2195
+ confidence: z.nullish(z.number()),
2196
+ source: z.nullish(gatewayExtractionSourceSchema())
2197
+ });
2198
+ const gatewayExtractionAnswerSchema = () => z.discriminatedUnion("type", [
2199
+ stringAnswerSchema("text"),
2200
+ numberAnswerSchema("number"),
2201
+ stringAnswerSchema("date"),
2202
+ stringAnswerSchema("time"),
2203
+ stringAnswerSchema("datetime"),
2204
+ numberAnswerSchema("duration"),
2205
+ z.object({
2206
+ type: z.literal("list"),
2207
+ value: z.nullable(z.union([z.array(z.string()), z.array(z.number())])),
2208
+ pNull: z.nullish(z.number()),
2209
+ confidence: z.nullish(z.number()),
2210
+ items: z.nullish(z.array(z.object({
2211
+ confidence: z.nullish(z.number()),
2212
+ source: z.nullish(gatewayExtractionSourceSchema())
2213
+ })))
2214
+ }),
2215
+ z.object({ type: z.literal("refusal") })
2216
+ ]);
2217
+ const gatewayExtractionWarningSchema = () => z.union([gatewayWarningSchema(), z.pipe(z.unknown(), z.transform((warning) => ({
2218
+ type: "other",
2219
+ message: `Unknown warning: ${JSON.stringify(warning)}`
2220
+ })))]);
2221
+ const gatewayExtractionResponseSchema = lazySchema(() => zodSchema(z.object({
2222
+ answers: z.record(z.string(), gatewayExtractionAnswerSchema()),
2223
+ model: z.nullish(z.string()),
2224
+ usage: z.nullish(z.object({
2225
+ inputTokens: z.nullish(z.number()),
2226
+ outputTokens: z.nullish(z.number())
2227
+ })),
2228
+ warnings: z.nullish(z.array(gatewayExtractionWarningSchema())),
2229
+ providerMetadata: z.nullish(z.record(z.string(), z.record(z.string(), z.unknown())))
2230
+ })));
2231
+ const gatewayUnsupportedFieldErrorSchema = lazySchema(() => zodSchema(z.object({ error: z.object({
2232
+ type: z.literal("invalid_request_error"),
2233
+ param: z.object({
2234
+ name: z.literal("AI_ExtractionUnsupportedFieldTypeError"),
2235
+ fieldId: z.string(),
2236
+ fieldType: z.string()
2237
+ })
2238
+ }) })));
2239
+ /** Reads the field from the gateway's unsupported field type response. */
2240
+ async function getUnsupportedField(error) {
2241
+ if (!APICallError.isInstance(error)) return void 0;
2242
+ const result = await safeValidateTypes({
2243
+ value: extractApiCallResponse(error),
2244
+ schema: gatewayUnsupportedFieldErrorSchema
2080
2245
  });
2246
+ if (!result.success) return void 0;
2247
+ const { fieldId, fieldType } = result.value.error.param;
2248
+ return {
2249
+ fieldId,
2250
+ fieldType
2251
+ };
2252
+ }
2253
+ /** Drops `null` optional fields, which the specification leaves out. */
2254
+ function omitNulls(value) {
2255
+ if (Array.isArray(value)) return value.map(omitNulls);
2256
+ if (value == null || typeof value !== "object") return value;
2257
+ return Object.fromEntries(Object.entries(value).filter(([key, entry]) => entry !== null || key === "value").map(([key, entry]) => [key, omitNulls(entry)]));
2081
2258
  }
2082
2259
  //#endregion
2083
2260
  //#region src/gateway-reranking-model.ts
@@ -3459,7 +3636,7 @@ async function getVercelRequestId() {
3459
3636
  }
3460
3637
  //#endregion
3461
3638
  //#region src/version.ts
3462
- const VERSION = "4.0.147";
3639
+ const VERSION = "4.0.149";
3463
3640
  //#endregion
3464
3641
  //#region src/gateway-provider.ts
3465
3642
  const AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
@@ -3704,6 +3881,17 @@ function createGateway(options = {}) {
3704
3881
  provider.decision = createDecisionModel;
3705
3882
  provider.evaluationModel = createDecisionModel;
3706
3883
  provider.evaluation = createDecisionModel;
3884
+ const createExtractionModel = (modelId) => {
3885
+ return new GatewayExtractionModel(modelId, {
3886
+ provider: "gateway",
3887
+ baseURL,
3888
+ headers: getHeaders,
3889
+ fetch: options.fetch,
3890
+ o11yHeaders: createO11yHeaders()
3891
+ });
3892
+ };
3893
+ provider.extractionModel = createExtractionModel;
3894
+ provider.extraction = createExtractionModel;
3707
3895
  const createSpeechModel = (modelId) => {
3708
3896
  return new GatewaySpeechModel(modelId, {
3709
3897
  provider: "gateway",