@ai-sdk/gateway 3.0.200 → 3.0.202
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 +13 -0
- package/dist/index.d.mts +124 -4
- package/dist/index.d.ts +124 -4
- package/dist/index.js +401 -277
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +407 -275
- package/dist/index.mjs.map +1 -1
- package/docs/00-ai-gateway.mdx +129 -2
- package/package.json +1 -1
- package/src/gateway-image-model-settings.ts +1 -0
- package/src/gateway-language-model-settings.ts +2 -1
- package/src/gateway-provider-options.ts +8 -1
- package/src/gateway-speech-model-settings.ts +2 -0
- package/src/gateway-tools.ts +18 -0
- package/src/tool/browserbase-fetch.ts +158 -0
- package/src/tool/browserbase-search.ts +138 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/gateway
|
|
2
2
|
|
|
3
|
+
## 3.0.202
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2cf7cb4: feat (provider/gateway): add Browserbase Search and Fetch tool support
|
|
8
|
+
- af4a3e4: feat(provider/gateway): accept structured-output in the has provider option
|
|
9
|
+
|
|
10
|
+
## 3.0.201
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 1915a6f: Backport: chore(provider/gateway): update gateway model settings files
|
|
15
|
+
|
|
3
16
|
## 3.0.200
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -4,13 +4,13 @@ import { FetchFunction, InferSchema } from '@ai-sdk/provider-utils';
|
|
|
4
4
|
|
|
5
5
|
type GatewayEmbeddingModelId = 'alibaba/qwen3-embedding-0.6b' | 'alibaba/qwen3-embedding-4b' | 'alibaba/qwen3-embedding-8b' | 'amazon/titan-embed-text-v2' | 'cohere/embed-v4.0' | '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 & {});
|
|
6
6
|
|
|
7
|
-
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-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' | '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' | 'quiverai/arrow-1.1' | 'recraft/recraft-v2' | 'recraft/recraft-v3' | 'recraft/recraft-v4' | 'recraft/recraft-v4-pro' | 'recraft/recraft-v4.1' | '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' | (string & {});
|
|
7
|
+
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-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' | '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' | 'quiverai/arrow-1.1' | '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' | (string & {});
|
|
8
8
|
|
|
9
|
-
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-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-omni-flash' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-3-haiku' | 'anthropic/claude-fable-5' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-opus-4' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5.5-fast' | 'anthropic/claude-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-5' | 'arcee-ai/trinity-large-thinking' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'bytedance/seed-2.1-turbo' | 'cohere/command-a' | 'deepseek/deepseek-r1' | '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-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | 'deepseek/deepseek-v4.1-flash' | '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.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.6-flash' | 'google/gemini-3.7-flash' | 'google/gemini-3.8-flash' | '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-fin-free' | 'inclusionai/ling-3.0-flash-sante' | 'inclusionai/ling-3.0-flash-sante-free' | 'inclusionai/ling-3.0-flash-vl' | '
|
|
9
|
+
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-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-3-haiku' | 'anthropic/claude-fable-5' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-opus-4' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5.5-fast' | 'anthropic/claude-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-5' | 'arcee-ai/trinity-large-thinking' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'bytedance/seed-2.1-turbo' | 'cohere/command-a' | 'deepseek/deepseek-r1' | '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-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | 'deepseek/deepseek-v4.1-flash' | 'fireworks/ember-1' | '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.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.6-flash' | 'google/gemini-3.7-flash' | 'google/gemini-3.8-flash' | '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-fin-free' | 'inclusionai/ling-3.0-flash-sante' | 'inclusionai/ling-3.0-flash-sante-free' | 'inclusionai/ling-3.0-flash-vl' | 'inference-net/schematron-v2-small' | 'inference-net/schematron-v2-turbo' | 'interfaze/interfaze-beta' | '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' | '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/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mixedbread/toast-1' | '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' | '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-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-fast' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-mini-fast' | 'openai/gpt-4.1-nano' | 'openai/gpt-4.1-nano-fast' | 'openai/gpt-4o' | 'openai/gpt-4o-fast' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-fast' | 'openai/gpt-5' | 'openai/gpt-5-codex' | 'openai/gpt-5-fast' | 'openai/gpt-5-mini' | 'openai/gpt-5-mini-fast' | '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-thinking' | 'openai/gpt-5.1-thinking-fast' | 'openai/gpt-5.2' | '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-fast' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-mini-fast' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-fast' | 'openai/gpt-5.5-pro' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.6-luna-fast' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-sol-fast' | 'openai/gpt-5.6-terra' | 'openai/gpt-5.6-terra-fast' | 'openai/gpt-6-astra' | 'openai/gpt-6-astra-fast' | 'openai/gpt-6-luna' | 'openai/gpt-6-luna-fast' | 'openai/gpt-6-sol' | 'openai/gpt-6-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' | 'perplexity/sonar-pro' | 'perplexity/sonar-reasoning-pro' | 'poolside/laguna-s-2.1' | 'poolside/laguna-s-2.1-free' | 'quiverai/arrow-2' | 'quiverai/arrow-2-telos' | '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-beta' | 'spacexai/grok-4.20-non-reasoning' | 'spacexai/grok-4.20-non-reasoning-beta' | 'spacexai/grok-4.20-reasoning' | 'spacexai/grok-4.20-reasoning-beta' | 'spacexai/grok-4.3' | 'spacexai/grok-4.5' | 'spacexai/grok-4.6' | 'spacexai/grok-4.7' | 'spacexai/grok-build-0.1' | 'stepfun/step-3.5-flash' | '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 & {});
|
|
10
10
|
|
|
11
11
|
type GatewayRerankingModelId = 'cohere/rerank-v3.5' | 'cohere/rerank-v4-fast' | 'cohere/rerank-v4-pro' | 'voyage/rerank-2.5' | 'voyage/rerank-2.5-lite' | (string & {});
|
|
12
12
|
|
|
13
|
-
type GatewaySpeechModelId = 'fish-audio/s1' | 'fish-audio/s2-pro' | 'fish-audio/s2.1-pro' | 'openai/tts-1' | 'openai/tts-1-hd' | 'spacexai/grok-tts' | (string & {});
|
|
13
|
+
type GatewaySpeechModelId = 'fish-audio/s1' | 'fish-audio/s2-pro' | 'fish-audio/s2.1-pro' | 'google/gemini-3.8-flash-lite-tts' | 'google/gemini-3.8-flash-tts' | 'openai/tts-1' | 'openai/tts-1-hd' | 'spacexai/grok-tts' | (string & {});
|
|
14
14
|
|
|
15
15
|
type GatewayTranscriptionModelId = 'fish-audio/transcribe-1' | 'google/gemini-3.5-transcribe' | 'google/gemini-3.5-transcribe-live' | 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/gpt-realtime-whisper' | 'openai/whisper-1' | 'spacexai/grok-stt' | (string & {});
|
|
16
16
|
|
|
@@ -797,10 +797,130 @@ interface ExaSearchInput {
|
|
|
797
797
|
type ExaSearchOutput = ExaSearchResponse | ExaSearchError;
|
|
798
798
|
declare const exaSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<ExaSearchInput, ExaSearchOutput, ExaSearchConfig>;
|
|
799
799
|
|
|
800
|
+
interface BrowserbaseSearchConfig {
|
|
801
|
+
/**
|
|
802
|
+
* Default maximum number of results to return (1-25, default: 10).
|
|
803
|
+
*/
|
|
804
|
+
numResults?: number;
|
|
805
|
+
}
|
|
806
|
+
interface BrowserbaseSearchInput {
|
|
807
|
+
/**
|
|
808
|
+
* Web search query (1-200 characters).
|
|
809
|
+
*/
|
|
810
|
+
query: string;
|
|
811
|
+
/**
|
|
812
|
+
* Maximum number of results to return (1-25, default: 10).
|
|
813
|
+
*/
|
|
814
|
+
num_results?: number;
|
|
815
|
+
}
|
|
816
|
+
interface BrowserbaseSearchResult {
|
|
817
|
+
/** Unique identifier for the result. */
|
|
818
|
+
id: string;
|
|
819
|
+
/** Title of the search result. */
|
|
820
|
+
title: string;
|
|
821
|
+
/** URL of the search result. */
|
|
822
|
+
url: string;
|
|
823
|
+
/** Author of the content, when available. */
|
|
824
|
+
author?: string;
|
|
825
|
+
/** Favicon URL, when available. */
|
|
826
|
+
favicon?: string;
|
|
827
|
+
/** Image URL, when available. */
|
|
828
|
+
image?: string;
|
|
829
|
+
/** Publication date in ISO 8601 format, when available. */
|
|
830
|
+
publishedDate?: string;
|
|
831
|
+
}
|
|
832
|
+
interface BrowserbaseSearchResponse {
|
|
833
|
+
/** The search query that was executed. */
|
|
834
|
+
query: string;
|
|
835
|
+
/** Unique identifier for the request. */
|
|
836
|
+
requestId: string;
|
|
837
|
+
/** Search results. */
|
|
838
|
+
results: BrowserbaseSearchResult[];
|
|
839
|
+
}
|
|
840
|
+
interface BrowserbaseSearchError {
|
|
841
|
+
error: 'api_error' | 'configuration_error' | 'execution_error' | 'invalid_input' | 'rate_limit' | 'timeout' | 'unknown';
|
|
842
|
+
statusCode?: number;
|
|
843
|
+
message: string;
|
|
844
|
+
}
|
|
845
|
+
type BrowserbaseSearchOutput = BrowserbaseSearchError | BrowserbaseSearchResponse;
|
|
846
|
+
declare const browserbaseSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<BrowserbaseSearchInput, BrowserbaseSearchOutput, BrowserbaseSearchConfig>;
|
|
847
|
+
|
|
848
|
+
type BrowserbaseFetchFormat = 'raw' | 'json' | 'markdown';
|
|
849
|
+
interface BrowserbaseFetchConfig {
|
|
850
|
+
/** Whether to follow HTTP redirects (default: false). */
|
|
851
|
+
allowRedirects?: boolean;
|
|
852
|
+
/** Whether to bypass TLS certificate verification (default: false). */
|
|
853
|
+
allowInsecureSsl?: boolean;
|
|
854
|
+
/** Whether to route the request through Browserbase proxies (default: false). */
|
|
855
|
+
proxies?: boolean;
|
|
856
|
+
/** Output format for the response content (default: raw). */
|
|
857
|
+
format?: BrowserbaseFetchFormat;
|
|
858
|
+
/**
|
|
859
|
+
* JSON Schema describing the desired response content. Only used when format
|
|
860
|
+
* is json.
|
|
861
|
+
*/
|
|
862
|
+
schema?: Record<string, unknown>;
|
|
863
|
+
}
|
|
864
|
+
interface BrowserbaseFetchInput {
|
|
865
|
+
/** URL of the page to fetch. */
|
|
866
|
+
url: string;
|
|
867
|
+
/** Whether to follow HTTP redirects. */
|
|
868
|
+
allow_redirects?: boolean;
|
|
869
|
+
/** Whether to bypass TLS certificate verification. */
|
|
870
|
+
allow_insecure_ssl?: boolean;
|
|
871
|
+
/** Whether to route the request through Browserbase proxies. */
|
|
872
|
+
proxies?: boolean;
|
|
873
|
+
/** Output format for the response content. */
|
|
874
|
+
format?: BrowserbaseFetchFormat;
|
|
875
|
+
/**
|
|
876
|
+
* JSON Schema describing the desired response content. Only used when format
|
|
877
|
+
* is json.
|
|
878
|
+
*/
|
|
879
|
+
schema?: Record<string, unknown>;
|
|
880
|
+
}
|
|
881
|
+
interface BrowserbaseFetchResponse {
|
|
882
|
+
/** Unique identifier for the fetch request. */
|
|
883
|
+
id: string;
|
|
884
|
+
/**
|
|
885
|
+
* Response body. Raw and markdown responses return strings; JSON extraction
|
|
886
|
+
* returns an object matching the requested schema.
|
|
887
|
+
*/
|
|
888
|
+
content: string | Record<string, unknown>;
|
|
889
|
+
/** MIME type of the response. */
|
|
890
|
+
contentType: string;
|
|
891
|
+
/** Character encoding of the response. */
|
|
892
|
+
encoding: string;
|
|
893
|
+
/** Response headers from the fetched page. */
|
|
894
|
+
headers: Record<string, string>;
|
|
895
|
+
/** HTTP status code returned by the fetched page. */
|
|
896
|
+
statusCode: number;
|
|
897
|
+
}
|
|
898
|
+
interface BrowserbaseFetchError {
|
|
899
|
+
error: 'api_error' | 'configuration_error' | 'execution_error' | 'invalid_input' | 'rate_limit' | 'timeout' | 'unknown';
|
|
900
|
+
statusCode?: number;
|
|
901
|
+
message: string;
|
|
902
|
+
}
|
|
903
|
+
type BrowserbaseFetchOutput = BrowserbaseFetchError | BrowserbaseFetchResponse;
|
|
904
|
+
declare const browserbaseFetchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<BrowserbaseFetchInput, BrowserbaseFetchOutput, BrowserbaseFetchConfig>;
|
|
905
|
+
|
|
800
906
|
/**
|
|
801
907
|
* Gateway-specific provider-defined tools.
|
|
802
908
|
*/
|
|
803
909
|
declare const gatewayTools: {
|
|
910
|
+
/**
|
|
911
|
+
* Fetch page content using Browserbase's lightweight Fetch API.
|
|
912
|
+
*
|
|
913
|
+
* Supports raw, Markdown, and schema-driven JSON output as well as redirects,
|
|
914
|
+
* proxy routing, and TLS controls.
|
|
915
|
+
*/
|
|
916
|
+
browserbaseFetch: (config?: BrowserbaseFetchConfig) => ReturnType<typeof browserbaseFetchToolFactory>;
|
|
917
|
+
/**
|
|
918
|
+
* Search the web using Browserbase's Search API for fast, structured results.
|
|
919
|
+
*
|
|
920
|
+
* Returns titles, URLs, and available publication metadata without requiring
|
|
921
|
+
* a browser session.
|
|
922
|
+
*/
|
|
923
|
+
browserbaseSearch: (config?: BrowserbaseSearchConfig) => ReturnType<typeof browserbaseSearchToolFactory>;
|
|
804
924
|
/**
|
|
805
925
|
* Search the web using Exa for current information and token-efficient
|
|
806
926
|
* excerpts optimized for agent workflows.
|
|
@@ -967,7 +1087,7 @@ declare const gatewayProviderOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
|
967
1087
|
} | undefined;
|
|
968
1088
|
serviceTier?: "flex" | "priority" | undefined;
|
|
969
1089
|
caching?: "auto" | undefined;
|
|
970
|
-
has?: ("implicit-caching" | "reasoning" | "tool-use" | "vision" | `quantization:${string}` | `!quantization:${string}`)[] | undefined;
|
|
1090
|
+
has?: ("implicit-caching" | "reasoning" | "structured-output" | "tool-use" | "vision" | `quantization:${string}` | `!quantization:${string}`)[] | undefined;
|
|
971
1091
|
}>;
|
|
972
1092
|
type GatewayProviderOptions = InferSchema<typeof gatewayProviderOptions>;
|
|
973
1093
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import { FetchFunction, InferSchema } from '@ai-sdk/provider-utils';
|
|
|
4
4
|
|
|
5
5
|
type GatewayEmbeddingModelId = 'alibaba/qwen3-embedding-0.6b' | 'alibaba/qwen3-embedding-4b' | 'alibaba/qwen3-embedding-8b' | 'amazon/titan-embed-text-v2' | 'cohere/embed-v4.0' | '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 & {});
|
|
6
6
|
|
|
7
|
-
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-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' | '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' | 'quiverai/arrow-1.1' | 'recraft/recraft-v2' | 'recraft/recraft-v3' | 'recraft/recraft-v4' | 'recraft/recraft-v4-pro' | 'recraft/recraft-v4.1' | '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' | (string & {});
|
|
7
|
+
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-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' | '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' | 'quiverai/arrow-1.1' | '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' | (string & {});
|
|
8
8
|
|
|
9
|
-
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-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-omni-flash' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-3-haiku' | 'anthropic/claude-fable-5' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-opus-4' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5.5-fast' | 'anthropic/claude-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-5' | 'arcee-ai/trinity-large-thinking' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'bytedance/seed-2.1-turbo' | 'cohere/command-a' | 'deepseek/deepseek-r1' | '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-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | 'deepseek/deepseek-v4.1-flash' | '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.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.6-flash' | 'google/gemini-3.7-flash' | 'google/gemini-3.8-flash' | '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-fin-free' | 'inclusionai/ling-3.0-flash-sante' | 'inclusionai/ling-3.0-flash-sante-free' | 'inclusionai/ling-3.0-flash-vl' | '
|
|
9
|
+
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-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-3-haiku' | 'anthropic/claude-fable-5' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-opus-4' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5.5-fast' | 'anthropic/claude-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-5' | 'arcee-ai/trinity-large-thinking' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'bytedance/seed-2.1-turbo' | 'cohere/command-a' | 'deepseek/deepseek-r1' | '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-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | 'deepseek/deepseek-v4.1-flash' | 'fireworks/ember-1' | '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.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.6-flash' | 'google/gemini-3.7-flash' | 'google/gemini-3.8-flash' | '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-fin-free' | 'inclusionai/ling-3.0-flash-sante' | 'inclusionai/ling-3.0-flash-sante-free' | 'inclusionai/ling-3.0-flash-vl' | 'inference-net/schematron-v2-small' | 'inference-net/schematron-v2-turbo' | 'interfaze/interfaze-beta' | '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' | '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/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mixedbread/toast-1' | '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' | '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-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-fast' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-mini-fast' | 'openai/gpt-4.1-nano' | 'openai/gpt-4.1-nano-fast' | 'openai/gpt-4o' | 'openai/gpt-4o-fast' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-fast' | 'openai/gpt-5' | 'openai/gpt-5-codex' | 'openai/gpt-5-fast' | 'openai/gpt-5-mini' | 'openai/gpt-5-mini-fast' | '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-thinking' | 'openai/gpt-5.1-thinking-fast' | 'openai/gpt-5.2' | '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-fast' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-mini-fast' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-fast' | 'openai/gpt-5.5-pro' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.6-luna-fast' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-sol-fast' | 'openai/gpt-5.6-terra' | 'openai/gpt-5.6-terra-fast' | 'openai/gpt-6-astra' | 'openai/gpt-6-astra-fast' | 'openai/gpt-6-luna' | 'openai/gpt-6-luna-fast' | 'openai/gpt-6-sol' | 'openai/gpt-6-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' | 'perplexity/sonar-pro' | 'perplexity/sonar-reasoning-pro' | 'poolside/laguna-s-2.1' | 'poolside/laguna-s-2.1-free' | 'quiverai/arrow-2' | 'quiverai/arrow-2-telos' | '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-beta' | 'spacexai/grok-4.20-non-reasoning' | 'spacexai/grok-4.20-non-reasoning-beta' | 'spacexai/grok-4.20-reasoning' | 'spacexai/grok-4.20-reasoning-beta' | 'spacexai/grok-4.3' | 'spacexai/grok-4.5' | 'spacexai/grok-4.6' | 'spacexai/grok-4.7' | 'spacexai/grok-build-0.1' | 'stepfun/step-3.5-flash' | '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 & {});
|
|
10
10
|
|
|
11
11
|
type GatewayRerankingModelId = 'cohere/rerank-v3.5' | 'cohere/rerank-v4-fast' | 'cohere/rerank-v4-pro' | 'voyage/rerank-2.5' | 'voyage/rerank-2.5-lite' | (string & {});
|
|
12
12
|
|
|
13
|
-
type GatewaySpeechModelId = 'fish-audio/s1' | 'fish-audio/s2-pro' | 'fish-audio/s2.1-pro' | 'openai/tts-1' | 'openai/tts-1-hd' | 'spacexai/grok-tts' | (string & {});
|
|
13
|
+
type GatewaySpeechModelId = 'fish-audio/s1' | 'fish-audio/s2-pro' | 'fish-audio/s2.1-pro' | 'google/gemini-3.8-flash-lite-tts' | 'google/gemini-3.8-flash-tts' | 'openai/tts-1' | 'openai/tts-1-hd' | 'spacexai/grok-tts' | (string & {});
|
|
14
14
|
|
|
15
15
|
type GatewayTranscriptionModelId = 'fish-audio/transcribe-1' | 'google/gemini-3.5-transcribe' | 'google/gemini-3.5-transcribe-live' | 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/gpt-realtime-whisper' | 'openai/whisper-1' | 'spacexai/grok-stt' | (string & {});
|
|
16
16
|
|
|
@@ -797,10 +797,130 @@ interface ExaSearchInput {
|
|
|
797
797
|
type ExaSearchOutput = ExaSearchResponse | ExaSearchError;
|
|
798
798
|
declare const exaSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<ExaSearchInput, ExaSearchOutput, ExaSearchConfig>;
|
|
799
799
|
|
|
800
|
+
interface BrowserbaseSearchConfig {
|
|
801
|
+
/**
|
|
802
|
+
* Default maximum number of results to return (1-25, default: 10).
|
|
803
|
+
*/
|
|
804
|
+
numResults?: number;
|
|
805
|
+
}
|
|
806
|
+
interface BrowserbaseSearchInput {
|
|
807
|
+
/**
|
|
808
|
+
* Web search query (1-200 characters).
|
|
809
|
+
*/
|
|
810
|
+
query: string;
|
|
811
|
+
/**
|
|
812
|
+
* Maximum number of results to return (1-25, default: 10).
|
|
813
|
+
*/
|
|
814
|
+
num_results?: number;
|
|
815
|
+
}
|
|
816
|
+
interface BrowserbaseSearchResult {
|
|
817
|
+
/** Unique identifier for the result. */
|
|
818
|
+
id: string;
|
|
819
|
+
/** Title of the search result. */
|
|
820
|
+
title: string;
|
|
821
|
+
/** URL of the search result. */
|
|
822
|
+
url: string;
|
|
823
|
+
/** Author of the content, when available. */
|
|
824
|
+
author?: string;
|
|
825
|
+
/** Favicon URL, when available. */
|
|
826
|
+
favicon?: string;
|
|
827
|
+
/** Image URL, when available. */
|
|
828
|
+
image?: string;
|
|
829
|
+
/** Publication date in ISO 8601 format, when available. */
|
|
830
|
+
publishedDate?: string;
|
|
831
|
+
}
|
|
832
|
+
interface BrowserbaseSearchResponse {
|
|
833
|
+
/** The search query that was executed. */
|
|
834
|
+
query: string;
|
|
835
|
+
/** Unique identifier for the request. */
|
|
836
|
+
requestId: string;
|
|
837
|
+
/** Search results. */
|
|
838
|
+
results: BrowserbaseSearchResult[];
|
|
839
|
+
}
|
|
840
|
+
interface BrowserbaseSearchError {
|
|
841
|
+
error: 'api_error' | 'configuration_error' | 'execution_error' | 'invalid_input' | 'rate_limit' | 'timeout' | 'unknown';
|
|
842
|
+
statusCode?: number;
|
|
843
|
+
message: string;
|
|
844
|
+
}
|
|
845
|
+
type BrowserbaseSearchOutput = BrowserbaseSearchError | BrowserbaseSearchResponse;
|
|
846
|
+
declare const browserbaseSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<BrowserbaseSearchInput, BrowserbaseSearchOutput, BrowserbaseSearchConfig>;
|
|
847
|
+
|
|
848
|
+
type BrowserbaseFetchFormat = 'raw' | 'json' | 'markdown';
|
|
849
|
+
interface BrowserbaseFetchConfig {
|
|
850
|
+
/** Whether to follow HTTP redirects (default: false). */
|
|
851
|
+
allowRedirects?: boolean;
|
|
852
|
+
/** Whether to bypass TLS certificate verification (default: false). */
|
|
853
|
+
allowInsecureSsl?: boolean;
|
|
854
|
+
/** Whether to route the request through Browserbase proxies (default: false). */
|
|
855
|
+
proxies?: boolean;
|
|
856
|
+
/** Output format for the response content (default: raw). */
|
|
857
|
+
format?: BrowserbaseFetchFormat;
|
|
858
|
+
/**
|
|
859
|
+
* JSON Schema describing the desired response content. Only used when format
|
|
860
|
+
* is json.
|
|
861
|
+
*/
|
|
862
|
+
schema?: Record<string, unknown>;
|
|
863
|
+
}
|
|
864
|
+
interface BrowserbaseFetchInput {
|
|
865
|
+
/** URL of the page to fetch. */
|
|
866
|
+
url: string;
|
|
867
|
+
/** Whether to follow HTTP redirects. */
|
|
868
|
+
allow_redirects?: boolean;
|
|
869
|
+
/** Whether to bypass TLS certificate verification. */
|
|
870
|
+
allow_insecure_ssl?: boolean;
|
|
871
|
+
/** Whether to route the request through Browserbase proxies. */
|
|
872
|
+
proxies?: boolean;
|
|
873
|
+
/** Output format for the response content. */
|
|
874
|
+
format?: BrowserbaseFetchFormat;
|
|
875
|
+
/**
|
|
876
|
+
* JSON Schema describing the desired response content. Only used when format
|
|
877
|
+
* is json.
|
|
878
|
+
*/
|
|
879
|
+
schema?: Record<string, unknown>;
|
|
880
|
+
}
|
|
881
|
+
interface BrowserbaseFetchResponse {
|
|
882
|
+
/** Unique identifier for the fetch request. */
|
|
883
|
+
id: string;
|
|
884
|
+
/**
|
|
885
|
+
* Response body. Raw and markdown responses return strings; JSON extraction
|
|
886
|
+
* returns an object matching the requested schema.
|
|
887
|
+
*/
|
|
888
|
+
content: string | Record<string, unknown>;
|
|
889
|
+
/** MIME type of the response. */
|
|
890
|
+
contentType: string;
|
|
891
|
+
/** Character encoding of the response. */
|
|
892
|
+
encoding: string;
|
|
893
|
+
/** Response headers from the fetched page. */
|
|
894
|
+
headers: Record<string, string>;
|
|
895
|
+
/** HTTP status code returned by the fetched page. */
|
|
896
|
+
statusCode: number;
|
|
897
|
+
}
|
|
898
|
+
interface BrowserbaseFetchError {
|
|
899
|
+
error: 'api_error' | 'configuration_error' | 'execution_error' | 'invalid_input' | 'rate_limit' | 'timeout' | 'unknown';
|
|
900
|
+
statusCode?: number;
|
|
901
|
+
message: string;
|
|
902
|
+
}
|
|
903
|
+
type BrowserbaseFetchOutput = BrowserbaseFetchError | BrowserbaseFetchResponse;
|
|
904
|
+
declare const browserbaseFetchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<BrowserbaseFetchInput, BrowserbaseFetchOutput, BrowserbaseFetchConfig>;
|
|
905
|
+
|
|
800
906
|
/**
|
|
801
907
|
* Gateway-specific provider-defined tools.
|
|
802
908
|
*/
|
|
803
909
|
declare const gatewayTools: {
|
|
910
|
+
/**
|
|
911
|
+
* Fetch page content using Browserbase's lightweight Fetch API.
|
|
912
|
+
*
|
|
913
|
+
* Supports raw, Markdown, and schema-driven JSON output as well as redirects,
|
|
914
|
+
* proxy routing, and TLS controls.
|
|
915
|
+
*/
|
|
916
|
+
browserbaseFetch: (config?: BrowserbaseFetchConfig) => ReturnType<typeof browserbaseFetchToolFactory>;
|
|
917
|
+
/**
|
|
918
|
+
* Search the web using Browserbase's Search API for fast, structured results.
|
|
919
|
+
*
|
|
920
|
+
* Returns titles, URLs, and available publication metadata without requiring
|
|
921
|
+
* a browser session.
|
|
922
|
+
*/
|
|
923
|
+
browserbaseSearch: (config?: BrowserbaseSearchConfig) => ReturnType<typeof browserbaseSearchToolFactory>;
|
|
804
924
|
/**
|
|
805
925
|
* Search the web using Exa for current information and token-efficient
|
|
806
926
|
* excerpts optimized for agent workflows.
|
|
@@ -967,7 +1087,7 @@ declare const gatewayProviderOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
|
967
1087
|
} | undefined;
|
|
968
1088
|
serviceTier?: "flex" | "priority" | undefined;
|
|
969
1089
|
caching?: "auto" | undefined;
|
|
970
|
-
has?: ("implicit-caching" | "reasoning" | "tool-use" | "vision" | `quantization:${string}` | `!quantization:${string}`)[] | undefined;
|
|
1090
|
+
has?: ("implicit-caching" | "reasoning" | "structured-output" | "tool-use" | "vision" | `quantization:${string}` | `!quantization:${string}`)[] | undefined;
|
|
971
1091
|
}>;
|
|
972
1092
|
type GatewayProviderOptions = InferSchema<typeof gatewayProviderOptions>;
|
|
973
1093
|
|