Access Perplexity Web Search on Vercel AI Gateway with any model
Vercel AI Gateway now supports Perplexity Search as a universal web search tool that works with all models, regardless of provider. Developers can enable web search capabilities on any model using the gateway.tools.perplexitySearch() function in the AI SDK.
You can now give any model the ability to search the web using Perplexity through Vercel's AI Gateway.
AI Gateway supports Perplexity Search as a universal web search tool that works with all models, regardless of provider. Unlike native search tools that are exclusive to specific providers, Perplexity Search can be added to all models.
To use Perplexity Search with the AI SDK, import from and pass it in the tools parameter as to any model.gateway.tools.perplexitySearch()@ai-sdk/gatewayperplexity_search
Some example use cases include:
• Enable web search on models like or any from any other providers that don't expose a built-in search tool.Models without native search:zai/glm-4.7
• Get current package versions, recently merged PRs, release notes, or docs updates.Developer tooling and CI assistants:
• Maintain search behavior across multiple providers without rewriting search logic.Consistency with fallbacks:
For more information, see the .AI Gateway Perplexity Web Search docs
Source: original entry ↗
More from Vercel
Follow Vercel to get its new changes in your feed and email digest.
OpenAI Decisions API now available on AI Gateway
OpenAI's Decisions API is now accessible through Vercel's AI Gateway with an OpenAI-compatible endpoint, enabling decision models to answer typed questions and return probabilities, choices, and scores for routing, triage, and guardrails use cases. Support is available across the OpenAI SDK, AI SDK, HTTP API, and CLI with the latest versions.
Timestamp attributes now supported in Vercel Flags
Vercel Flags now supports timestamp attributes for entities, allowing you to create time-based targeting rules. Use this feature to run limited-time campaigns, show content between specific dates, or target users based on registration date.
Glyph Cluster now available in stealth on AI Gateway
Glyph Cluster, a reasoning model for coding and long-context analysis, is now available as a stealth model on Vercel's AI Gateway for Pro and Enterprise plan teams with purchased AI Gateway credits at no cost during the stealth period. The model supports function calling, streams responses, and can be accessed via AI SDK, OpenAI-compatible APIs, and coding agents.