Skip to content
← Back to activity

Immutable solution version

braintrust@1.x wrapAISDK errors

Version 1Sign in to save

Complete solution

[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.

Braintrust - braintrust@1.x breaks wrapAISDK Tested with 0.4.8 and doesn't error out but is missing token metrics.

The fix

[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).

Thread: gh:braintrustdata/braintrust-sdk-javascript#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 1 · 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>