Skip to content

Releases: Voightxyz/voight-vercel-ai

v0.1.1 — Dedup spans emitted by wrappers

23 May 00:03

Choose a tag to compare

Closes the duplicate-event footgun when users wire both @voightxyz/openai / @voightxyz/anthropic (otel: true) AND VoightExporter into the same OTel runtime.

What changed

VoightExporter.export() now recognises the voight.source: 'wrapper' attribute that the OpenAI + Anthropic wrappers stamp on their OTel spans (when run with otel: true), and skips those spans cleanly — no POST, no error, callback still SUCCESS.

Spans without that attribute — the canonical streamText / generateText / streamObject / generateObject spans the Vercel AI SDK emits — are unaffected and continue to flow. Other OTel exporters in the same process (Langfuse, Datadog, Phoenix, Sentry) aren't filtered; the dedup is scoped to the Voight-to-Voight loop.

Companion releases

Ships alongside:

Both gain the otel: true opt-in that emits the dedup-marked spans.

Validation

End-to-end smoke from the npm registry (after beta cycle): wrapped OpenAI + Anthropic calls with otel: true and VoightExporter in the same OTel runtime → exactly 1 POST to /v1/events per call. Pre-existing Vercel AI SDK spans → forwarded normally.

Tests: 105 → 109 green (4 new dedup cases). B.8.4: removing the filter triggers exactly 2 failures.

Install

npm install @voightxyz/vercel-ai

Links

v0.1.0 — Vercel AI SDK observability

21 May 15:28

Choose a tag to compare

First stable release of @voightxyz/vercel-ai — an OpenTelemetry SpanExporter that ingests the experimental_telemetry spans the Vercel AI SDK emits natively. Register it next to @vercel/otel, enable telemetry on your streamText / generateText / streamObject / generateObject calls, and every call lands in your Voight dashboard.

Install

npm install ai @ai-sdk/openai @vercel/otel @voightxyz/vercel-ai

Or run the wizard from the main SDK:

npx -y @voightxyz/sdk init

It detects ai in your package.json and writes a ready-to-load instrumentation.ts for you.

What gets captured

  • streamText / generateText / streamObject / generateObject — one event per LLM call (Vercel outer wrappers are filtered out so token counts stay accurate)
  • OpenAI + Anthropic provider attribution (via gen_ai.system / ai.model.provider)
  • Tool calls (normalised to {id, name, arguments} JSON-string), token counts (input / output / cache_read / cache_creation), finish reason, streaming flag, sessionId
  • Per-user attribution via experimental_telemetry.metadata — passing { metadata: { userId, plan, … } } activates the dashboard Users sub-tab + per-tag filter pills automatically
  • Three privacy levels ('minimal' / 'standard' / 'full') sharing the same 12-pattern PII catalogue as the rest of the Voight SDK family
  • Coexists with other observability tools via OTel's MultiSpanProcessor

Validated against

End-to-end soak with the vercel/ai-chatbot reference app — multi-turn streaming, tool calls (getWeather, createDocument, …), per-user guest sessions, and full trace grouping all land cleanly.

Why an OTel SpanExporter

The Vercel AI SDK emits OpenTelemetry spans natively — the same wire format every observability tool listed in the Vercel AI SDK docs consumes (Langfuse, Helicone, Phoenix, Braintrust, Datadog, Sentry, W&B). We follow the same contract: drop in Voight as the sole provider, or pair it with another exporter via MultiSpanProcessor. No vendor lock, no custom middleware.

Links