代码修改

This commit is contained in:
董宏凯 committed 2026-05-26 14:18:00 +08:00
1 parent d1e6cd5a8f
commit daba5c0599
8 files changed
+174 -34

No files matched your search

@@ -114,8 +114,9 @@ async def init_intent(request: Request, payload: dict = Body(...)) -> dict[str,
base = _loopback_base(request)
headers = _auth_headers(request)
# ASGITransport:进程内直调本机 ASGI app,**不走 TCP / 不经过网络栈**,
# 因此既无须 trust_env=False 防代理,也不存在 loopback 40s 超时这种坑。
# TCP loopback 到 127.0.0.1:<gateway port>(详见 multi_agent._make_loopback_client)。
# 不要在这里替换成 httpx.ASGITransport——曾试过,会整段 buffer SSE 流导致前端
# 看不到逐 token 增量。
try:
async with _make_loopback_client(request) as client:
thread_id = await _create_thread(client, base, headers)