You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b0b1858
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: packages/server-utils/src/ai/core/apiPromise.ts
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,9 @@ function isApiPromise(value: unknown): value is ApiPromise {
13
13
// OpenAI and Anthropic return an APIPromise that extends the native promise objects and redefines .then() in a way that internally triggers body parsing.
14
14
// This can lead to double parsing if our instrumentation triggers .then on this promise.
15
15
// Instead, we need to avoid triggering .then on the APIPromise and instead observe the internal parsing process to get the response body.
0 commit comments