Skip to content

Commit 751af23

Browse files
committed
removed header storage from ResumableStreamManager as headers are now handled in the response stream, added some basic tests (vague), will layer later
1 parent cfd076b commit 751af23

File tree

4 files changed

+1001
-13
lines changed

4 files changed

+1001
-13
lines changed

packages/agents/src/resumable-stream-manager.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -344,17 +344,7 @@ export class ResumableStreamManager<Message extends ChatMessage = ChatMessage> {
344344
return;
345345
}
346346

347-
// Store response headers
348-
const headers: Record<string, string> = {};
349-
response.headers.forEach((value, key) => {
350-
headers[key] = value;
351-
});
352-
353-
this.sql`
354-
update cf_ai_http_chat_streams
355-
set headers = ${JSON.stringify(headers)}
356-
where stream_id = ${streamId}
357-
`;
347+
// Headers are captured and handled in the response stream
358348

359349
console.log(
360350
`[ResumableStreamManager] Starting to pipe upstream response for stream ${streamId}`

0 commit comments

Comments
 (0)