fix:env AGENT_RECURSION_LIMIT not work (#453)

* fix:env AGENT_RECURSION_LIMIT not work

* fix:add test

* black tests/unit/config/test_configuration.py

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
道心坚定韩道友
2025-07-22 15:23:21 +08:00
committed by GitHub
parent b197b0f4cb
commit 32d8e514e1
4 changed files with 84 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ from fastapi.responses import Response, StreamingResponse
from langchain_core.messages import AIMessageChunk, BaseMessage, ToolMessage
from langgraph.types import Command
from src.config.configuration import get_recursion_limit
from src.config.report_style import ReportStyle
from src.config.tools import SELECTED_RAG_PROVIDER
from src.graph.builder import build_graph_with_memory
@@ -150,6 +151,7 @@ async def _astream_workflow_generator(
"mcp_settings": mcp_settings,
"report_style": report_style.value,
"enable_deep_thinking": enable_deep_thinking,
"recursion_limit": get_recursion_limit(),
},
stream_mode=["messages", "updates"],
subgraphs=True,