feat: add Anthropic effort level support for Claude models

Add effort parameter (high/medium/low) for Claude 4.5+ and 4.6 models,
consistent with OpenAI reasoning_effort and Google thinking_level.
Also add content normalization for Anthropic responses.
This commit is contained in:
Yijia-Xiao committed 2026-03-22 21:57:05 +00:00
1 parent 77755f0431
commit bd9b1e5efa
5 files changed
+57 -3

No files matched your search

+5
View File
@@ -148,6 +148,11 @@ class TradingAgentsGraph:
if reasoning_effort:
kwargs["reasoning_effort"] = reasoning_effort
elif provider == "anthropic":
effort = self.config.get("anthropic_effort")
if effort:
kwargs["effort"] = effort
return kwargs
def _create_tool_nodes(self) -> Dict[str, ToolNode]: