From 2ba3b59b7e062cbd6d4187c727c721108f6c3f99 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:13:05 +0000 Subject: [PATCH 1/2] chore: Prepare release --- .changeset/ai-sdk-token-total-metrics.md | 5 ----- .changeset/ai-sdk-v7-telemetry-end.md | 5 ----- .changeset/calm-llamas-trace.md | 5 ----- .changeset/distributed-tracing-w3c.md | 20 -------------------- .changeset/eu-proxy-url-function-invoke.md | 5 ----- .changeset/hot-boats-fail.md | 5 ----- .changeset/icy-symbols-jam.md | 5 ----- .changeset/lemon-mirrors-fold.md | 5 ----- .changeset/sunny-walls-share.md | 5 ----- .changeset/sunny-wombats-cheer.md | 5 ----- .changeset/sweet-pears-pay.md | 5 ----- .changeset/tiny-sheep-send.md | 5 ----- .changeset/violet-vans-design.md | 5 ----- js/CHANGELOG.md | 21 +++++++++++++++++++++ js/package.json | 2 +- 15 files changed, 22 insertions(+), 81 deletions(-) delete mode 100644 .changeset/ai-sdk-token-total-metrics.md delete mode 100644 .changeset/ai-sdk-v7-telemetry-end.md delete mode 100644 .changeset/calm-llamas-trace.md delete mode 100644 .changeset/distributed-tracing-w3c.md delete mode 100644 .changeset/eu-proxy-url-function-invoke.md delete mode 100644 .changeset/hot-boats-fail.md delete mode 100644 .changeset/icy-symbols-jam.md delete mode 100644 .changeset/lemon-mirrors-fold.md delete mode 100644 .changeset/sunny-walls-share.md delete mode 100644 .changeset/sunny-wombats-cheer.md delete mode 100644 .changeset/sweet-pears-pay.md delete mode 100644 .changeset/tiny-sheep-send.md delete mode 100644 .changeset/violet-vans-design.md diff --git a/.changeset/ai-sdk-token-total-metrics.md b/.changeset/ai-sdk-token-total-metrics.md deleted file mode 100644 index 4ef11ac46..000000000 --- a/.changeset/ai-sdk-token-total-metrics.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": patch ---- - -fix: Synthesize AI SDK total token metrics from prompt and completion counts diff --git a/.changeset/ai-sdk-v7-telemetry-end.md b/.changeset/ai-sdk-v7-telemetry-end.md deleted file mode 100644 index 608cd10a0..000000000 --- a/.changeset/ai-sdk-v7-telemetry-end.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": patch ---- - -fix(ai-sdk): Close `braintrustAISDKTelemetry()` parent spans with AI SDK 7 `onEnd` callbacks diff --git a/.changeset/calm-llamas-trace.md b/.changeset/calm-llamas-trace.md deleted file mode 100644 index 2114d88a5..000000000 --- a/.changeset/calm-llamas-trace.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": patch ---- - -fix(ai-sdk): Keep `wrapAISDK` model child spans correctly parented for concurrent calls sharing a model instance diff --git a/.changeset/distributed-tracing-w3c.md b/.changeset/distributed-tracing-w3c.md deleted file mode 100644 index 3884553ef..000000000 --- a/.changeset/distributed-tracing-w3c.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"braintrust": minor ---- - -feat: W3C-compatible distributed tracing - -- Add `inject`/`extract` APIs for distributed tracing across service boundaries - (`span.inject(carrier)`, `injectTraceContext()`, and - `extractTraceContextFromHeaders(headers)`), - implementing the [W3C Trace Context](https://www.w3.org/TR/trace-context/) and - [W3C Baggage](https://www.w3.org/TR/baggage/) specs. `startSpan({ parent })` now - accepts the opaque context returned by `extractTraceContextFromHeaders` in - addition to an exported span slug. -- Default to OpenTelemetry-compatible hex span/trace IDs (and V4 span-component - export). Set `BRAINTRUST_LEGACY_IDS` to opt back into legacy UUID IDs (and V3 - export). `BRAINTRUST_OTEL_COMPAT` continues to force hex IDs and takes - precedence over `BRAINTRUST_LEGACY_IDS`. - -Note: The deprecated `span.export()` / `startSpan({ parent: })` path remains -supported and links correctly across the UUID and hex formats. diff --git a/.changeset/eu-proxy-url-function-invoke.md b/.changeset/eu-proxy-url-function-invoke.md deleted file mode 100644 index 0f4f69bda..000000000 --- a/.changeset/eu-proxy-url-function-invoke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": patch ---- - -fix: Fix function invocations by stripping `/v1/proxy` from functions endpoint diff --git a/.changeset/hot-boats-fail.md b/.changeset/hot-boats-fail.md deleted file mode 100644 index 732686c14..000000000 --- a/.changeset/hot-boats-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": patch ---- - -ref: Fork `orchestrion-js`, `import-in-the-middle` and `require-in-the-middle` diff --git a/.changeset/icy-symbols-jam.md b/.changeset/icy-symbols-jam.md deleted file mode 100644 index 7de80491b..000000000 --- a/.changeset/icy-symbols-jam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": patch ---- - -chore: Update platform types diff --git a/.changeset/lemon-mirrors-fold.md b/.changeset/lemon-mirrors-fold.md deleted file mode 100644 index 7d970f491..000000000 --- a/.changeset/lemon-mirrors-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": minor ---- - -fix(ai-sdk): Don't capture message history in tool spans diff --git a/.changeset/sunny-walls-share.md b/.changeset/sunny-walls-share.md deleted file mode 100644 index 692380f9e..000000000 --- a/.changeset/sunny-walls-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": minor ---- - -feat: Expose flag for toggling realtime mode in span fetcher diff --git a/.changeset/sunny-wombats-cheer.md b/.changeset/sunny-wombats-cheer.md deleted file mode 100644 index 88c14da54..000000000 --- a/.changeset/sunny-wombats-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": patch ---- - -fix: Properly anchor preview domain CORS regex diff --git a/.changeset/sweet-pears-pay.md b/.changeset/sweet-pears-pay.md deleted file mode 100644 index 8e07ed991..000000000 --- a/.changeset/sweet-pears-pay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": minor ---- - -feat: Add scorer that exposes helpers to evaluate agents diff --git a/.changeset/tiny-sheep-send.md b/.changeset/tiny-sheep-send.md deleted file mode 100644 index a3ea7027b..000000000 --- a/.changeset/tiny-sheep-send.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": minor ---- - -feat(evals): Forward/pick up `bt eval <...> --sample N` flag diff --git a/.changeset/violet-vans-design.md b/.changeset/violet-vans-design.md deleted file mode 100644 index f63f63729..000000000 --- a/.changeset/violet-vans-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": minor ---- - -feat(ai-sdk): Add Workflow Agent instrumentation diff --git a/js/CHANGELOG.md b/js/CHANGELOG.md index 7557e9a60..024ffa885 100644 --- a/js/CHANGELOG.md +++ b/js/CHANGELOG.md @@ -1,5 +1,26 @@ # braintrust +## 3.21.0 + +### Minor Changes + +- feat: W3C-compatible distributed tracing - Add `inject`/`extract` APIs for distributed tracing across service boundaries (`span.inject(carrier)`, `injectTraceContext()`, and `extractTraceContextFromHeaders(headers)`), implementing the [W3C Trace Context](https://www.w3.org/TR/trace-context/) and [W3C Baggage](https://www.w3.org/TR/baggage/) specs. `startSpan({ parent })` now accepts the opaque context returned by `extractTraceContextFromHeaders` in addition to an exported span slug. - Default to OpenTelemetry-compatible hex span/trace IDs (and V4 span-component export). Set `BRAINTRUST_LEGACY_IDS` to opt back into legacy UUID IDs (and V3 export). `BRAINTRUST_OTEL_COMPAT` continues to force hex IDs and takes precedence over `BRAINTRUST_LEGACY_IDS`. Note: The deprecated `span.export()` / `startSpan({ parent: })` path remains supported and links correctly across the UUID and hex formats. Thanks @realark! (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2141) +- fix(ai-sdk): Don't capture message history in tool spans (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2179) +- feat: Expose flag for toggling realtime mode in span fetcher Thanks @choochootrain! (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2187) +- feat: Add scorer that exposes helpers to evaluate agents (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2146) +- feat(evals): Forward/pick up `bt eval <...> --sample N` flag (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2165) +- feat(ai-sdk): Add Workflow Agent instrumentation (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2177) + +### Patch Changes + +- fix: Synthesize AI SDK total token metrics from prompt and completion counts (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2174) +- fix(ai-sdk): Close `braintrustAISDKTelemetry()` parent spans with AI SDK 7 `onEnd` callbacks (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2172) +- fix(ai-sdk): Keep `wrapAISDK` model child spans correctly parented for concurrent calls sharing a model instance (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2194) +- fix: Fix function invocations by stripping `/v1/proxy` from functions endpoint Thanks @paultancre-bt! (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2180) +- ref: Fork `orchestrion-js`, `import-in-the-middle` and `require-in-the-middle` (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2154) +- chore: Update platform types Thanks @braintrust-bot! (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2196) +- fix: Properly anchor preview domain CORS regex Thanks @mathisliens-braintrust! (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2162) + ## 3.20.0 ### Minor Changes diff --git a/js/package.json b/js/package.json index 573969f9f..9e36b60af 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "braintrust", - "version": "3.20.0", + "version": "3.21.0", "description": "SDK for integrating Braintrust", "repository": { "type": "git", From d641073f331577251c07823a331b5caadc899d23 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 7 Jul 2026 13:32:03 +0200 Subject: [PATCH 2/2] Update changelog --- js/CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/CHANGELOG.md b/js/CHANGELOG.md index 024ffa885..2a2dad5bc 100644 --- a/js/CHANGELOG.md +++ b/js/CHANGELOG.md @@ -4,9 +4,9 @@ ### Minor Changes -- feat: W3C-compatible distributed tracing - Add `inject`/`extract` APIs for distributed tracing across service boundaries (`span.inject(carrier)`, `injectTraceContext()`, and `extractTraceContextFromHeaders(headers)`), implementing the [W3C Trace Context](https://www.w3.org/TR/trace-context/) and [W3C Baggage](https://www.w3.org/TR/baggage/) specs. `startSpan({ parent })` now accepts the opaque context returned by `extractTraceContextFromHeaders` in addition to an exported span slug. - Default to OpenTelemetry-compatible hex span/trace IDs (and V4 span-component export). Set `BRAINTRUST_LEGACY_IDS` to opt back into legacy UUID IDs (and V3 export). `BRAINTRUST_OTEL_COMPAT` continues to force hex IDs and takes precedence over `BRAINTRUST_LEGACY_IDS`. Note: The deprecated `span.export()` / `startSpan({ parent: })` path remains supported and links correctly across the UUID and hex formats. Thanks @realark! (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2141) +- feat: Add `inject`/`extract` APIs for distributed tracing across service boundaries (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2141) - fix(ai-sdk): Don't capture message history in tool spans (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2179) -- feat: Expose flag for toggling realtime mode in span fetcher Thanks @choochootrain! (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2187) +- feat: Expose flag for toggling realtime mode in span fetcher (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2187) - feat: Add scorer that exposes helpers to evaluate agents (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2146) - feat(evals): Forward/pick up `bt eval <...> --sample N` flag (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2165) - feat(ai-sdk): Add Workflow Agent instrumentation (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2177) @@ -16,10 +16,10 @@ - fix: Synthesize AI SDK total token metrics from prompt and completion counts (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2174) - fix(ai-sdk): Close `braintrustAISDKTelemetry()` parent spans with AI SDK 7 `onEnd` callbacks (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2172) - fix(ai-sdk): Keep `wrapAISDK` model child spans correctly parented for concurrent calls sharing a model instance (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2194) -- fix: Fix function invocations by stripping `/v1/proxy` from functions endpoint Thanks @paultancre-bt! (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2180) +- fix: Fix function invocations by stripping `/v1/proxy` from functions endpoint (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2180) - ref: Fork `orchestrion-js`, `import-in-the-middle` and `require-in-the-middle` (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2154) -- chore: Update platform types Thanks @braintrust-bot! (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2196) -- fix: Properly anchor preview domain CORS regex Thanks @mathisliens-braintrust! (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2162) +- chore: Update platform types (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2196) +- fix: Properly anchor preview domain CORS regex (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2162) ## 3.20.0