fix(console): set duplex for streamed zen requests
This commit is contained in:
parent
b1ce938ebe
commit
f2a1d547f1
1 changed files with 2 additions and 1 deletions
|
|
@ -242,10 +242,11 @@ export async function handler(
|
|||
return headers
|
||||
})(),
|
||||
body: reqBody,
|
||||
duplex: "half",
|
||||
// Propagate caller disconnects to the upstream provider request so
|
||||
// abandoned Console requests do not leave orphaned inference work open.
|
||||
signal: input.request.signal,
|
||||
})
|
||||
} as RequestInit & { duplex: "half" })
|
||||
const isStream = res.headers.get("content-type")?.toLowerCase().includes("text/event-stream") ?? false
|
||||
logger.metric({ is_stream: isStream })
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue