feat: migrate chat orchestration to deep langgraph workers
This commit is contained in:
@@ -20,7 +20,6 @@ from jose import jwt
|
||||
from app.config.settings import settings
|
||||
from app.db import get_session
|
||||
from app.main import app
|
||||
from app.schemas import ChatResponse
|
||||
from tests.conftest import TEST_USER_IDS
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -50,7 +49,6 @@ _CHAT_BODY = {
|
||||
"recent_tasks": [],
|
||||
"conversation_history": [],
|
||||
},
|
||||
"execution_mode": "direct",
|
||||
}
|
||||
|
||||
|
||||
@@ -240,7 +238,7 @@ class TestRateLimitMiddleware:
|
||||
|
||||
|
||||
class TestSanitizerMiddleware:
|
||||
"""Mock ``orchestrate`` to inject controlled strings into chat responses."""
|
||||
"""Mock ``run_home`` to inject controlled strings into chat responses."""
|
||||
|
||||
_CHAT_PATH = "/api/v1/chat"
|
||||
|
||||
@@ -248,11 +246,10 @@ class TestSanitizerMiddleware:
|
||||
return _make_jwt(user_id=str(uuid.uuid4()), tier="pro")
|
||||
|
||||
def _post_chat(self, client: TestClient, response_text: str) -> dict:
|
||||
mock_response = ChatResponse(response=response_text, actions=[])
|
||||
with patch(
|
||||
"app.api.routes.chat.orchestrate",
|
||||
"app.api.routes.chat.run_home",
|
||||
new_callable=AsyncMock,
|
||||
return_value=mock_response,
|
||||
return_value=response_text,
|
||||
):
|
||||
resp = client.post(
|
||||
self._CHAT_PATH,
|
||||
|
||||
Reference in New Issue
Block a user