Skip to content

Your lightweight open-source personal agent.

fix(api): remove enable_compression to restore real SSE streaming

zhonghongwei6a3069514c13
diff --git a/nanobot/api/server.py b/nanobot/api/server.py
index 0a79fa097..3262e39b2 100644
--- a/nanobot/api/server.py
+++ b/nanobot/api/server.py
@@ -239,7 +239,6 @@ async def handle_chat_completions(request: web.Request) -> web.Response:
resp.content_type = "text/event-stream"
resp.headers["Cache-Control"] = "no-cache"
resp.headers["Connection"] = "keep-alive"
- resp.enable_compression()
await resp.prepare(request)
chunk_id = f"chatcmpl-{uuid.uuid4().hex[:12]}"