The Vercel AI SDK integration is available in the PandaProbe TypeScript SDK only. Vercel AI does not provide a Python SDK.
Installation
Install PandaProbe, the Vercel AI SDK, and the provider package used by your model. This example uses OpenAI.- npm
- yarn
- pnpm
Setup
Wrap the language model with PandaProbe middleware before passing it togenerateText, streamText, or other Vercel AI SDK functions that use the language model middleware interface.
TypeScript
withTrace(), the model call becomes a nested LLM span.
Generate text
TypeScript
Stream text
TypeScript
What gets traced
Custom span name
The default span and standalone trace name isvercel-ai-generate. Override it when one application uses multiple wrapped models:
TypeScript
Combine with manual tracing
TypeScript
LLM span.
