diff options
Diffstat (limited to 'cloud/app/src/routes')
| -rw-r--r-- | cloud/app/src/routes/zen/v1/chat/completions.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cloud/app/src/routes/zen/v1/chat/completions.ts b/cloud/app/src/routes/zen/v1/chat/completions.ts index b68264cc4..dc69bb514 100644 --- a/cloud/app/src/routes/zen/v1/chat/completions.ts +++ b/cloud/app/src/routes/zen/v1/chat/completions.ts @@ -6,9 +6,7 @@ export function POST(input: APIEvent) { return handler(input, { modifyBody: (body: any) => ({ ...body, - stream_options: { - include_usage: true, - }, + ...(body.stream ? { stream_options: { include_usage: true } } : {}), }), setAuthHeader: (headers: Headers, apiKey: string) => { headers.set("authorization", `Bearer ${apiKey}`) |
