deerflow2/backend
hetaoBackend 1a7c853811 fix: use shared httpx client to prevent premature closure in SSE streaming
The proxy was creating a temporary httpx.AsyncClient within an async context manager.
When returning StreamingResponse for SSE endpoints, the client was being closed before
the streaming generator could use it, causing "client has been closed" errors.

This change introduces a shared httpx.AsyncClient that persists for the application
lifecycle, properly cleaned up during shutdown. This also improves performance by
reusing TCP connections across requests.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-19 16:52:30 +08:00
..
.vscode chore: specify project title 2026-01-14 09:57:52 +08:00
docs feat: implement summarization (#14) 2026-01-19 16:17:31 +08:00
src fix: use shared httpx client to prevent premature closure in SSE streaming 2026-01-19 16:52:30 +08:00
tests feat: add AIO sandbox provider and auto title generation (#1) 2026-01-14 23:29:18 +08:00
.gitignore fix: stop tracking .claude/settings.local.json 2026-01-19 16:28:03 +08:00
.python-version chore: add Python and LangGraph stuff 2026-01-14 07:15:02 +08:00
AGENTS.md feat: add AIO sandbox provider and auto title generation (#1) 2026-01-14 23:29:18 +08:00
CLAUDE.md feat: implement summarization (#14) 2026-01-19 16:17:31 +08:00
Makefile fix: fix backend python execution (#10) 2026-01-18 12:41:48 +08:00
debug.py fix: Long thinking but with empty content (#12) 2026-01-18 14:21:40 +08:00
langgraph.json feat: support function factory (#4) 2026-01-15 22:05:54 +08:00
pyproject.toml feat: add gateway module with FastAPI server (#5) 2026-01-16 13:22:26 +08:00
ruff.toml chore: use ruff to lint and auto-format 2026-01-14 09:08:20 +08:00
uv.lock feat: add gateway module with FastAPI server (#5) 2026-01-16 13:22:26 +08:00