fix(graph): add missing Anthropic thinking_config
Update _get_provider_kwargs() in trading_graph.py to support extended reasoning for Claude models. Dynamically injects the thinking_config dictionary when the provider is 'anthropic' and a budget is set. Keeps the implementation consistent with existing OpenAI and Google logic. Addresses the missing parameter issue mentioned in llm_clients/TODO.md
This commit is contained in:
parent
f362a160c3
commit
98ae0bf88d
|
|
@ -147,7 +147,9 @@ class TradingAgentsGraph:
|
|||
reasoning_effort = self.config.get("openai_reasoning_effort")
|
||||
if reasoning_effort:
|
||||
kwargs["reasoning_effort"] = reasoning_effort
|
||||
|
||||
# Ton nouveau code pour Anthropic
|
||||
elif self.provider == "anthropic" and self.config.get("anthropic_thinking_budget"):
|
||||
kwargs["thinking_config"] = {"type": "enabled", "budget_tokens": int(self.config["anthropic_thinking_budget"])}
|
||||
return kwargs
|
||||
|
||||
def _create_tool_nodes(self) -> Dict[str, ToolNode]:
|
||||
|
|
|
|||
Loading…
Reference in New Issue