@ai-sdk/gateway 4.0.0-beta.110 → 4.0.0-beta.112

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,21 @@
1
1
  # @ai-sdk/gateway
2
2
 
3
+ ## 4.0.0-beta.112
4
+
5
+ ### Patch Changes
6
+
7
+ - a403276: chore(provider/gateway): update gateway model settings files
8
+ - 0416e3e: feat (video): add first-class `generateAudio` call option
9
+ - Updated dependencies [0416e3e]
10
+ - @ai-sdk/provider@4.0.0-beta.20
11
+ - @ai-sdk/provider-utils@5.0.0-beta.50
12
+
13
+ ## 4.0.0-beta.111
14
+
15
+ ### Patch Changes
16
+
17
+ - 8e990ff: feat (provider/gateway): add Exa search tool support
18
+
3
19
  ## 4.0.0-beta.110
4
20
 
5
21
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { LanguageModelV4, ProviderV4, EmbeddingModelV4, ImageModelV4, Experiment
2
2
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
3
  import { FetchFunction, InferSchema } from '@ai-sdk/provider-utils';
4
4
 
5
- type GatewayModelId = 'alibaba/qwen-3-14b' | 'alibaba/qwen-3-235b' | 'alibaba/qwen-3-30b' | 'alibaba/qwen-3-32b' | 'alibaba/qwen-3.6-max-preview' | 'alibaba/qwen3-235b-a22b-thinking' | 'alibaba/qwen3-coder' | 'alibaba/qwen3-coder-30b-a3b' | 'alibaba/qwen3-coder-next' | 'alibaba/qwen3-coder-plus' | 'alibaba/qwen3-max' | 'alibaba/qwen3-max-preview' | 'alibaba/qwen3-max-thinking' | 'alibaba/qwen3-next-80b-a3b-instruct' | 'alibaba/qwen3-next-80b-a3b-thinking' | 'alibaba/qwen3-vl-235b-a22b-instruct' | 'alibaba/qwen3-vl-instruct' | 'alibaba/qwen3-vl-thinking' | 'alibaba/qwen3.5-flash' | 'alibaba/qwen3.5-plus' | 'alibaba/qwen3.6-27b' | 'alibaba/qwen3.6-plus' | 'alibaba/qwen3.7-max' | 'alibaba/qwen3.7-plus' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-3-haiku' | 'anthropic/claude-3.5-haiku' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-opus-4' | 'anthropic/claude-opus-4.1' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'arcee-ai/trinity-large-preview' | 'arcee-ai/trinity-large-thinking' | 'arcee-ai/trinity-mini' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'cohere/command-a' | 'deepseek/deepseek-r1' | 'deepseek/deepseek-v3' | 'deepseek/deepseek-v3.1' | 'deepseek/deepseek-v3.1-terminus' | 'deepseek/deepseek-v3.2' | 'deepseek/deepseek-v3.2-thinking' | 'deepseek/deepseek-v4-flash' | 'deepseek/deepseek-v4-pro' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-image' | 'google/gemini-2.5-flash-lite' | 'google/gemini-2.5-pro' | 'google/gemini-3-flash' | 'google/gemini-3-pro-image' | 'google/gemini-3-pro-preview' | '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-preview' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.5-flash' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-coder-small' | 'interfaze/interfaze-beta' | 'kwaipilot/kat-coder-pro-v1' | 'kwaipilot/kat-coder-pro-v2' | 'meituan/longcat-flash-chat' | 'meituan/longcat-flash-thinking-2601' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | 'meta/llama-3.2-11b' | 'meta/llama-3.2-1b' | 'meta/llama-3.2-3b' | 'meta/llama-3.2-90b' | 'meta/llama-3.3-70b' | 'meta/llama-4-maverick' | 'meta/llama-4-scout' | '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' | 'mistral/codestral' | 'mistral/devstral-2' | 'mistral/devstral-small' | 'mistral/devstral-small-2' | 'mistral/magistral-medium' | 'mistral/magistral-small' | 'mistral/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-medium' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mistral/pixtral-12b' | 'mistral/pixtral-large' | 'moonshotai/kimi-k2' | 'moonshotai/kimi-k2-thinking' | 'moonshotai/kimi-k2.5' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.7-code' | 'moonshotai/kimi-k2.7-code-highspeed' | '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-nano-12b-v2-vl' | 'nvidia/nemotron-nano-9b-v2' | 'openai/gpt-3.5-turbo' | 'openai/gpt-3.5-turbo-instruct' | 'openai/gpt-4-turbo' | 'openai/gpt-4.1' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-nano' | 'openai/gpt-4o' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-search-preview' | 'openai/gpt-5' | 'openai/gpt-5-chat' | 'openai/gpt-5-codex' | 'openai/gpt-5-mini' | 'openai/gpt-5-nano' | 'openai/gpt-5-pro' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-5.1-codex-mini' | 'openai/gpt-5.1-instant' | 'openai/gpt-5.1-thinking' | 'openai/gpt-5.2' | 'openai/gpt-5.2-chat' | 'openai/gpt-5.2-codex' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.3-chat' | 'openai/gpt-5.3-codex' | 'openai/gpt-5.4' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-pro' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-deep-research' | 'openai/o3-mini' | 'openai/o3-pro' | 'openai/o4-mini' | 'perplexity/sonar' | 'perplexity/sonar-pro' | 'perplexity/sonar-reasoning-pro' | 'stepfun/step-3.5-flash' | 'stepfun/step-3.7-flash' | 'xai/grok-4.1-fast-non-reasoning' | 'xai/grok-4.1-fast-reasoning' | 'xai/grok-4.20-multi-agent' | 'xai/grok-4.20-multi-agent-beta' | 'xai/grok-4.20-non-reasoning' | 'xai/grok-4.20-non-reasoning-beta' | 'xai/grok-4.20-reasoning' | 'xai/grok-4.20-reasoning-beta' | 'xai/grok-4.3' | 'xai/grok-build-0.1' | 'xiaomi/mimo-v2-flash' | 'xiaomi/mimo-v2-pro' | 'xiaomi/mimo-v2.5' | 'xiaomi/mimo-v2.5-pro' | 'zai/glm-4.5' | 'zai/glm-4.5-air' | 'zai/glm-4.5v' | 'zai/glm-4.6' | 'zai/glm-4.6v' | 'zai/glm-4.6v-flash' | '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-5v-turbo' | (string & {});
5
+ type GatewayModelId = 'alibaba/qwen-3-14b' | 'alibaba/qwen-3-235b' | 'alibaba/qwen-3-30b' | 'alibaba/qwen-3-32b' | 'alibaba/qwen-3.6-max-preview' | 'alibaba/qwen3-235b-a22b-thinking' | 'alibaba/qwen3-coder' | 'alibaba/qwen3-coder-30b-a3b' | 'alibaba/qwen3-coder-next' | 'alibaba/qwen3-coder-plus' | 'alibaba/qwen3-max' | 'alibaba/qwen3-max-preview' | 'alibaba/qwen3-max-thinking' | 'alibaba/qwen3-next-80b-a3b-instruct' | 'alibaba/qwen3-next-80b-a3b-thinking' | 'alibaba/qwen3-vl-235b-a22b-instruct' | 'alibaba/qwen3-vl-instruct' | 'alibaba/qwen3-vl-thinking' | 'alibaba/qwen3.5-flash' | 'alibaba/qwen3.5-plus' | 'alibaba/qwen3.6-27b' | 'alibaba/qwen3.6-plus' | 'alibaba/qwen3.7-max' | 'alibaba/qwen3.7-plus' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-3-haiku' | 'anthropic/claude-3.5-haiku' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-opus-4' | 'anthropic/claude-opus-4.1' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'arcee-ai/trinity-large-preview' | 'arcee-ai/trinity-large-thinking' | 'arcee-ai/trinity-mini' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'cohere/command-a' | 'deepseek/deepseek-r1' | 'deepseek/deepseek-v3' | 'deepseek/deepseek-v3.1' | 'deepseek/deepseek-v3.1-terminus' | 'deepseek/deepseek-v3.2' | 'deepseek/deepseek-v3.2-thinking' | 'deepseek/deepseek-v4-flash' | 'deepseek/deepseek-v4-pro' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-image' | 'google/gemini-2.5-flash-lite' | 'google/gemini-2.5-pro' | 'google/gemini-3-flash' | 'google/gemini-3-pro-image' | 'google/gemini-3-pro-preview' | '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-preview' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.5-flash' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-coder-small' | 'interfaze/interfaze-beta' | 'kwaipilot/kat-coder-pro-v1' | 'kwaipilot/kat-coder-pro-v2' | 'meituan/longcat-flash-chat' | 'meituan/longcat-flash-thinking-2601' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | 'meta/llama-3.2-11b' | 'meta/llama-3.2-1b' | 'meta/llama-3.2-3b' | 'meta/llama-3.2-90b' | 'meta/llama-3.3-70b' | 'meta/llama-4-maverick' | 'meta/llama-4-scout' | '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' | 'mistral/codestral' | 'mistral/devstral-2' | 'mistral/devstral-small' | 'mistral/devstral-small-2' | 'mistral/magistral-medium' | 'mistral/magistral-small' | 'mistral/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-medium' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mistral/pixtral-12b' | 'mistral/pixtral-large' | 'moonshotai/kimi-k2' | 'moonshotai/kimi-k2-thinking' | 'moonshotai/kimi-k2.5' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.7-code' | 'moonshotai/kimi-k2.7-code-highspeed' | '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-nano-12b-v2-vl' | 'nvidia/nemotron-nano-9b-v2' | 'openai/gpt-3.5-turbo' | 'openai/gpt-3.5-turbo-instruct' | 'openai/gpt-4-turbo' | 'openai/gpt-4.1' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-nano' | 'openai/gpt-4o' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-search-preview' | 'openai/gpt-5' | 'openai/gpt-5-chat' | 'openai/gpt-5-codex' | 'openai/gpt-5-mini' | 'openai/gpt-5-nano' | 'openai/gpt-5-pro' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-5.1-codex-mini' | 'openai/gpt-5.1-instant' | 'openai/gpt-5.1-thinking' | 'openai/gpt-5.2' | 'openai/gpt-5.2-chat' | 'openai/gpt-5.2-codex' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.3-chat' | 'openai/gpt-5.3-codex' | 'openai/gpt-5.4' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-pro' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-deep-research' | 'openai/o3-mini' | 'openai/o3-pro' | 'openai/o4-mini' | 'perplexity/sonar' | 'perplexity/sonar-pro' | 'perplexity/sonar-reasoning-pro' | 'sakana/fugu-ultra' | 'stepfun/step-3.5-flash' | 'stepfun/step-3.7-flash' | 'xai/grok-4.1-fast-non-reasoning' | 'xai/grok-4.1-fast-reasoning' | 'xai/grok-4.20-multi-agent' | 'xai/grok-4.20-multi-agent-beta' | 'xai/grok-4.20-non-reasoning' | 'xai/grok-4.20-non-reasoning-beta' | 'xai/grok-4.20-reasoning' | 'xai/grok-4.20-reasoning-beta' | 'xai/grok-4.3' | 'xai/grok-build-0.1' | 'xiaomi/mimo-v2-flash' | 'xiaomi/mimo-v2-pro' | 'xiaomi/mimo-v2.5' | 'xiaomi/mimo-v2.5-pro' | 'zai/glm-4.5' | 'zai/glm-4.5-air' | 'zai/glm-4.5v' | 'zai/glm-4.6' | 'zai/glm-4.6v' | 'zai/glm-4.6v-flash' | '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-5v-turbo' | (string & {});
6
6
 
7
7
  /**
8
8
  * Shared WebSocket subprotocol contract for AI Gateway realtime auth.
@@ -65,7 +65,7 @@ type GatewaySpeechModelId = string & {};
65
65
 
66
66
  type GatewayTranscriptionModelId = string & {};
67
67
 
68
- 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' | 'bytedance/seedance-2.0' | 'bytedance/seedance-2.0-fast' | 'bytedance/seedance-v1.0-lite-i2v' | 'bytedance/seedance-v1.0-lite-t2v' | 'bytedance/seedance-v1.0-pro' | 'bytedance/seedance-v1.0-pro-fast' | 'bytedance/seedance-v1.5-pro' | 'google/veo-3.0-fast-generate-001' | 'google/veo-3.0-generate-001' | 'google/veo-3.1-fast-generate-001' | 'google/veo-3.1-generate-001' | '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' | 'xai/grok-imagine-video' | 'xai/grok-imagine-video-1.5-preview' | (string & {});
68
+ 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' | 'bytedance/seedance-2.0' | 'bytedance/seedance-2.0-fast' | 'bytedance/seedance-v1.0-pro' | 'bytedance/seedance-v1.0-pro-fast' | 'bytedance/seedance-v1.5-pro' | 'google/veo-3.0-fast-generate-001' | 'google/veo-3.0-generate-001' | 'google/veo-3.1-fast-generate-001' | 'google/veo-3.1-generate-001' | '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' | 'xai/grok-imagine-video' | 'xai/grok-imagine-video-1.5-preview' | (string & {});
69
69
 
70
70
  declare const KNOWN_MODEL_TYPES: readonly ["embedding", "image", "language", "reranking", "speech", "transcription", "video"];
71
71
  type KnownModelType = (typeof KNOWN_MODEL_TYPES)[number];
@@ -491,10 +491,145 @@ interface ParallelSearchInput {
491
491
  type ParallelSearchOutput = ParallelSearchResponse | ParallelSearchError;
492
492
  declare const parallelSearchToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<ParallelSearchInput, ParallelSearchOutput, ParallelSearchConfig, {}>;
493
493
 
494
+ type ExaSearchType = 'auto' | 'fast' | 'instant';
495
+ type ExaSearchCategory = 'company' | 'people' | 'research paper' | 'news' | 'personal site' | 'financial report';
496
+ type ExaTextSection = 'header' | 'navigation' | 'banner' | 'body' | 'sidebar' | 'footer' | 'metadata';
497
+ interface ExaSearchTextConfig {
498
+ maxCharacters?: number;
499
+ includeHtmlTags?: boolean;
500
+ verbosity?: 'compact' | 'standard' | 'full';
501
+ includeSections?: ExaTextSection[];
502
+ excludeSections?: ExaTextSection[];
503
+ }
504
+ interface ExaSearchHighlightsConfig {
505
+ query?: string;
506
+ maxCharacters?: number;
507
+ }
508
+ interface ExaSearchExtrasConfig {
509
+ links?: number;
510
+ imageLinks?: number;
511
+ }
512
+ interface ExaSearchContentsConfig {
513
+ text?: boolean | ExaSearchTextConfig;
514
+ highlights?: boolean | ExaSearchHighlightsConfig;
515
+ maxAgeHours?: number;
516
+ livecrawlTimeout?: number;
517
+ subpages?: number;
518
+ subpageTarget?: string | string[];
519
+ extras?: ExaSearchExtrasConfig;
520
+ }
521
+ interface ExaSearchConfig {
522
+ /**
523
+ * Default search method. Exa defaults to auto when omitted.
524
+ */
525
+ type?: ExaSearchType;
526
+ /**
527
+ * Default maximum number of results to return (1-100, default: 10).
528
+ */
529
+ numResults?: number;
530
+ /**
531
+ * Default category filter for result types.
532
+ */
533
+ category?: ExaSearchCategory;
534
+ /**
535
+ * Default two-letter ISO country code for location-aware search.
536
+ */
537
+ userLocation?: string;
538
+ /**
539
+ * Default domains to include or exclude.
540
+ */
541
+ includeDomains?: string[];
542
+ excludeDomains?: string[];
543
+ /**
544
+ * Default published date filters in ISO 8601 format.
545
+ */
546
+ startPublishedDate?: string;
547
+ endPublishedDate?: string;
548
+ /**
549
+ * Default content extraction controls.
550
+ */
551
+ contents?: ExaSearchContentsConfig;
552
+ }
553
+ interface ExaSearchResult {
554
+ title: string;
555
+ url: string;
556
+ id: string;
557
+ publishedDate?: string | null;
558
+ author?: string | null;
559
+ image?: string | null;
560
+ favicon?: string | null;
561
+ text?: string;
562
+ highlights?: string[];
563
+ highlightScores?: number[];
564
+ summary?: string;
565
+ subpages?: ExaSearchResult[];
566
+ extras?: {
567
+ links?: string[];
568
+ imageLinks?: string[];
569
+ };
570
+ }
571
+ interface ExaSearchResponse {
572
+ requestId: string;
573
+ searchType?: string;
574
+ resolvedSearchType?: string;
575
+ results: ExaSearchResult[];
576
+ costDollars?: {
577
+ total?: number;
578
+ search?: Record<string, number>;
579
+ };
580
+ }
581
+ interface ExaSearchError {
582
+ error: 'api_error' | 'rate_limit' | 'timeout' | 'invalid_input' | 'configuration_error' | 'execution_error' | 'unknown';
583
+ statusCode?: number;
584
+ message: string;
585
+ }
586
+ interface ExaSearchInput {
587
+ query: string;
588
+ type?: ExaSearchType;
589
+ num_results?: number;
590
+ category?: ExaSearchCategory;
591
+ user_location?: string;
592
+ include_domains?: string[];
593
+ exclude_domains?: string[];
594
+ start_published_date?: string;
595
+ end_published_date?: string;
596
+ contents?: {
597
+ text?: boolean | {
598
+ max_characters?: number;
599
+ include_html_tags?: boolean;
600
+ verbosity?: 'compact' | 'standard' | 'full';
601
+ include_sections?: ExaTextSection[];
602
+ exclude_sections?: ExaTextSection[];
603
+ };
604
+ highlights?: boolean | {
605
+ query?: string;
606
+ max_characters?: number;
607
+ };
608
+ max_age_hours?: number;
609
+ livecrawl_timeout?: number;
610
+ subpages?: number;
611
+ subpage_target?: string | string[];
612
+ extras?: {
613
+ links?: number;
614
+ image_links?: number;
615
+ };
616
+ };
617
+ }
618
+ type ExaSearchOutput = ExaSearchResponse | ExaSearchError;
619
+ declare const exaSearchToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<ExaSearchInput, ExaSearchOutput, ExaSearchConfig, {}>;
620
+
494
621
  /**
495
622
  * Gateway-specific provider-defined tools.
496
623
  */
497
624
  declare const gatewayTools: {
625
+ /**
626
+ * Search the web using Exa for current information and token-efficient
627
+ * excerpts optimized for agent workflows.
628
+ *
629
+ * Supports search type, category, domain, date, location, and content
630
+ * extraction controls.
631
+ */
632
+ exaSearch: (config?: ExaSearchConfig) => ReturnType<typeof exaSearchToolFactory>;
498
633
  /**
499
634
  * Search the web using Parallel AI's Search API for LLM-optimized excerpts.
500
635
  *
package/dist/index.js CHANGED
@@ -61,7 +61,7 @@ import {
61
61
  withoutTrailingSlash,
62
62
  withUserAgentSuffix
63
63
  } from "@ai-sdk/provider-utils";
64
- import { z as z16 } from "zod/v4";
64
+ import { z as z17 } from "zod/v4";
65
65
 
66
66
  // src/errors/as-gateway-error.ts
67
67
  import { APICallError } from "@ai-sdk/provider";
@@ -1406,6 +1406,7 @@ var GatewayVideoModel = class {
1406
1406
  duration,
1407
1407
  fps,
1408
1408
  seed,
1409
+ generateAudio,
1409
1410
  image,
1410
1411
  providerOptions,
1411
1412
  headers,
@@ -1431,6 +1432,7 @@ var GatewayVideoModel = class {
1431
1432
  ...duration && { duration },
1432
1433
  ...fps && { fps },
1433
1434
  ...seed && { seed },
1435
+ ...generateAudio !== void 0 && { generateAudio },
1434
1436
  ...providerOptions && { providerOptions },
1435
1437
  ...image && { image: maybeEncodeVideoFile(image) }
1436
1438
  },
@@ -2009,68 +2011,201 @@ function toGatewayRealtimeUrl(baseURL, modelId) {
2009
2011
  return url.toString();
2010
2012
  }
2011
2013
 
2012
- // src/tool/parallel-search.ts
2014
+ // src/tool/exa-search.ts
2013
2015
  import {
2014
2016
  createProviderExecutedToolFactory,
2015
2017
  lazySchema as lazySchema9,
2016
2018
  zodSchema as zodSchema9
2017
2019
  } from "@ai-sdk/provider-utils";
2018
2020
  import { z as z14 } from "zod";
2019
- var parallelSearchInputSchema = lazySchema9(
2021
+ var exaSearchInputSchema = lazySchema9(
2020
2022
  () => zodSchema9(
2021
2023
  z14.object({
2022
- objective: z14.string().describe(
2024
+ query: z14.string().describe("Natural-language web search query. This is required."),
2025
+ type: z14.enum(["auto", "fast", "instant"]).optional().describe(
2026
+ "Search method. Use auto for the default balance of speed and quality."
2027
+ ),
2028
+ num_results: z14.number().optional().describe("Maximum number of results to return (1-100, default: 10)."),
2029
+ category: z14.enum([
2030
+ "company",
2031
+ "people",
2032
+ "research paper",
2033
+ "news",
2034
+ "personal site",
2035
+ "financial report"
2036
+ ]).optional().describe("Optional content category to focus results."),
2037
+ user_location: z14.string().optional().describe("Two-letter ISO country code such as 'US'."),
2038
+ include_domains: z14.array(z14.string()).optional().describe("Only return results from these domains."),
2039
+ exclude_domains: z14.array(z14.string()).optional().describe("Exclude results from these domains."),
2040
+ start_published_date: z14.string().optional().describe("Only return links published after this ISO 8601 date."),
2041
+ end_published_date: z14.string().optional().describe("Only return links published before this ISO 8601 date."),
2042
+ contents: z14.object({
2043
+ text: z14.union([
2044
+ z14.boolean(),
2045
+ z14.object({
2046
+ max_characters: z14.number().optional(),
2047
+ include_html_tags: z14.boolean().optional(),
2048
+ verbosity: z14.enum(["compact", "standard", "full"]).optional(),
2049
+ include_sections: z14.array(
2050
+ z14.enum([
2051
+ "header",
2052
+ "navigation",
2053
+ "banner",
2054
+ "body",
2055
+ "sidebar",
2056
+ "footer",
2057
+ "metadata"
2058
+ ])
2059
+ ).optional(),
2060
+ exclude_sections: z14.array(
2061
+ z14.enum([
2062
+ "header",
2063
+ "navigation",
2064
+ "banner",
2065
+ "body",
2066
+ "sidebar",
2067
+ "footer",
2068
+ "metadata"
2069
+ ])
2070
+ ).optional()
2071
+ })
2072
+ ]).optional(),
2073
+ highlights: z14.union([
2074
+ z14.boolean(),
2075
+ z14.object({
2076
+ query: z14.string().optional(),
2077
+ max_characters: z14.number().optional()
2078
+ })
2079
+ ]).optional(),
2080
+ max_age_hours: z14.number().optional(),
2081
+ livecrawl_timeout: z14.number().optional(),
2082
+ subpages: z14.number().optional(),
2083
+ subpage_target: z14.union([z14.string(), z14.array(z14.string())]).optional(),
2084
+ extras: z14.object({
2085
+ links: z14.number().optional(),
2086
+ image_links: z14.number().optional()
2087
+ }).optional()
2088
+ }).optional().describe("Controls extracted page content and freshness.")
2089
+ })
2090
+ )
2091
+ );
2092
+ var exaSearchOutputSchema = lazySchema9(
2093
+ () => zodSchema9(
2094
+ z14.union([
2095
+ z14.object({
2096
+ requestId: z14.string(),
2097
+ searchType: z14.string().optional(),
2098
+ resolvedSearchType: z14.string().optional(),
2099
+ results: z14.array(
2100
+ z14.object({
2101
+ title: z14.string(),
2102
+ url: z14.string(),
2103
+ id: z14.string(),
2104
+ publishedDate: z14.string().nullable().optional(),
2105
+ author: z14.string().nullable().optional(),
2106
+ image: z14.string().nullable().optional(),
2107
+ favicon: z14.string().nullable().optional(),
2108
+ text: z14.string().optional(),
2109
+ highlights: z14.array(z14.string()).optional(),
2110
+ highlightScores: z14.array(z14.number()).optional(),
2111
+ summary: z14.string().optional(),
2112
+ subpages: z14.array(z14.any()).optional(),
2113
+ extras: z14.object({
2114
+ links: z14.array(z14.string()).optional(),
2115
+ imageLinks: z14.array(z14.string()).optional()
2116
+ }).optional()
2117
+ })
2118
+ ),
2119
+ costDollars: z14.object({
2120
+ total: z14.number().optional(),
2121
+ search: z14.record(z14.number()).optional()
2122
+ }).optional()
2123
+ }),
2124
+ z14.object({
2125
+ error: z14.enum([
2126
+ "api_error",
2127
+ "rate_limit",
2128
+ "timeout",
2129
+ "invalid_input",
2130
+ "configuration_error",
2131
+ "execution_error",
2132
+ "unknown"
2133
+ ]),
2134
+ statusCode: z14.number().optional(),
2135
+ message: z14.string()
2136
+ })
2137
+ ])
2138
+ )
2139
+ );
2140
+ var exaSearchToolFactory = createProviderExecutedToolFactory({
2141
+ id: "gateway.exa_search",
2142
+ inputSchema: exaSearchInputSchema,
2143
+ outputSchema: exaSearchOutputSchema
2144
+ });
2145
+ var exaSearch = (config = {}) => exaSearchToolFactory(config);
2146
+
2147
+ // src/tool/parallel-search.ts
2148
+ import {
2149
+ createProviderExecutedToolFactory as createProviderExecutedToolFactory2,
2150
+ lazySchema as lazySchema10,
2151
+ zodSchema as zodSchema10
2152
+ } from "@ai-sdk/provider-utils";
2153
+ import { z as z15 } from "zod";
2154
+ var parallelSearchInputSchema = lazySchema10(
2155
+ () => zodSchema10(
2156
+ z15.object({
2157
+ objective: z15.string().describe(
2023
2158
  "Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."
2024
2159
  ),
2025
- search_queries: z14.array(z14.string()).optional().describe(
2160
+ search_queries: z15.array(z15.string()).optional().describe(
2026
2161
  "Optional search queries to supplement the objective. Maximum 200 characters per query."
2027
2162
  ),
2028
- mode: z14.enum(["one-shot", "agentic"]).optional().describe(
2163
+ mode: z15.enum(["one-shot", "agentic"]).optional().describe(
2029
2164
  'Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'
2030
2165
  ),
2031
- max_results: z14.number().optional().describe(
2166
+ max_results: z15.number().optional().describe(
2032
2167
  "Maximum number of results to return (1-20). Defaults to 10 if not specified."
2033
2168
  ),
2034
- source_policy: z14.object({
2035
- include_domains: z14.array(z14.string()).optional().describe("List of domains to include in search results."),
2036
- exclude_domains: z14.array(z14.string()).optional().describe("List of domains to exclude from search results."),
2037
- after_date: z14.string().optional().describe(
2169
+ source_policy: z15.object({
2170
+ include_domains: z15.array(z15.string()).optional().describe("List of domains to include in search results."),
2171
+ exclude_domains: z15.array(z15.string()).optional().describe("List of domains to exclude from search results."),
2172
+ after_date: z15.string().optional().describe(
2038
2173
  "Only include results published after this date (ISO 8601 format)."
2039
2174
  )
2040
2175
  }).optional().describe(
2041
2176
  "Source policy for controlling which domains to include/exclude and freshness."
2042
2177
  ),
2043
- excerpts: z14.object({
2044
- max_chars_per_result: z14.number().optional().describe("Maximum characters per result."),
2045
- max_chars_total: z14.number().optional().describe("Maximum total characters across all results.")
2178
+ excerpts: z15.object({
2179
+ max_chars_per_result: z15.number().optional().describe("Maximum characters per result."),
2180
+ max_chars_total: z15.number().optional().describe("Maximum total characters across all results.")
2046
2181
  }).optional().describe("Excerpt configuration for controlling result length."),
2047
- fetch_policy: z14.object({
2048
- max_age_seconds: z14.number().optional().describe(
2182
+ fetch_policy: z15.object({
2183
+ max_age_seconds: z15.number().optional().describe(
2049
2184
  "Maximum age in seconds for cached content. Set to 0 to always fetch fresh content."
2050
2185
  )
2051
2186
  }).optional().describe("Fetch policy for controlling content freshness.")
2052
2187
  })
2053
2188
  )
2054
2189
  );
2055
- var parallelSearchOutputSchema = lazySchema9(
2056
- () => zodSchema9(
2057
- z14.union([
2190
+ var parallelSearchOutputSchema = lazySchema10(
2191
+ () => zodSchema10(
2192
+ z15.union([
2058
2193
  // Success response
2059
- z14.object({
2060
- searchId: z14.string(),
2061
- results: z14.array(
2062
- z14.object({
2063
- url: z14.string(),
2064
- title: z14.string(),
2065
- excerpt: z14.string(),
2066
- publishDate: z14.string().nullable().optional(),
2067
- relevanceScore: z14.number().optional()
2194
+ z15.object({
2195
+ searchId: z15.string(),
2196
+ results: z15.array(
2197
+ z15.object({
2198
+ url: z15.string(),
2199
+ title: z15.string(),
2200
+ excerpt: z15.string(),
2201
+ publishDate: z15.string().nullable().optional(),
2202
+ relevanceScore: z15.number().optional()
2068
2203
  })
2069
2204
  )
2070
2205
  }),
2071
2206
  // Error response
2072
- z14.object({
2073
- error: z14.enum([
2207
+ z15.object({
2208
+ error: z15.enum([
2074
2209
  "api_error",
2075
2210
  "rate_limit",
2076
2211
  "timeout",
@@ -2078,13 +2213,13 @@ var parallelSearchOutputSchema = lazySchema9(
2078
2213
  "configuration_error",
2079
2214
  "unknown"
2080
2215
  ]),
2081
- statusCode: z14.number().optional(),
2082
- message: z14.string()
2216
+ statusCode: z15.number().optional(),
2217
+ message: z15.string()
2083
2218
  })
2084
2219
  ])
2085
2220
  )
2086
2221
  );
2087
- var parallelSearchToolFactory = createProviderExecutedToolFactory({
2222
+ var parallelSearchToolFactory = createProviderExecutedToolFactory2({
2088
2223
  id: "gateway.parallel_search",
2089
2224
  inputSchema: parallelSearchInputSchema,
2090
2225
  outputSchema: parallelSearchOutputSchema
@@ -2093,85 +2228,85 @@ var parallelSearch = (config = {}) => parallelSearchToolFactory(config);
2093
2228
 
2094
2229
  // src/tool/perplexity-search.ts
2095
2230
  import {
2096
- createProviderExecutedToolFactory as createProviderExecutedToolFactory2,
2097
- lazySchema as lazySchema10,
2098
- zodSchema as zodSchema10
2231
+ createProviderExecutedToolFactory as createProviderExecutedToolFactory3,
2232
+ lazySchema as lazySchema11,
2233
+ zodSchema as zodSchema11
2099
2234
  } from "@ai-sdk/provider-utils";
2100
- import { z as z15 } from "zod";
2101
- var perplexitySearchInputSchema = lazySchema10(
2102
- () => zodSchema10(
2103
- z15.object({
2104
- query: z15.union([z15.string(), z15.array(z15.string())]).describe(
2235
+ import { z as z16 } from "zod";
2236
+ var perplexitySearchInputSchema = lazySchema11(
2237
+ () => zodSchema11(
2238
+ z16.object({
2239
+ query: z16.union([z16.string(), z16.array(z16.string())]).describe(
2105
2240
  "Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."
2106
2241
  ),
2107
- max_results: z15.number().optional().describe(
2242
+ max_results: z16.number().optional().describe(
2108
2243
  "Maximum number of search results to return (1-20, default: 10)"
2109
2244
  ),
2110
- max_tokens_per_page: z15.number().optional().describe(
2245
+ max_tokens_per_page: z16.number().optional().describe(
2111
2246
  "Maximum number of tokens to extract per search result page (256-2048, default: 2048)"
2112
2247
  ),
2113
- max_tokens: z15.number().optional().describe(
2248
+ max_tokens: z16.number().optional().describe(
2114
2249
  "Maximum total tokens across all search results (default: 25000, max: 1000000)"
2115
2250
  ),
2116
- country: z15.string().optional().describe(
2251
+ country: z16.string().optional().describe(
2117
2252
  "Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"
2118
2253
  ),
2119
- search_domain_filter: z15.array(z15.string()).optional().describe(
2254
+ search_domain_filter: z16.array(z16.string()).optional().describe(
2120
2255
  "List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"
2121
2256
  ),
2122
- search_language_filter: z15.array(z15.string()).optional().describe(
2257
+ search_language_filter: z16.array(z16.string()).optional().describe(
2123
2258
  "List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"
2124
2259
  ),
2125
- search_after_date: z15.string().optional().describe(
2260
+ search_after_date: z16.string().optional().describe(
2126
2261
  "Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."
2127
2262
  ),
2128
- search_before_date: z15.string().optional().describe(
2263
+ search_before_date: z16.string().optional().describe(
2129
2264
  "Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."
2130
2265
  ),
2131
- last_updated_after_filter: z15.string().optional().describe(
2266
+ last_updated_after_filter: z16.string().optional().describe(
2132
2267
  "Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."
2133
2268
  ),
2134
- last_updated_before_filter: z15.string().optional().describe(
2269
+ last_updated_before_filter: z16.string().optional().describe(
2135
2270
  "Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."
2136
2271
  ),
2137
- search_recency_filter: z15.enum(["day", "week", "month", "year"]).optional().describe(
2272
+ search_recency_filter: z16.enum(["day", "week", "month", "year"]).optional().describe(
2138
2273
  "Filter results by relative time period. Cannot be used with search_after_date or search_before_date."
2139
2274
  )
2140
2275
  })
2141
2276
  )
2142
2277
  );
2143
- var perplexitySearchOutputSchema = lazySchema10(
2144
- () => zodSchema10(
2145
- z15.union([
2278
+ var perplexitySearchOutputSchema = lazySchema11(
2279
+ () => zodSchema11(
2280
+ z16.union([
2146
2281
  // Success response
2147
- z15.object({
2148
- results: z15.array(
2149
- z15.object({
2150
- title: z15.string(),
2151
- url: z15.string(),
2152
- snippet: z15.string(),
2153
- date: z15.string().optional(),
2154
- lastUpdated: z15.string().optional()
2282
+ z16.object({
2283
+ results: z16.array(
2284
+ z16.object({
2285
+ title: z16.string(),
2286
+ url: z16.string(),
2287
+ snippet: z16.string(),
2288
+ date: z16.string().optional(),
2289
+ lastUpdated: z16.string().optional()
2155
2290
  })
2156
2291
  ),
2157
- id: z15.string()
2292
+ id: z16.string()
2158
2293
  }),
2159
2294
  // Error response
2160
- z15.object({
2161
- error: z15.enum([
2295
+ z16.object({
2296
+ error: z16.enum([
2162
2297
  "api_error",
2163
2298
  "rate_limit",
2164
2299
  "timeout",
2165
2300
  "invalid_input",
2166
2301
  "unknown"
2167
2302
  ]),
2168
- statusCode: z15.number().optional(),
2169
- message: z15.string()
2303
+ statusCode: z16.number().optional(),
2304
+ message: z16.string()
2170
2305
  })
2171
2306
  ])
2172
2307
  )
2173
2308
  );
2174
- var perplexitySearchToolFactory = createProviderExecutedToolFactory2({
2309
+ var perplexitySearchToolFactory = createProviderExecutedToolFactory3({
2175
2310
  id: "gateway.perplexity_search",
2176
2311
  inputSchema: perplexitySearchInputSchema,
2177
2312
  outputSchema: perplexitySearchOutputSchema
@@ -2180,6 +2315,14 @@ var perplexitySearch = (config = {}) => perplexitySearchToolFactory(config);
2180
2315
 
2181
2316
  // src/gateway-tools.ts
2182
2317
  var gatewayTools = {
2318
+ /**
2319
+ * Search the web using Exa for current information and token-efficient
2320
+ * excerpts optimized for agent workflows.
2321
+ *
2322
+ * Supports search type, category, domain, date, location, and content
2323
+ * extraction controls.
2324
+ */
2325
+ exaSearch,
2183
2326
  /**
2184
2327
  * Search the web using Parallel AI's Search API for LLM-optimized excerpts.
2185
2328
  *
@@ -2208,13 +2351,13 @@ async function getVercelRequestId() {
2208
2351
  }
2209
2352
 
2210
2353
  // src/version.ts
2211
- var VERSION = true ? "4.0.0-beta.110" : "0.0.0-test";
2354
+ var VERSION = true ? "4.0.0-beta.112" : "0.0.0-test";
2212
2355
 
2213
2356
  // src/gateway-provider.ts
2214
2357
  var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
2215
- var gatewayClientSecretResponseSchema = z16.object({
2216
- token: z16.string(),
2217
- expiresAt: z16.number().nullish()
2358
+ var gatewayClientSecretResponseSchema = z17.object({
2359
+ token: z17.string(),
2360
+ expiresAt: z17.number().nullish()
2218
2361
  });
2219
2362
  function createGateway(options = {}) {
2220
2363
  var _a11, _b11;
@@ -2276,7 +2419,7 @@ function createGateway(options = {}) {
2276
2419
  gatewayClientSecretResponseSchema
2277
2420
  ),
2278
2421
  failedResponseHandler: createJsonErrorResponseHandler11({
2279
- errorSchema: z16.any(),
2422
+ errorSchema: z17.any(),
2280
2423
  errorToMessage: (data) => data
2281
2424
  }),
2282
2425
  fetch: options.fetch