refactor: unify host threadpool boundary

This commit is contained in:
jxxghp
2026-08-24 03:28:10 +08:00
parent 22848eeda2
commit 371383f0a8
15 changed files with 59 additions and 21 deletions
+1 -2
View File
@@ -3,8 +3,7 @@ import re
import threading
from typing import Any, Optional, Tuple
from fastapi.concurrency import run_in_threadpool
from app.runtime.execution import run_in_threadpool
from app.agent.policy.sanitizer import sanitize_for_host
from app.chain import ChainBase
from app.runtime.log import logger
+1 -1
View File
@@ -11,7 +11,6 @@ from dataclasses import dataclass
from datetime import datetime, timedelta
from typing import Any, Awaitable, Callable, Dict, List, Optional
from fastapi.concurrency import run_in_threadpool
from langchain.agents import create_agent
from langchain_core.messages import ( # noqa: F401
HumanMessage,
@@ -21,6 +20,7 @@ from langchain_core.messages import ( # noqa: F401
from langgraph.checkpoint.memory import InMemorySaver
from app.runtime.execution import run_in_threadpool
from app.agent.callback import StreamingHandler
from app.agent.contracts import ReplyMode, build_display_message
from app.agent.llm.helper import LLMHelper