openInferenceMiddleware() into any chat() call to capture an AGENT span for the run, an LLM span for each model turn, and a TOOL span for every executed tool call — across both streaming and non-streaming flows, and across any TanStack AI provider adapter.

This integration is brand new. If you run into issues or have ideas for improvements, please reach out via the OpenInference repo — we’d love your feedback.
TanStack AI Tracing Docs
Setup, usage, and a tool-calling example.
TanStack AI
Learn more about TanStack AI.

