The Vercel AI SDK integration (Documentation Index
Fetch the complete documentation index at: https://metorial.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
@metorial/ai-sdk) is the recommended way to use Metorial in TypeScript applications. It provides excellent streaming support, a unified interface across multiple model providers, and seamless tool integration.
This integration works with any model provider supported by the AI SDK, including Anthropic, OpenAI, Google, and more. You get all the benefits of the AI SDK’s streaming and tool handling while Metorial manages your provider connections.
What this example does:
- Creates a Metorial session connected to your provider deployment
- Passes MCP tools directly to the AI SDK’s
streamTextfunction - Streams the AI’s response in real-time