Maxim Integration for Vercel
Requirements
Maxim supports both AI SDK 5 and AI SDK 6. The integration works seamlessly with either version.
Environment Variables
Initialize Logger
Wrap AI SDK Models with Maxim
Make LLM Calls Using Wrapped Models
Working with Different AI SDK Functions
The wrapped model works seamlessly with all Vercel AI SDK functions:Generate Object
Stream Text
Custom Metadata and Tracing
Using Custom Metadata
Available Metadata Fields
Entity Naming:sessionName- Override the default session nametraceName- Override the default trace namespanName- Override the default span namegenerationName- Override the default LLM generation name
sessionTags- Add custom tags to the session(object: {key: value})traceTags- Add custom tags to the trace(object: {key: value})spanTags- Add custom tags to span(object: {key: value})generationTags- Add custom tags to LLM generations(object: {key: value})
sessionId- Link this trace to an existing sessiontraceId- Use a specific trace IDspanId- Use a specific span ID
