unstale

npm / braintrust

braintrust

What changed in braintrust 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

16 breaking1 security1 deprecations101 new APIs and options3 performance41 behavior and defaults19 tooling95 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

braintrust 3259 changes

Breaking changes 8

  • Long-lived Node processes batch nearby log rows into fewer HTTP requests, waiting up to 1s before flushing; call flush() before shutdown on signals or process.exit(). Serverless and other runtimes still flush immediately by default.

    3.40.0release notes

  • Changes the batch evals API into an API for evals with deferred AI provider calls.

    3.33.0release notes

  • Removes output from the dataset pipeline row type definition.

    3.16.0release notes

  • The @flue/runtime export wrapFlueContext was removed.

    3.15.0release notes

  • The @flue/runtime export wrapFlueSession was removed.

    3.15.0release notes

  • Rejects __proto__, constructor, and prototype keys to prevent prototype pollution from untrusted merge sources.

    3.12.0release notes

  • Adds the canonical Next.js setup utility in place of the webpack loader/plugin.

    3.12.0release notes

  • Built-in tools are now nested under sub-agents.

    3.10.0release notes

Security 1

  • LiveKit tracing now respects LiveKit's PII and project redaction settings.

    3.43.0release notes

Deprecations 1

  • Deprecates the old bundler plugin aliases in favor of the new aliases.

    3.12.0release notes

New APIs and options 93

  • LangChain adds capture controls.

    3.44.0release notes

  • Instrumentation now tracks service tiers.

    3.44.0release notes

  • Adds tracing support for fastmcp.

    3.43.0release notes

  • Adds tracing for LiveKit voice sessions using audio schema v3.

    3.43.0release notes

  • Adds tracing support for mcp-handler.

    3.43.0release notes

  • Compressed voice recordings are available with this package.

    3.41.0release notes

  • MCP server tracing is now supported.

    3.41.0release notes

  • LiveKit can record caller and agent audio using explicit per-direction flags.

    3.41.0release notes

  • Configures the delay before batched log rows are flushed.

    3.40.0release notes

  • Adds tracing for Clef and Clairic through workers-ai.

    3.40.0release notes

  • Adds application logging and console capture.

    3.39.0release notes

  • Adds batch tracing for the AI SDK.

    3.39.0release notes

  • Adds instrumentation for LiveKit cascade mode.

    3.39.0release notes

  • AI SDK instrumentation traces decision calls and media.

    3.38.0release notes

  • Typesafe tracing can capture image inputs.

    3.38.0release notes

  • OpenTelemetry spans can be customized.

    3.38.0release notes

  • Workflow evals now support batch tasks and scorers.

    3.37.0release notes

  • Eval cancellation now stops scheduling trials, aborts the signal passed to task hooks, and waits for in-flight tasks and scorers to settle before rejecting. Pass hooks.signal to task APIs or check signal.aborted to stop work early.

    3.37.0release notes

  • Logger options now include _createInProjectGroup.

    3.36.0release notes

  • Helper types for pushing pre-processors are now exposed.

    3.36.0release notes

  • Add projectGroupName to create projects inside a project group.

    3.36.0release notes

  • Adds span provenance for Temporal and OpenAI Agents SDK.

    3.36.0release notes

  • Adds instrumentation for OpenAI multimodal APIs.

    3.35.0release notes

  • Adds hooks for exporting spans.

    3.35.0release notes

  • Adds AI SDK instrumentation for typesafe ai jev.

    3.34.0release notes

  • Adds instrumentation for @typesafe-ai/sdk, allowing developers to instrument its usage with Braintrust.

    3.34.0release notes

  • Adds utilities to push and preview custom views.

    3.33.0release notes

  • Adds instrumentation for Google GenAI multimodal embeddings.

    3.33.0release notes

  • Adds instrumentation for the LangGraph SDK.

    3.33.0release notes

  • Adds instrumentation for the OpenAI agents API.

    3.33.0release notes

  • Adds advanced filters to Trace.getSpans(), allowing developers to filter spans with more control.

    3.33.0release notes

  • Prompt templates support input audio content.

    3.32.0release notes

  • Tool IDs are tracked for AI SDK v6.

    3.31.0release notes

  • Adds instrumentation for the OpenAI Batch API.

    3.30.0release notes

  • initDataset() supports datasetId.

    3.29.0release notes

  • loadPrompt accepts an apiKey argument.

    3.29.0release notes

  • Instrumentation now supports Vercel AI SDK image generation.

    3.29.0release notes

  • An experimental batch evals API was added.

    3.28.0release notes

  • Voyage instrumentation was added.

    3.28.0release notes

  • Adds instrumentation for @cloudflare/think.

    3.27.0release notes

  • Adds support for flue v2.

    3.27.0release notes

  • Adds meta.eval.input to vitest-evals.

    3.27.0release notes

  • Adds instrumentation for ollama.

    3.27.0release notes

  • Adds instrumentation for agents.

    3.26.0release notes

  • Adds instrumentation for @cloudflare/ai-chat.

    3.26.0release notes

  • Adds instrumentation for @huggingface/transformers.

    3.26.0release notes

  • Support is added for v1 of the OpenRouter SDK.

    3.25.0release notes

  • Adds LangSmith tracing.

    3.23.0release notes

  • Adds a scorer that exposes helpers to evaluate agents.

    3.21.0release notes

  • Forwards and picks up the --sample N flag.

    3.21.0release notes

  • Adds an API for distributed tracing across service boundaries.

    3.21.0release notes

  • Adds a flag to toggle realtime mode in the span fetcher.

    3.21.0release notes

  • Adds braintrustFlueInstrumentation() to make manual instrumentation slightly cleaner.

    3.20.0release notes

  • Adds support for @anthropic-ai/bedrock-sdk.

    3.19.0release notes

  • Adds support for @aws-sdk/client-bedrock-runtime.

    3.19.0release notes

  • Adds support for manual instrumentation for flue v1.

    3.19.0release notes

  • Adds support for @strands-agents/sdk.

    3.19.0release notes

  • Adds AI SDK v7 support.

    3.18.0release notes

  • Adds instrumentation for the pi-coding-agent package.

    3.18.0release notes

  • Adds project-level classifier builder support for function push.

    3.18.0release notes

  • Adds Google GenAI instrumentation for the interactions API.

    3.18.0release notes

  • Inline eval cases can carry explicit origin metadata.

    3.18.0release notes

  • Installing braintrust exposes a bt command in node_modules/.bin that runs the prebuilt native binary for your platform.

    3.17.0release notes

  • invoke() now accepts overrides.

    3.16.0release notes

  • Exports LocalTrace for use by developers.

    3.16.0release notes

  • Adds an environment variable to control the caching location.

    3.14.0release notes

  • Adds auto-instrumentation for Mastra.

    3.14.0release notes

  • The dataset pipeline argument now includes the span id.

    3.13.0release notes

  • Dataset pipelines are available as an experimental feature.

    3.13.0release notes

  • Adds an entrypoint for CJS/TS patching.

    3.12.0release notes

  • Adds an esbuild bundler plugin alias.

    3.12.0release notes

  • Adds a Rollup bundler plugin alias.

    3.12.0release notes

  • Adds a Vite bundler plugin alias.

    3.12.0release notes

  • Adds a webpack bundler plugin alias.

    3.12.0release notes

  • Adds instrumentation for @flue/runtime.

    3.12.0release notes

  • Adds automatic instrumentation for LangChain.

    3.12.0release notes

  • Adds automatic instrumentation for LangGraph.

    3.12.0release notes

  • Adds automatic instrumentation for the OpenAI Agents SDK.

    3.12.0release notes

  • Adds instrumentation for Firebase genkit.

    3.11.0release notes

  • Captures multi-turn message APIs with a wrapper.

    3.11.0release notes

  • Captures reasoning for Groq reasoning models.

    3.11.0release notes

  • wrapVitest now supports projectId.

    3.11.0release notes

  • Thinking is now captured with Cohere.

    3.10.0release notes

  • Dataset versioning support was added, allowing developers to work with versioned datasets.

    3.10.0release notes

  • Experiment dataset filters are now included in experiment metadata.

    3.10.0release notes

  • Instrumentation was added for groq-sdk.

    3.10.0release notes

  • Adds cohere-ai instrumentation.

    3.9.0release notes

  • Adds per-input trialCount support to Eval().

    3.9.0release notes

  • Captures grounding metadata for Google GenAI.

    3.9.0release notes

  • Adds instrumentation for @huggingface/inference.

    3.9.0release notes

  • Adds reranking instrumentation for AI SDK and Openrouter SDK.

    3.9.0release notes

  • Tracks server tool use metrics for the Anthropic SDK.

    3.9.0release notes

  • Adds x-bt-use-gateway to the allowed CORS headers.

    3.9.0release notes

Performance 3

Behavior and default changes 39

  • Support for eve was bumped, including support for eve 1.0.0.

    3.44.0release notes

  • Support for the openrouter sdk was bumped.

    3.44.0release notes

  • Bumps support for Cloudflare Agents.

    3.43.0release notes

  • Bumps support for Cloudflare AI Chat.

    3.43.0release notes

  • Bumps support for Cloudflare Think.

    3.43.0release notes

  • Bumps support for Google ADK.

    3.43.0release notes

  • Bumps support for Mistral.

    3.43.0release notes

  • MCP tool and prompt content is captured by default.

    3.42.0release notes

  • Tracing now includes server notifications and session metadata.

    3.42.0release notes

  • Captures system instructions and declared tool schemas from Pi 1.4 transcript messages, including section updates and tool additions and removals; wraps refreshed tool executors from agent state while preserving legacy context support.

    3.40.0release notes

  • Supports Cloudflare Think versions 0.13 through 0.20.

    3.39.0release notes

  • An empty value is ignored so the organization URL is used instead.

    3.38.0release notes

  • OpenAI instrumentation traces Decisions API calls.

    3.38.0release notes

  • Made @types/react an optional peer dependency so braintrust no longer installs React 18 types for every consumer, avoiding ReactNode type conflicts in React 19 projects.

    3.37.2release notes

  • Eve compatibility now includes versions 0.62 and 0.70.

    3.37.0release notes

  • Streams ending with response.incomplete or response.failed now log output and token metrics; response.failed also logs the error.

    3.37.0release notes

  • Eve turns are now nested under the caller's propagated trace context.

    3.37.0release notes

  • Span customizers are enhanced.

    3.36.0release notes

  • Zod v4 schemas are supported for eval parameters and function parameters.

    3.36.0release notes

  • Scorer results can be nameless.

    3.31.0release notes

  • The eval command applies auto instrumentation.

    3.29.0release notes

  • Instrumentation uses new eve instrumentation hooks.

    3.29.0release notes

  • The instrumentation name is recorded as part of span provenance.

    3.25.0release notes

  • Captures readable reasoning on the originating LLM span across workflow resumes.

    3.24.0release notes

  • Adds span origin provenance metadata to Braintrust and OpenTelemetry spans.

    3.24.0release notes

  • Eve session IDs are recorded on all spans.

    3.23.0release notes

  • Eve turns are tracked as individual traces.

    3.23.0release notes

  • Strands logs inline document, image, and video bytes as Braintrust attachments.

    3.23.0release notes

  • Parallel tool calls are captured in Eve LLM span output.

    3.23.0release notes

  • Mastra now records time_to_first_token for streaming.

    3.23.0release notes

  • Stops capturing message history in AI SDK tool spans.

    3.21.0release notes

  • When optional dependencies are skipped, a postinstall script downloads the matching binary from the npm registry as a fallback.

    3.17.0release notes

  • Node.js login now searches upwards recursively for .env.braintrust containing BRAINTRUST_API_KEY.

    3.13.0release notes

  • Adds exponential backoff between existing retry attempts.

    3.12.0release notes

  • Git metadata is not collected by default when organization-level git metadata settings are absent.

    3.12.0release notes

  • Allows tracing across multiple projects by removing the parent project ID restriction.

    3.12.0release notes

  • OpenRouter instrumentation now captures reasoning.

    3.11.0release notes

  • The supported patching range now includes google ADK 1.0.0.

    3.10.0release notes

  • Improves task lifecycle handling and lifecycle details in the claude-agent-sdk.

    3.9.0release notes

Tooling 19

  • Bumps support for the AI SDK harness.

    3.43.0release notes

  • Bumps support for the Cursor SDK.

    3.43.0release notes

  • Adds AI SDK tracing for code mode.

    3.39.0release notes

  • Adds instrumentation for Google GenAI multimodal APIs.

    3.35.0release notes

  • Adds instrumentation for Groq audio APIs.

    3.35.0release notes

  • Instrumentation is added for @google/generative-ai.

    3.32.0release notes

  • Instrumentation is added for synchronous elevenlabs SDK APIs.

    3.32.0release notes

  • Adds instrumentation for anthropic.beta.sessions.

    3.27.0release notes

  • Auto instrumentation is updated to the current Pi Coding Agent SDK release.

    3.25.0release notes

  • Adds tracing support for HarnessAgent.

    3.24.0release notes

  • First-party eve instrumentation was added.

    3.22.0release notes

  • Adds instrumentation for Workflow Agent.

    3.21.0release notes

  • Adds a reporter for vitest-evals.

    3.19.0release notes

  • Adds instrumentation for Mistral classification and moderation APIs.

    3.11.0release notes

  • Adds instrumentation for @github/copilot-sdk.

    3.11.0release notes

  • Adds instrumentation for @openai/codex-sdk.

    3.11.0release notes

  • Instrumentation was added for @cursor/sdk.

    3.10.0release notes

  • Adds instrumentation for Google GenAI embedContent calls for text.

    3.9.0release notes

  • Adds instrumentation for the Anthropic SDK tool runner.

    3.9.0release notes

Fixes and other changes 95

  • AI SDK v7 inline file data is logged as attachments.

    3.44.0release notes

  • Support for mastra was bumped.

    3.44.0release notes

  • Support for openai agents was bumped.

    3.44.0release notes

  • Bumps support for the Anthropic SDK.

    3.43.0release notes

  • Improves automatic and manual SDK tracing.

    3.43.0release notes

  • Aligns Decisions spans with the Python SDK.

    3.43.0release notes

  • Bumps support for Google GenAI.

    3.43.0release notes

  • Bumps support for LangGraph.

    3.43.0release notes

  • Bumps support for LangSmith.

    3.43.0release notes

  • Remote eval requests' max_concurrency is now honored, capped by the evaluator's maxConcurrency.

    3.43.0release notes

  • Preserves UTF-8 when logging ReadableStream byte chunks.

    3.43.0release notes

  • Pi agent instrumentation is aligned with the tracing spec.

    3.42.0release notes

  • Tool tracing is restored for Eve 0.72 and later.

    3.41.0release notes

  • A streamed Google GenAI response with no content now retains its finish reason.

    3.41.0release notes

  • Recording uploads finish before session.close() resolves, preventing loss when the job process exits.

    3.41.0release notes

  • Keeps token usage on child LLM spans instead of repeating it on task spans, so trace rollups count each provider call once.

    3.40.0release notes

  • Preserves LiveKit's native lifecycle spans.

    3.40.0release notes

  • For AI SDK tools that define toModelOutput, tool spans and parent-span tool results now log the value the model saw instead of the raw execute result.

    3.40.0release notes

  • Adds support for TypeScript loaders in instrumentation.

    3.40.0release notes

  • Counts cache reads and writes in prompt_tokens.

    3.39.0release notes

  • Logs text and usage for streamed InvokeModel calls to OpenAI models.

    3.39.0release notes

  • Keeps streamed tool calls separate when a provider omits the index.

    3.39.0release notes

  • An empty value is ignored so the organization URL is used instead.

    3.38.0release notes

  • Tree shaking is restored for browser and edge builds.

    3.38.0release notes

  • Conflicting queued logins no longer replace active credentials.

    3.38.0release notes

  • Customizer errors fail closed without dropping records.

    3.38.0release notes

  • The Vite integration now supports Vite 8 dependency optimization.

    3.37.1release notes

  • Claude token usage statistics are fixed.

    3.37.0release notes

  • Empty numeric environment variables are ignored instead of being read as 0.

    3.36.0release notes

  • Preserves LangChain model attribution.

    3.36.0release notes

  • Fixes reasoning_content handling for OpenAI-compatible responses.

    3.36.0release notes

  • Stops resending span metadata on end rows.

    3.36.0release notes

  • Fixes token metrics when using AI SDK middleware.

    3.35.0release notes

  • Prevents dataset snapshots from silently including deleted rows.

    3.35.0release notes

  • Keeps tool spans current during execution so nested spans attach to the tool span.

    3.35.0release notes

  • Captures provider managed tool calls.

    3.35.0release notes

  • Captures the right provider when using the Vercel AI gateway.

    3.35.0release notes

  • OpenAI batch instrumentation now supports Uint8Array and Buffer JSONL sources.

    3.34.0release notes

  • OpenAI batch instrumentation now supports the /v1/embeddings endpoint.

    3.34.0release notes

  • Prevents collisions when eval trials are upserted.

    3.33.0release notes

  • Fixes a race in OTEL trace context propagation.

    3.33.0release notes

  • Fixes LangChain Anthropic token metrics.

    3.31.0release notes

  • Injects the instrumentation hook on Next.js versions below 15.

    3.31.0release notes

  • Fixes instrumentation of streamFunction.

    3.30.0release notes

  • Instrumentation output preserves all streaming chat choices.

    3.29.0release notes

  • LangChain reasoning tokens are recorded as a metric.

    3.29.0release notes

  • Anthropic thinking tokens are recorded as a metric.

    3.29.0release notes

  • noTraceIO is no longer ignored when wrapTraced wraps plain functions.

    3.29.0release notes

  • The limit is enforced across paginated dataset fetches.

    3.28.0release notes

  • Per-call token and cost metrics are now calculated correctly in the Claude Agent SDK integration.

    3.28.0release notes

  • The scorer now receives id and tags.

    3.28.0release notes

  • Subagent tool spans are now correctly parented in the Claude Agent SDK integration.

    3.28.0release notes

  • Returns any to fix type compatibility.

    3.26.0release notes

  • Fixes token counting in Google ADK.

    3.26.0release notes

  • Fixes output token counting for the generate content API.

    3.26.0release notes

  • Fixes output token counting for the interactions API.

    3.26.0release notes

  • Captures the system prompt in Strands agent model span input.

    3.26.0release notes

  • Fixes eval hanging until its configured timeout resolves.

    3.25.0release notes

  • Preserves HarnessAgent trace context across suspended turns.

    3.25.0release notes

  • Emits canonical LangChain JS total token metrics.

    3.24.0release notes

  • Cleans up span metadata produced by the Claude Agent SDK integration.

    3.23.1release notes

  • Transient failures are retried for internal, read-only BTQL requests used to fetch datasets, objects, spans, and prompt versions.

    3.23.0release notes

  • Unresolved dynamic model fallbacks are no longer reported as model metadata.

    3.23.0release notes

  • Mastra span IDs are used as Braintrust row IDs so logFeedback attaches feedback to the correct row.

    3.22.0release notes

  • Closes parent spans using AI SDK 7 onEnd callbacks.

    3.21.0release notes

  • Fixes function invocations by stripping /v1/proxy from the functions endpoint.

    3.21.0release notes

  • Properly anchors the preview domain CORS regex.

    3.21.0release notes

  • Synthesizes AI SDK total token metrics from prompt and completion counts.

    3.21.0release notes

  • Keeps model child spans correctly parented for concurrent calls sharing a model instance.

    3.21.0release notes

  • Logs the Anthropic system message first in span input.

    3.19.0release notes

  • Fixes dataset row origin for evals and playgrounds.

    3.19.0release notes

  • Fixes subagent span nesting and input.

    3.18.0release notes

  • Eval summaries compare against the experiment’s explicit base experiment ID.

    3.18.0release notes

  • Fixes span nesting.

    3.18.0release notes

  • Validates inline row origin for evals.

    3.18.0release notes

  • Fixes TTFT in AI SDK v6.

    3.18.0release notes

  • Preserves multi-byte UTF-8 characters split across chunk boundaries in streams.

    3.16.0release notes

  • Fixes instrumentation wrapping for the Cohere v2 subclient.

    3.11.0release notes

  • Fixes Google ADK agent naming in instrumentation.

    3.11.0release notes

  • Prevents duplicate LLM spans when multiple SDK instances are loaded in the same process.

    3.11.0release notes

  • Cancels body consumption immediately for object store uploads.

    3.11.0release notes

  • Prevents OpenAI instrumentation from reading a request body more than once.

    3.11.0release notes

  • Marks callModel parent spans as tasks and avoids double-counting metrics.

    3.11.0release notes

  • File transforms are skipped when the transform id is undefined, avoiding processing them in that case.

    3.10.0release notes

  • The export map for bundler plugins was corrected.

    3.10.0release notes

  • Directory warnings now show the correct eval file extension.

    3.10.0release notes

  • Streamed tool calls are now captured for Hugging Face.

    3.10.0release notes

  • Reasoning capture in Mistral was corrected.

    3.10.0release notes

  • Sets AI SDK top-level api spans to type function.

    3.9.0release notes

  • Ends OpenAI Agents child spans when the trace ends.

    3.9.0release notes

  • Collects logprob and refusals output for OpenAI streaming APIs.

    3.9.0release notes

  • Restores prompt cache metrics for the AI SDK.

    3.9.0release notes

  • Captures Anthropic server tool use inputs for streaming APIs.

    3.9.0release notes

  • Uses a sync channel for AI SDK CJS streamText and streamObject in v4+.

    3.9.0release notes

  • Prevents tool spans from being dropped when spawning subagents in the claude-agent-sdk.

    3.9.0release notes

braintrust 218 changes

Breaking changes 8

  • Helm chart v6.2.1 disables code function execution by default; set this to true on a single-org deployment to preserve code-backed scorers, tools, or functions.

    2.0.0upgrade guide

  • Helm chart v4.0.0 auto-sets this URL so Brainstore can reach API pods; clusters restricting pod traffic must allow access to the API service on port 8000.

    2.0.0upgrade guide

  • Helm chart v5.0.1 enables two isolated fast reader replicas by default; mirror custom reader settings to this block.

    2.0.0upgrade guide

  • Set this Helm value to v1 before upgrading to v2.x; apply it separately after all pods are running v1.1.32.

    2.0.0upgrade guide

  • Set the WAL footer version to v3 when upgrading to Helm chart v6.2.1.

    2.0.0upgrade guide

  • Data plane v2.0 API pod endpoints access GCS directly, so the braintrust-api Kubernetes service account needs Workload Identity access before upgrading.

    2.0.0upgrade guide

  • The latest chart defaults no-PostgreSQL mode on; explicitly set this to an empty string for the base upgrade, then set it to all to enable the mode.

    2.0.0upgrade guide

  • Install zod as a peer dependency when using the Vercel AI SDK integration or other features that require schema validation.

    2.0.0docsdocsdocsdocs

New APIs and options 8

  • Configure the WAL footer format explicitly; set it to v1 before upgrading to v2.x and to v3 after deploying v2.x.

    2.0.0upgrade guide

  • Helm chart v5.0.1 enables fast readers by default with 2 replicas using the standard reader node spec; mirror customized brainstore.reader settings to this block.

    2.0.0upgrade guide

  • Data plane v2 introduces log indexing and full-text search.

    2.0.0upgrade guide

  • Brainstore writes data directly without PostgreSQL, increasing ingestion throughput; enabling the mode is a one-way switch unless downtime is used to drain and re-ingest.

    2.0.0upgrade guide

  • Data plane v2 introduces sandboxes for agent evaluations.

    2.0.0upgrade guide

  • Setting this module variable to "all" enables no-PostgreSQL mode for Brainstore objects, increasing ingestion throughput; the switch is one-way without downtime to roll back.

    2.0.0upgrade guide

  • Topics can be enabled for eligible self-hosted deployments after completing the v2.x and no-PostgreSQL migrations, meeting deployment and inference requirements, and obtaining Braintrust access.

    2.0.0upgrade guide

  • Data plane v2 introduces trace-level scorers, including scorers that use full trace context.

    2.0.0upgrade guide

Behavior and default changes 2

  • Helm chart v4.0.0 auto-sets this URL, and Brainstore must be able to reach the API service on port 8000.

    2.0.0upgrade guide

  • The settings location for WAL footer version checks, preflight statuses, and upgrade verification is now Brainstore configuration under Settings > Brainstore.

    2.0.0upgrade guide