This commit is contained in:
Frank
2025-09-11 01:31:49 -04:00
parent 7aa57accf5
commit dedfa563c2
3 changed files with 139 additions and 37 deletions

View File

@@ -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}`)