Skip to content

Node.js SDK 0.13.1

Choose a tag to compare

@pratham2609 pratham2609 released this 21 Oct 06:30
· 16 commits to main since this release
bbc1958

Fixed

  • wrapOpenAI and wrapAnthropic no longer change the client passed in. They return a new view of it whose create records usage for that wrapper's customerId, as the Go SDK returns a copy. Before, each wrap replaced create on the shared client, so after wrapping one client for several customers a single call recorded an event for every one of them. Calls on the original client now record nothing, wrapping an already wrapped client wraps its original, and withResponse(), parse(), stream() and streaming keep working and record once. Use the returned client: code that ignored the return value and kept calling the original client no longer records usage.