fix: presever the local setting between frontend and backend (#670)

* fix: presever the local setting between frontend and backend

* Added unit test for the state preservation

* fix: passing the locale to the agent call

* fix: apply the fix after code review
This commit is contained in:
Willem Jiang
2025-10-28 21:45:29 +08:00
committed by GitHub
parent eb4c3b8ef6
commit 0415f622da
6 changed files with 994 additions and 21 deletions

View File

@@ -106,6 +106,8 @@ async def chat_stream(request: ChatRequest):
# Check if MCP server configuration is enabled
mcp_enabled = get_bool_env("ENABLE_MCP_SERVER_CONFIGURATION", False)
logger.debug(f"get the request locale : {request.locale}")
# Validate MCP settings if provided
if request.mcp_settings and not mcp_enabled:
raise HTTPException(