feat(i18n): localize researchers, risk debators, research mgr, trader

output_language config now propagates to every user-facing agent.
Previously only the four analysts and portfolio manager respected
the setting, producing partial-localization reports with English
debate text interleaved with non-English analyst sections. Verified
live: 7 agents produce Chinese output when config is set to Chinese.

#575
This commit is contained in:
Yijia-Xiao committed 2026-05-11 05:41:42 +00:00
1 parent 384fe1a3d2
commit 6b384f74f9
8 files changed
+24 -10

No files matched your search

@@ -3,7 +3,10 @@
from __future__ import annotations
from tradingagents.agents.schemas import ResearchPlan, render_research_plan
from tradingagents.agents.utils.agent_utils import build_instrument_context
from tradingagents.agents.utils.agent_utils import (
build_instrument_context,
get_language_instruction,
)
from tradingagents.agents.utils.structured import (
bind_structured,
invoke_structured_or_freetext,
@@ -37,7 +40,7 @@ Commit to a clear stance whenever the debate's strongest arguments warrant one;
---
**Debate History:**
{history}"""
{history}""" + get_language_instruction()
investment_plan = invoke_structured_or_freetext(
structured_llm,