Solution skill
braintrust@1.x wrapAISDK errors
Complete solution
Shows how to fix braintrust@1.x wrapAISDK errors. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
[anthonyjgrove (reporter)]: Fixed in braintrust@1.1.0. If wrapAISDK throws "metric values must be numbers" / "failed to pipe response" when a stream finishes on braintrust@1.x, upgrade with npm install braintrust@^1.1.0.
failed to pipe responseSteps
- [anthonyjgrove (reporter)]: Fixed in braintrust@1.1.0. If wrapAISDK throws "metric values must be numbers" / "failed to pipe response" when a stream finishes on braintrust@1.x, upgrade with npm install braintrust@^1.1.0. Confirmed fixed on v1.1.0 (v0.4.8 worked but was missing token metrics).
When to use
You are seeing this: Braintrust - braintrust@1.x breaks wrapAISDK Tested with 0.4.8 and doesn't error out but is missing token metrics. Use this skill when you run into "braintrust@1.x wrapAISDK errors".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 0.4.8, braintrust 1.1.0, v1.1.0, v0.4.8. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/braintrustdata/braintrust-sdk-javascript/issues/1174
Evidence
In gh:braintrustdata/braintrust-sdk-javascript#1174 (https://github.com/braintrustdata/braintrust-sdk-javascript/issues/1174), the issue reported: braintrust@1.x breaks wrapAISDK Tested with 0.4.8 and doesn't error out but is missing token metrics. v1.x fails with the following error on stream finish. `` Error: failed to pipe response at ignore-listed frames { [cause]: Error: metric values must be numbers at ignore-listed frames } Error: metric values must be numbers at ignore-listed frames ⨯ unhandledRejection: Error: metric values must be numbers at ignore-listed frames ⨯ unhandledRejection: Error: metric values must be numbers at ignore-listed frames AI SDK versions `` "@ai-sdk/anthropic": "^3.0.0-beta. The verified answer: [anthonyjgrove (reporter)]: Fixed in braintrust@1.1.0. If wrapAISDK throws "metric values must be numbers" / "failed to pipe response" when a stream finishes on braintrust@1.x, upgrade with npm install braintrust@^1.1.0. Confirmed fixed on v1.1.0 (v0.4.8 worked but was missing token metrics).
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_nge_lIEKFzGD6yr_6vGxFQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">braintrust@1.x wrapAISDK errors <span>— Vectle</span></a>