Fix AG MITM
This commit is contained in:
1 parent
7076108550
commit
50990e84b4
6 files changed
+27
-24
No files matched your search
@@ -84,8 +84,10 @@ export function createSSEStream(options = {}) {
|
||||
|
||||
// Ensure OpenAI-required fields are present on streaming chunks (Letta compat)
|
||||
let fieldsInjected = false;
|
||||
if (!parsed.object) { parsed.object = "chat.completion.chunk"; fieldsInjected = true; }
|
||||
if (!parsed.created) { parsed.created = Math.floor(Date.now() / 1000); fieldsInjected = true; }
|
||||
if (parsed.choices !== undefined) {
|
||||
if (!parsed.object) { parsed.object = "chat.completion.chunk"; fieldsInjected = true; }
|
||||
if (!parsed.created) { parsed.created = Math.floor(Date.now() / 1000); fieldsInjected = true; }
|
||||
}
|
||||
|
||||
// Strip Azure-specific non-standard fields from streaming chunks
|
||||
if (parsed.prompt_filter_results !== undefined) {
|
||||
|
||||
Reference in new issue
Block a user