Skip to content

ref!: Remove plugins as part of public API - #2386

Open
Luca Forstner (lforst) wants to merge 5 commits into
v4from
lforst/dum-e/edinburgh-ed36b547c4
Open

ref!: Remove plugins as part of public API#2386
Luca Forstner (lforst) wants to merge 5 commits into
v4from
lforst/dum-e/edinburgh-ed36b547c4

Conversation

@lforst

@lforst Luca Forstner (lforst) commented Aug 19, 2026

Copy link
Copy Markdown
Member

ref braintrustdata/braintrust-sdk-javascript#1841

Removes Plugins and unsubscribe functionality.

Reasoning: Plugins are a bit of an unnecessary API to be exposed because they just attach stuff and un-attach stuff. The user can very easily just manage this by themselves. Also, unsubscribe is literally called from nowhere in the SDK.

@lforst Luca Forstner (lforst) mentioned this pull request Aug 20, 2026
10 tasks
…ed36b547c4

# Conflicts:
#	js/src/exports.ts
#	js/src/instrumentation/index.ts
#	js/src/instrumentation/providers/eve-instrumentation.test.ts
Luca Forstner (lforst) added a commit that referenced this pull request Aug 24, 2026
LangChain's `UsageMetadata` carries `output_token_details.reasoning`,
and nothing in `js/src` or
`integrations` read it. `completion_tokens` covers the spend, so what
was lost is the breakdown:
no way to see how much of a reasoning model's output went to thinking,
on any LangChain or
LangGraph span.

Mapped `reasoning` only. `js/src/wrappers/mastra.ts:164-172` settles the
scope, picking up the
non-modality detail fields (`cacheRead`, `cacheWrite`, `reasoning`) and
leaving the modality ones
alone. `OutputTokenDetails` also carries `audio`, `image`, `video`,
`document` and `text` through
`ModalitiesTokenDetails`; the input side drops its copies too, so those
are a separate change.

Zero is recorded, not dropped, matching `prompt_cached_tokens: 0` in the
existing snapshots.

`js/src/instrumentation/plugins/langsmith-plugin.ts:456` has the same
gap. Left alone because
#2386 is moving that tree.

Snapshot churn is 30 added lines across 10 files, every one
`completion_reasoning_tokens`, both
sides of each span-tree pair regenerated, no deletions.

Ran `pnpm test` in `js/` (1648 passed), `check:typings`, `lint`, and
`test:e2e:update` then
`test:e2e` once each, not twice. On that assert pass
`scenarios/git-metadata` timed out at 30s
under parallel load. It passes in isolation here in 1.19s and on `main`
in 1.20s, and the two
scenarios this change touches pass, so I read it as local contention.
Worth confirming on CI.

Both new unit tests fail against `main` on assertions.

---------

Co-authored-by: Dylan Pulver <dylanpulver@users.noreply.github.com>
Co-authored-by: lforst <8118419+lforst@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant