@ai-sdk/gateway 4.0.60 → 4.0.62
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 +14 -0
- package/dist/index.d.ts +238 -6
- package/dist/index.js +218 -2
- package/dist/index.js.map +1 -1
- package/docs/00-ai-gateway.mdx +106 -0
- package/package.json +5 -5
- package/src/gateway-image-model-settings.ts +2 -2
- package/src/gateway-language-model-settings.ts +15 -12
- package/src/gateway-realtime-model-settings.ts +2 -2
- package/src/gateway-speech-model-settings.ts +1 -1
- package/src/gateway-tools.ts +11 -0
- package/src/gateway-transcription-model-settings.ts +1 -1
- package/src/gateway-video-model-settings.ts +3 -3
- package/src/tool/tako-search.ts +581 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/gateway
|
|
2
2
|
|
|
3
|
+
## 4.0.62
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a371615: feat (provider/gateway): add Tako Search tool support
|
|
8
|
+
- Updated dependencies [b74971f]
|
|
9
|
+
- @ai-sdk/provider-utils@5.0.29
|
|
10
|
+
|
|
11
|
+
## 4.0.61
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- dedac59: chore(provider/gateway): update gateway model settings files
|
|
16
|
+
|
|
3
17
|
## 4.0.60
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { FetchFunction, WebSocketConstructor, InferSchema } from '@ai-sdk/provid
|
|
|
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' | 'openai/gpt-image-1' | 'openai/gpt-image-1-mini' | 'openai/gpt-image-1.5' | 'openai/gpt-image-2' | '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' | '
|
|
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' | 'openai/gpt-image-1' | 'openai/gpt-image-1-mini' | 'openai/gpt-image-1.5' | 'openai/gpt-image-2' | '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 & {});
|
|
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-max' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-3-haiku' | 'anthropic/claude-fable-5' | '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-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-5' | '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-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | '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-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-coder-small' | 'inclusionai/ling-3.0-flash' | 'interfaze/interfaze-beta' | 'kwaipilot/kat-coder-air-v2.5' | 'kwaipilot/kat-coder-pro-v1' | 'kwaipilot/kat-coder-pro-v2' | 'kwaipilot/kat-coder-pro-v2.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-glimmer-30b' | 'meta/muse-spark-1.1' | 'meta/muse-spark-1.2' | 'meta/muse-spark-1.2-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/devstral-2' | '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' | '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-4o-mini-search-preview' | '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-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-deep-research' | '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' | 'sakana/fugu-ultra' | 'sakana/namazu' | '
|
|
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-max' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-3-haiku' | 'anthropic/claude-fable-5' | '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-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-5' | '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-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | '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-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-coder-small' | 'inclusionai/ling-3.0-flash' | 'interfaze/interfaze-beta' | 'kwaipilot/kat-coder-air-v2.5' | 'kwaipilot/kat-coder-pro-v1' | 'kwaipilot/kat-coder-pro-v2' | 'kwaipilot/kat-coder-pro-v2.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-glimmer-30b' | 'meta/muse-spark-1.1' | 'meta/muse-spark-1.2' | 'meta/muse-spark-1.2-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/devstral-2' | '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' | '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-4o-mini-search-preview' | '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-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-deep-research' | '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' | 'sakana/fugu-ultra' | '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-build-0.1' | 'stepfun/step-3.5-flash' | 'stepfun/step-3.7-flash' | 'tencent/hy-mt2-lite' | 'tencent/hy-mt2-plus' | 'tencent/hy-mt2-pro' | 'tencent/hy3' | 'thinkingmachines/inkling' | 'thinkingmachines/inkling-small' | '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.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-5v-turbo' | (string & {});
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Shared WebSocket subprotocol contract for AI Gateway realtime and streaming
|
|
@@ -75,15 +75,15 @@ declare function getGatewayRealtimeAuthToken(secWebSocketProtocol: string | null
|
|
|
75
75
|
*/
|
|
76
76
|
declare function getGatewayRealtimeTeamIdOrSlug(secWebSocketProtocol: string | null | undefined): string | undefined;
|
|
77
77
|
|
|
78
|
-
type GatewayRealtimeModelId = 'openai/gpt-realtime-1.5' | 'openai/gpt-realtime-2' | 'openai/gpt-realtime-2.1' | 'openai/gpt-realtime-mini' | '
|
|
78
|
+
type GatewayRealtimeModelId = 'openai/gpt-realtime-1.5' | 'openai/gpt-realtime-2' | 'openai/gpt-realtime-2.1' | 'openai/gpt-realtime-mini' | 'spacexai/grok-voice-think-fast-1.0' | 'spacexai/grok-voice-think-fast-2.0' | (string & {});
|
|
79
79
|
|
|
80
80
|
type GatewayRerankingModelId = 'cohere/rerank-v3.5' | 'cohere/rerank-v4-fast' | 'cohere/rerank-v4-pro' | 'voyage/rerank-2.5' | 'voyage/rerank-2.5-lite' | (string & {});
|
|
81
81
|
|
|
82
|
-
type GatewaySpeechModelId = 'fish-audio/s1' | 'fish-audio/s1-free' | 'fish-audio/s2-pro' | 'fish-audio/s2-pro-free' | 'fish-audio/s2.1-pro' | 'fish-audio/s2.1-pro-free' | 'openai/tts-1' | 'openai/tts-1-hd' | '
|
|
82
|
+
type GatewaySpeechModelId = 'fish-audio/s1' | 'fish-audio/s1-free' | 'fish-audio/s2-pro' | 'fish-audio/s2-pro-free' | 'fish-audio/s2.1-pro' | 'fish-audio/s2.1-pro-free' | 'openai/tts-1' | 'openai/tts-1-hd' | 'spacexai/grok-tts' | (string & {});
|
|
83
83
|
|
|
84
|
-
type GatewayTranscriptionModelId = 'fish-audio/transcribe-1' | 'fish-audio/transcribe-1-free' | 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/gpt-realtime-whisper' | 'openai/whisper-1' | '
|
|
84
|
+
type GatewayTranscriptionModelId = 'fish-audio/transcribe-1' | 'fish-audio/transcribe-1-free' | 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/gpt-realtime-whisper' | 'openai/whisper-1' | 'spacexai/grok-stt' | (string & {});
|
|
85
85
|
|
|
86
|
-
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' | 'bfl/flux-3-video' | 'bytedance/seedance-2.0' | 'bytedance/seedance-2.0-fast' | 'bytedance/seedance-2.5' | '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' | 'google/veo-3.1-lite-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' | 'minimax/minimax-h3' | '
|
|
86
|
+
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' | 'bfl/flux-3-video' | 'bytedance/seedance-2.0' | 'bytedance/seedance-2.0-fast' | 'bytedance/seedance-2.5' | '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' | 'google/veo-3.1-lite-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' | 'minimax/minimax-h3' | 'spacexai/grok-imagine-video' | 'spacexai/grok-imagine-video-1.5' | 'spacexai/grok-imagine-video-1.5-preview' | (string & {});
|
|
87
87
|
|
|
88
88
|
declare const KNOWN_MODEL_TYPES: readonly ["embedding", "image", "language", "realtime", "reranking", "speech", "transcription", "video"];
|
|
89
89
|
type KnownModelType = (typeof KNOWN_MODEL_TYPES)[number];
|
|
@@ -244,6 +244,229 @@ interface GatewayGenerationInfo {
|
|
|
244
244
|
billableWebSearchCalls: number;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
type TakoSearchEffort = 'deep' | 'fast' | 'instant';
|
|
248
|
+
type TakoContentFormat = 'card_json' | 'csv' | 'json_compact' | 'json_records';
|
|
249
|
+
interface TakoDataSourceConfig {
|
|
250
|
+
/** Maximum number of data cards to return (1-20). */
|
|
251
|
+
count?: number;
|
|
252
|
+
/** Inline underlying card data in the response. This can add a data charge. */
|
|
253
|
+
includeContents?: boolean;
|
|
254
|
+
/** Requested delivery mode for card data. Search cards are always inlined. */
|
|
255
|
+
mode?: 'inline' | 'url';
|
|
256
|
+
/** Serialization for inlined card data. */
|
|
257
|
+
contentFormat?: TakoContentFormat;
|
|
258
|
+
/** Maximum rows for inlined card data. The service clamps large values. */
|
|
259
|
+
maxRows?: number;
|
|
260
|
+
/** Data Graph node IDs to prioritize. */
|
|
261
|
+
nodeIds?: string[];
|
|
262
|
+
/** Return only cards matching nodeIds. Requires at least one node ID. */
|
|
263
|
+
strict?: boolean;
|
|
264
|
+
}
|
|
265
|
+
interface TakoWebSourceConfig {
|
|
266
|
+
/** Maximum number of web results to return (1-20). */
|
|
267
|
+
count?: number;
|
|
268
|
+
/** Inline extracted web page text. This can add a data charge. */
|
|
269
|
+
includeContents?: boolean;
|
|
270
|
+
/** Optional web-result category filter. */
|
|
271
|
+
category?: 'finance' | 'news' | 'sports';
|
|
272
|
+
/** Only return results from these bare domains. */
|
|
273
|
+
includeDomains?: string[];
|
|
274
|
+
/** Exclude results from these bare domains. */
|
|
275
|
+
excludeDomains?: string[];
|
|
276
|
+
/** Maximum characters in each web-result snippet. */
|
|
277
|
+
snippetMaxChars?: number;
|
|
278
|
+
/** Include highlighted passages in web results. Defaults to true in AI Gateway. */
|
|
279
|
+
highlights?: boolean;
|
|
280
|
+
/** Maximum extracted characters per web page when including contents. */
|
|
281
|
+
articleContentMaxChars?: number;
|
|
282
|
+
/** Keep results published on or after this ISO date. */
|
|
283
|
+
publishedAfter?: string;
|
|
284
|
+
/** Keep results published on or before this ISO date. */
|
|
285
|
+
publishedBefore?: string;
|
|
286
|
+
}
|
|
287
|
+
interface TakoSearchConfig {
|
|
288
|
+
/** Search effort. fast is the default balanced option. */
|
|
289
|
+
effort?: TakoSearchEffort;
|
|
290
|
+
/** Sources to search. Omit to search both curated data and the web. */
|
|
291
|
+
sources?: {
|
|
292
|
+
data?: TakoDataSourceConfig;
|
|
293
|
+
web?: TakoWebSourceConfig;
|
|
294
|
+
};
|
|
295
|
+
/** End-user coordinates for localized results. */
|
|
296
|
+
location?: {
|
|
297
|
+
latitude: number;
|
|
298
|
+
longitude: number;
|
|
299
|
+
};
|
|
300
|
+
/** ISO 3166-1 alpha-2 country code. */
|
|
301
|
+
countryCode?: string;
|
|
302
|
+
/** BCP-47 locale. */
|
|
303
|
+
locale?: string;
|
|
304
|
+
/** IANA timezone. */
|
|
305
|
+
timezone?: string;
|
|
306
|
+
/** Settings that control card rendering. */
|
|
307
|
+
outputSettings?: {
|
|
308
|
+
imageDarkMode?: boolean;
|
|
309
|
+
/** Instant-effort only. */
|
|
310
|
+
forceRefresh?: boolean;
|
|
311
|
+
};
|
|
312
|
+
/** Maximum related search suggestions to include (1-20). */
|
|
313
|
+
includeRelated?: number;
|
|
314
|
+
}
|
|
315
|
+
interface TakoSearchInput {
|
|
316
|
+
query: string;
|
|
317
|
+
effort?: TakoSearchEffort;
|
|
318
|
+
sources?: {
|
|
319
|
+
data?: {
|
|
320
|
+
count?: number;
|
|
321
|
+
include_contents?: boolean;
|
|
322
|
+
mode?: 'inline' | 'url';
|
|
323
|
+
content_format?: TakoContentFormat;
|
|
324
|
+
max_rows?: number;
|
|
325
|
+
node_ids?: string[];
|
|
326
|
+
strict?: boolean;
|
|
327
|
+
};
|
|
328
|
+
web?: {
|
|
329
|
+
count?: number;
|
|
330
|
+
include_contents?: boolean;
|
|
331
|
+
category?: 'finance' | 'news' | 'sports';
|
|
332
|
+
include_domains?: string[];
|
|
333
|
+
exclude_domains?: string[];
|
|
334
|
+
snippet_max_chars?: number;
|
|
335
|
+
highlights?: boolean;
|
|
336
|
+
article_content_max_chars?: number;
|
|
337
|
+
published_after?: string;
|
|
338
|
+
published_before?: string;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
location?: {
|
|
342
|
+
latitude: number;
|
|
343
|
+
longitude: number;
|
|
344
|
+
};
|
|
345
|
+
country_code?: string;
|
|
346
|
+
locale?: string;
|
|
347
|
+
timezone?: string;
|
|
348
|
+
output_settings?: {
|
|
349
|
+
image_dark_mode?: boolean;
|
|
350
|
+
force_refresh?: boolean;
|
|
351
|
+
};
|
|
352
|
+
include_related?: number;
|
|
353
|
+
}
|
|
354
|
+
type TakoDatasetCell = boolean | number | string | null;
|
|
355
|
+
interface TakoResultContent {
|
|
356
|
+
content_format?: TakoContentFormat | null;
|
|
357
|
+
cost?: number;
|
|
358
|
+
data?: string | null;
|
|
359
|
+
records?: Array<Record<string, TakoDatasetCell>> | null;
|
|
360
|
+
dataset?: {
|
|
361
|
+
columns: Array<{
|
|
362
|
+
name: string;
|
|
363
|
+
type: 'boolean' | 'date' | 'datetime' | 'number' | 'string';
|
|
364
|
+
unit?: string | null;
|
|
365
|
+
}>;
|
|
366
|
+
rows: TakoDatasetCell[][];
|
|
367
|
+
total_rows: number;
|
|
368
|
+
truncated: boolean;
|
|
369
|
+
ref: string;
|
|
370
|
+
sources: Array<{
|
|
371
|
+
name: string;
|
|
372
|
+
index?: 'data' | 'web';
|
|
373
|
+
}>;
|
|
374
|
+
provenance?: 'query' | 'web_extraction';
|
|
375
|
+
} | null;
|
|
376
|
+
card_data?: Record<string, unknown> | null;
|
|
377
|
+
card_data_schema?: Record<string, unknown> | null;
|
|
378
|
+
url?: string | null;
|
|
379
|
+
expires_at?: string | null;
|
|
380
|
+
total_rows?: number | null;
|
|
381
|
+
truncated?: boolean;
|
|
382
|
+
export_pricing?: {
|
|
383
|
+
baseline_usd: number;
|
|
384
|
+
free_rows: number;
|
|
385
|
+
max_rows_ceiling: number;
|
|
386
|
+
row_cpm_usd: number;
|
|
387
|
+
} | null;
|
|
388
|
+
manifest?: Array<{
|
|
389
|
+
dtype?: 'boolean' | 'date' | 'datetime' | 'number' | 'string' | null;
|
|
390
|
+
entity?: string | null;
|
|
391
|
+
metric?: string | null;
|
|
392
|
+
name?: string | null;
|
|
393
|
+
unit?: string | null;
|
|
394
|
+
}> | null;
|
|
395
|
+
}
|
|
396
|
+
interface TakoCard {
|
|
397
|
+
card_id?: string | null;
|
|
398
|
+
title?: string | null;
|
|
399
|
+
description?: string | null;
|
|
400
|
+
semantic_description?: string | null;
|
|
401
|
+
webpage_url?: string | null;
|
|
402
|
+
image_url?: string | null;
|
|
403
|
+
embed_url?: string | null;
|
|
404
|
+
sources?: Array<{
|
|
405
|
+
source_name?: string | null;
|
|
406
|
+
source_description?: string | null;
|
|
407
|
+
source_index: 'data' | 'web';
|
|
408
|
+
source_text?: string | null;
|
|
409
|
+
url?: string | null;
|
|
410
|
+
}> | null;
|
|
411
|
+
methodologies?: Array<{
|
|
412
|
+
methodology_name: string | null;
|
|
413
|
+
methodology_description: string | null;
|
|
414
|
+
}> | null;
|
|
415
|
+
source_indexes?: Array<'data' | 'web'> | null;
|
|
416
|
+
card_type?: string | null;
|
|
417
|
+
relevance?: 'High' | 'Low' | 'Medium' | null;
|
|
418
|
+
content?: TakoResultContent | null;
|
|
419
|
+
exportable?: boolean;
|
|
420
|
+
relevance_score?: number | null;
|
|
421
|
+
nodes?: Array<{
|
|
422
|
+
id: string;
|
|
423
|
+
type: 'entity' | 'metric';
|
|
424
|
+
name: string;
|
|
425
|
+
description?: string | null;
|
|
426
|
+
}> | null;
|
|
427
|
+
metric_definitions?: Array<{
|
|
428
|
+
name: string;
|
|
429
|
+
definition: string;
|
|
430
|
+
}> | null;
|
|
431
|
+
data_freshness?: {
|
|
432
|
+
coverage_end?: string | null;
|
|
433
|
+
data_as_of?: string | null;
|
|
434
|
+
last_updated?: string | null;
|
|
435
|
+
} | null;
|
|
436
|
+
}
|
|
437
|
+
interface TakoWebResult {
|
|
438
|
+
title: string;
|
|
439
|
+
url: string;
|
|
440
|
+
snippet?: string | null;
|
|
441
|
+
source_name?: string | null;
|
|
442
|
+
publish_date?: string | null;
|
|
443
|
+
content?: TakoResultContent | null;
|
|
444
|
+
citation_number?: number | null;
|
|
445
|
+
}
|
|
446
|
+
interface TakoSearchResponse {
|
|
447
|
+
request_id: string;
|
|
448
|
+
cards?: TakoCard[];
|
|
449
|
+
web_results?: TakoWebResult[];
|
|
450
|
+
usage?: {
|
|
451
|
+
total_cost_usd: number;
|
|
452
|
+
compute?: {
|
|
453
|
+
cost_usd: number;
|
|
454
|
+
} | null;
|
|
455
|
+
data?: {
|
|
456
|
+
cost_usd: number;
|
|
457
|
+
datasets: number;
|
|
458
|
+
} | null;
|
|
459
|
+
} | null;
|
|
460
|
+
related?: Array<Record<string, unknown>> | null;
|
|
461
|
+
}
|
|
462
|
+
interface TakoSearchError {
|
|
463
|
+
error: 'api_error' | 'configuration_error' | 'execution_error' | 'invalid_input' | 'rate_limit' | 'timeout' | 'unknown_tool';
|
|
464
|
+
statusCode?: number;
|
|
465
|
+
message: string;
|
|
466
|
+
}
|
|
467
|
+
type TakoSearchOutput = TakoSearchError | TakoSearchResponse;
|
|
468
|
+
declare const takoSearchToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<TakoSearchInput, TakoSearchOutput, TakoSearchConfig, {}>;
|
|
469
|
+
|
|
247
470
|
interface PerplexitySearchConfig {
|
|
248
471
|
/**
|
|
249
472
|
* Default maximum number of search results to return (1-20, default: 10).
|
|
@@ -661,6 +884,15 @@ declare const gatewayTools: {
|
|
|
661
884
|
* domain, language, date range, and recency filters.
|
|
662
885
|
*/
|
|
663
886
|
perplexitySearch: (config?: PerplexitySearchConfig) => ReturnType<typeof perplexitySearchToolFactory>;
|
|
887
|
+
/**
|
|
888
|
+
* Search the web and Tako's curated knowledge graph in one call for
|
|
889
|
+
* token-efficient web excerpts and structured data results grounded in
|
|
890
|
+
* premium sources, each with an embed-ready visualization.
|
|
891
|
+
*
|
|
892
|
+
* Supports effort, per-source web and data controls, localization, and inline
|
|
893
|
+
* contents for agents that need to reason over underlying data.
|
|
894
|
+
*/
|
|
895
|
+
takoSearch: (config?: TakoSearchConfig) => ReturnType<typeof takoSearchToolFactory>;
|
|
664
896
|
};
|
|
665
897
|
|
|
666
898
|
interface GatewayProvider extends ProviderV4 {
|
package/dist/index.js
CHANGED
|
@@ -3211,6 +3211,213 @@ var perplexitySearchToolFactory = createProviderExecutedToolFactory3({
|
|
|
3211
3211
|
});
|
|
3212
3212
|
var perplexitySearch = (config = {}) => perplexitySearchToolFactory(config);
|
|
3213
3213
|
|
|
3214
|
+
// src/tool/tako-search.ts
|
|
3215
|
+
import {
|
|
3216
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory4,
|
|
3217
|
+
lazySchema as lazySchema13,
|
|
3218
|
+
zodSchema as zodSchema13
|
|
3219
|
+
} from "@ai-sdk/provider-utils";
|
|
3220
|
+
var takoDataSourceInputSchema = z.object({
|
|
3221
|
+
count: z.number().optional().describe("Maximum number of data cards to return (1-20)."),
|
|
3222
|
+
include_contents: z.boolean().optional().describe("Inline underlying card data. This can add a data charge."),
|
|
3223
|
+
mode: z.enum(["inline", "url"]).optional().describe(
|
|
3224
|
+
"Requested data delivery mode. Search card data is always inline."
|
|
3225
|
+
),
|
|
3226
|
+
content_format: z.enum(["card_json", "csv", "json_compact", "json_records"]).optional().describe("Serialization for inlined card data."),
|
|
3227
|
+
max_rows: z.number().optional().describe("Maximum rows for inlined card data."),
|
|
3228
|
+
node_ids: z.array(z.string()).optional().describe("Data Graph node IDs to prioritize. Maximum 20."),
|
|
3229
|
+
strict: z.boolean().optional().describe(
|
|
3230
|
+
"Only return cards matching node_ids. Requires a non-empty node_ids."
|
|
3231
|
+
)
|
|
3232
|
+
});
|
|
3233
|
+
var takoWebSourceInputSchema = z.object({
|
|
3234
|
+
count: z.number().optional().describe("Maximum number of web results to return (1-20)."),
|
|
3235
|
+
include_contents: z.boolean().optional().describe("Inline extracted web page text. This can add a data charge."),
|
|
3236
|
+
category: z.enum(["finance", "news", "sports"]).optional().describe("Optional web-result category filter."),
|
|
3237
|
+
include_domains: z.array(z.string()).optional().describe("Only return results from these bare domains."),
|
|
3238
|
+
exclude_domains: z.array(z.string()).optional().describe("Exclude results from these bare domains."),
|
|
3239
|
+
snippet_max_chars: z.number().optional().describe("Maximum characters in each web-result snippet."),
|
|
3240
|
+
highlights: z.boolean().optional().describe(
|
|
3241
|
+
"Include highlighted passages in web results. Defaults to true in AI Gateway."
|
|
3242
|
+
),
|
|
3243
|
+
article_content_max_chars: z.number().optional().describe(
|
|
3244
|
+
"Maximum extracted characters per web page when including contents."
|
|
3245
|
+
),
|
|
3246
|
+
published_after: z.string().optional().describe("Keep results published on or after this ISO date (YYYY-MM-DD)."),
|
|
3247
|
+
published_before: z.string().optional().describe(
|
|
3248
|
+
"Keep results published on or before this ISO date (YYYY-MM-DD)."
|
|
3249
|
+
)
|
|
3250
|
+
});
|
|
3251
|
+
var takoSearchInputSchema = lazySchema13(
|
|
3252
|
+
() => zodSchema13(
|
|
3253
|
+
z.object({
|
|
3254
|
+
query: z.string().describe(
|
|
3255
|
+
'Natural-language search query. Include the entity, metric, and time period. Quote a phrase to force it to one entity, for example "Tesla":PRODUCT price.'
|
|
3256
|
+
),
|
|
3257
|
+
effort: z.enum(["deep", "fast", "instant"]).optional().describe(
|
|
3258
|
+
"Search effort. fast is the balanced default, instant favors cached results and low latency, and deep broadens retrieval with reranking at higher cost and latency."
|
|
3259
|
+
),
|
|
3260
|
+
sources: z.object({
|
|
3261
|
+
data: takoDataSourceInputSchema.optional(),
|
|
3262
|
+
web: takoWebSourceInputSchema.optional()
|
|
3263
|
+
}).optional().describe(
|
|
3264
|
+
"Sources to search. Omit to search both curated data and the web. When provided, only keys present are searched."
|
|
3265
|
+
),
|
|
3266
|
+
location: z.object({
|
|
3267
|
+
latitude: z.number().describe("Latitude between -90 and 90."),
|
|
3268
|
+
longitude: z.number().describe("Longitude between -180 and 180.")
|
|
3269
|
+
}).optional().describe("End-user coordinates for localized results."),
|
|
3270
|
+
country_code: z.string().optional().describe("Two-letter ISO 3166-1 country code, such as 'US'."),
|
|
3271
|
+
locale: z.string().optional().describe("BCP-47 locale, such as 'en-US'."),
|
|
3272
|
+
timezone: z.string().optional().describe("IANA timezone, such as 'America/New_York'."),
|
|
3273
|
+
output_settings: z.object({
|
|
3274
|
+
image_dark_mode: z.boolean().optional().describe("Render card preview images in dark mode."),
|
|
3275
|
+
force_refresh: z.boolean().optional().describe(
|
|
3276
|
+
"Instant-effort only. Request a refreshed instant result."
|
|
3277
|
+
)
|
|
3278
|
+
}).optional().describe("Controls card rendering in the search response."),
|
|
3279
|
+
include_related: z.number().optional().describe("Maximum related search suggestions to include (1-20).")
|
|
3280
|
+
})
|
|
3281
|
+
)
|
|
3282
|
+
);
|
|
3283
|
+
var takoDatasetCellSchema = z.union([z.boolean(), z.number(), z.string()]).nullable();
|
|
3284
|
+
var takoResultContentSchema = z.object({
|
|
3285
|
+
content_format: z.enum(["card_json", "csv", "json_compact", "json_records"]).nullish(),
|
|
3286
|
+
cost: z.number().optional(),
|
|
3287
|
+
data: z.string().nullish(),
|
|
3288
|
+
records: z.array(z.record(z.string(), takoDatasetCellSchema)).nullish(),
|
|
3289
|
+
dataset: z.object({
|
|
3290
|
+
columns: z.array(
|
|
3291
|
+
z.object({
|
|
3292
|
+
name: z.string(),
|
|
3293
|
+
type: z.enum(["boolean", "date", "datetime", "number", "string"]),
|
|
3294
|
+
unit: z.string().nullish()
|
|
3295
|
+
})
|
|
3296
|
+
),
|
|
3297
|
+
rows: z.array(z.array(takoDatasetCellSchema)),
|
|
3298
|
+
total_rows: z.number(),
|
|
3299
|
+
truncated: z.boolean(),
|
|
3300
|
+
ref: z.string(),
|
|
3301
|
+
sources: z.array(
|
|
3302
|
+
z.object({
|
|
3303
|
+
name: z.string(),
|
|
3304
|
+
index: z.enum(["data", "web"]).optional()
|
|
3305
|
+
})
|
|
3306
|
+
),
|
|
3307
|
+
provenance: z.enum(["query", "web_extraction"]).optional()
|
|
3308
|
+
}).nullish(),
|
|
3309
|
+
card_data: z.object({}).passthrough().nullish(),
|
|
3310
|
+
card_data_schema: z.object({}).passthrough().nullish(),
|
|
3311
|
+
url: z.string().nullish(),
|
|
3312
|
+
expires_at: z.string().nullish(),
|
|
3313
|
+
total_rows: z.number().nullish(),
|
|
3314
|
+
truncated: z.boolean().optional(),
|
|
3315
|
+
export_pricing: z.object({
|
|
3316
|
+
baseline_usd: z.number(),
|
|
3317
|
+
free_rows: z.number(),
|
|
3318
|
+
max_rows_ceiling: z.number(),
|
|
3319
|
+
row_cpm_usd: z.number()
|
|
3320
|
+
}).nullish(),
|
|
3321
|
+
manifest: z.array(
|
|
3322
|
+
z.object({
|
|
3323
|
+
dtype: z.enum(["boolean", "date", "datetime", "number", "string"]).nullish(),
|
|
3324
|
+
entity: z.string().nullish(),
|
|
3325
|
+
metric: z.string().nullish(),
|
|
3326
|
+
name: z.string().nullish(),
|
|
3327
|
+
unit: z.string().nullish()
|
|
3328
|
+
})
|
|
3329
|
+
).nullish()
|
|
3330
|
+
}).passthrough();
|
|
3331
|
+
var takoCardSchema = z.object({
|
|
3332
|
+
card_id: z.string().nullish(),
|
|
3333
|
+
title: z.string().nullish(),
|
|
3334
|
+
description: z.string().nullish(),
|
|
3335
|
+
semantic_description: z.string().nullish(),
|
|
3336
|
+
webpage_url: z.string().nullish(),
|
|
3337
|
+
image_url: z.string().nullish(),
|
|
3338
|
+
embed_url: z.string().nullish(),
|
|
3339
|
+
sources: z.array(
|
|
3340
|
+
z.object({
|
|
3341
|
+
source_name: z.string().nullish(),
|
|
3342
|
+
source_description: z.string().nullish(),
|
|
3343
|
+
source_index: z.enum(["data", "web"]),
|
|
3344
|
+
source_text: z.string().nullish(),
|
|
3345
|
+
url: z.string().nullish()
|
|
3346
|
+
})
|
|
3347
|
+
).nullish(),
|
|
3348
|
+
methodologies: z.array(
|
|
3349
|
+
z.object({
|
|
3350
|
+
methodology_name: z.string().nullable(),
|
|
3351
|
+
methodology_description: z.string().nullable()
|
|
3352
|
+
})
|
|
3353
|
+
).nullish(),
|
|
3354
|
+
source_indexes: z.array(z.enum(["data", "web"])).nullish(),
|
|
3355
|
+
card_type: z.string().nullish(),
|
|
3356
|
+
relevance: z.enum(["High", "Low", "Medium"]).nullish(),
|
|
3357
|
+
content: takoResultContentSchema.nullish(),
|
|
3358
|
+
exportable: z.boolean().optional(),
|
|
3359
|
+
relevance_score: z.number().nullish(),
|
|
3360
|
+
nodes: z.array(
|
|
3361
|
+
z.object({
|
|
3362
|
+
id: z.string(),
|
|
3363
|
+
type: z.enum(["entity", "metric"]),
|
|
3364
|
+
name: z.string(),
|
|
3365
|
+
description: z.string().nullish()
|
|
3366
|
+
})
|
|
3367
|
+
).nullish(),
|
|
3368
|
+
metric_definitions: z.array(z.object({ name: z.string(), definition: z.string() })).nullish(),
|
|
3369
|
+
data_freshness: z.object({
|
|
3370
|
+
coverage_end: z.string().nullish(),
|
|
3371
|
+
data_as_of: z.string().nullish(),
|
|
3372
|
+
last_updated: z.string().nullish()
|
|
3373
|
+
}).nullish()
|
|
3374
|
+
}).passthrough();
|
|
3375
|
+
var takoWebResultSchema = z.object({
|
|
3376
|
+
title: z.string(),
|
|
3377
|
+
url: z.string(),
|
|
3378
|
+
snippet: z.string().nullish(),
|
|
3379
|
+
source_name: z.string().nullish(),
|
|
3380
|
+
publish_date: z.string().nullish(),
|
|
3381
|
+
content: takoResultContentSchema.nullish(),
|
|
3382
|
+
citation_number: z.number().nullish()
|
|
3383
|
+
}).passthrough();
|
|
3384
|
+
var takoSearchOutputSchema = lazySchema13(
|
|
3385
|
+
() => zodSchema13(
|
|
3386
|
+
z.union([
|
|
3387
|
+
z.object({
|
|
3388
|
+
request_id: z.string(),
|
|
3389
|
+
cards: z.array(takoCardSchema).optional(),
|
|
3390
|
+
web_results: z.array(takoWebResultSchema).optional(),
|
|
3391
|
+
usage: z.object({
|
|
3392
|
+
total_cost_usd: z.number(),
|
|
3393
|
+
compute: z.object({ cost_usd: z.number() }).nullish(),
|
|
3394
|
+
data: z.object({ cost_usd: z.number(), datasets: z.number() }).nullish()
|
|
3395
|
+
}).nullish(),
|
|
3396
|
+
related: z.array(z.object({}).passthrough()).nullish()
|
|
3397
|
+
}).passthrough(),
|
|
3398
|
+
z.object({
|
|
3399
|
+
error: z.enum([
|
|
3400
|
+
"api_error",
|
|
3401
|
+
"configuration_error",
|
|
3402
|
+
"execution_error",
|
|
3403
|
+
"invalid_input",
|
|
3404
|
+
"rate_limit",
|
|
3405
|
+
"timeout",
|
|
3406
|
+
"unknown_tool"
|
|
3407
|
+
]),
|
|
3408
|
+
statusCode: z.number().optional(),
|
|
3409
|
+
message: z.string()
|
|
3410
|
+
})
|
|
3411
|
+
])
|
|
3412
|
+
)
|
|
3413
|
+
);
|
|
3414
|
+
var takoSearchToolFactory = createProviderExecutedToolFactory4({
|
|
3415
|
+
id: "gateway.tako_search",
|
|
3416
|
+
inputSchema: takoSearchInputSchema,
|
|
3417
|
+
outputSchema: takoSearchOutputSchema
|
|
3418
|
+
});
|
|
3419
|
+
var takoSearch = (config = {}) => takoSearchToolFactory(config);
|
|
3420
|
+
|
|
3214
3421
|
// src/gateway-tools.ts
|
|
3215
3422
|
var gatewayTools = {
|
|
3216
3423
|
/**
|
|
@@ -3237,7 +3444,16 @@ var gatewayTools = {
|
|
|
3237
3444
|
* Provides ranked search results with advanced filtering options including
|
|
3238
3445
|
* domain, language, date range, and recency filters.
|
|
3239
3446
|
*/
|
|
3240
|
-
perplexitySearch
|
|
3447
|
+
perplexitySearch,
|
|
3448
|
+
/**
|
|
3449
|
+
* Search the web and Tako's curated knowledge graph in one call for
|
|
3450
|
+
* token-efficient web excerpts and structured data results grounded in
|
|
3451
|
+
* premium sources, each with an embed-ready visualization.
|
|
3452
|
+
*
|
|
3453
|
+
* Supports effort, per-source web and data controls, localization, and inline
|
|
3454
|
+
* contents for agents that need to reason over underlying data.
|
|
3455
|
+
*/
|
|
3456
|
+
takoSearch
|
|
3241
3457
|
};
|
|
3242
3458
|
|
|
3243
3459
|
// src/vercel-environment.ts
|
|
@@ -3249,7 +3465,7 @@ async function getVercelRequestId() {
|
|
|
3249
3465
|
}
|
|
3250
3466
|
|
|
3251
3467
|
// src/version.ts
|
|
3252
|
-
var VERSION = true ? "4.0.
|
|
3468
|
+
var VERSION = true ? "4.0.62" : "0.0.0-test";
|
|
3253
3469
|
|
|
3254
3470
|
// src/gateway-provider.ts
|
|
3255
3471
|
var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
|