AI SDK v6 Support: Fallom fully supports AI SDK v6 including the new
ToolLoopAgent class, tool approval workflows, and all v6 features. Both v5 and v6 patterns work with our SDK.Installation
Version Compatibility
Two Approaches (Pick ONE)
Option 1: Wrap the SDK (Recommended)
Full tracing - captures prompts, completions, tokens, costs, and all metadata.Option 2: Wrap the Model (PostHog Style)
Simpler integration - captures tokens and timing only.This approach does NOT capture prompt or completion content. Use Option 1 if
you need full observability.
With OpenRouter
Streaming with TTFT
Streaming responses automatically capture time to first token (TTFT):Structured Output
generateObject and streamObject are also supported:
Tool Calling (Agents)
The Vercel AI SDK supports tool/function calling withmaxSteps for multi-turn agent behavior. All tool calls are automatically traced:
What Gets Traced for Tool Calls
AI SDK v6: ToolLoopAgent
AI SDK v6 introduces theToolLoopAgent class for building reusable agents. Fallom supports tracing ToolLoopAgent by wrapping the underlying AI SDK functions:
ToolLoopAgent with Streaming
Call Options (v6)
AI SDK v6 supports type-safe call options for dynamic agent configuration:Tool Approval (Human-in-the-Loop)
AI SDK v6 supports tool approval workflows. UseonStepFinish to implement human-in-the-loop:
Model A/B Testing
Test different models with consistent session assignment:Prompt Management
Use managed prompts with the Vercel AI SDK:What Gets Traced
With Other Providers
The wrapper works with any Vercel AI SDK provider:- Anthropic
- Google
- Mistral
Alternative: OpenRouter Broadcast
If you’re using OpenRouter and prefer zero-SDK tracing, use OpenRouter Broadcast. However, Vercel AI SDK doesn’t pass custom body fields to OpenRouter, so you’ll need to use the OpenAI SDK directly for session tracking:Next Steps
Model A/B Testing
Set up experiments to test different models.
Prompt Management
Manage and version your prompts.
Mastra Agents
Use with Mastra AI agent framework.
OpenRouter Broadcast
Zero-code tracing via OpenRouter.

