TradingAgents/tradingagents/llm_clients
Michael Yang 2f870be9a8 feat: route analyst tool loop through Claude Agent SDK (Shape B)
The 4 analysts (market, news, social, fundamentals) now detect a
ChatClaudeAgent LLM and dispatch to an SDK-native runner: LangChain @tool
functions are wrapped as in-process MCP tools via create_sdk_mcp_server, and
the SDK owns the iterative tool-calling loop. Claude returns the final report
in one call, so the analyst node outputs an AIMessage with no tool_calls and
the existing conditional edges route straight to the message-clear step.

Together with the Shape A provider this lets a Claude Max subscription drive
the full TradingAgents graph without an Anthropic API key. Other providers
continue to take the original bind_tools + LangGraph ToolNode path unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 16:08:40 -04:00
..
TODO.md fix: pass base_url to Google and Anthropic clients for proxy support (#427) 2026-03-29 17:59:52 +00:00
__init__.py feat: add multi-provider LLM support with factory pattern 2026-02-03 22:27:20 +00:00
anthropic_client.py Merge pull request #464 from CadeYu/sync-validator-models 2026-03-29 11:07:51 -07:00
azure_client.py feat: add DeepSeek, Qwen, GLM, and Azure OpenAI provider support 2026-04-13 07:12:07 +00:00
base_client.py Merge pull request #464 from CadeYu/sync-validator-models 2026-03-29 11:07:51 -07:00
claude_agent_client.py feat: add claude_agent LLM provider backed by Claude Agent SDK (Shape A) 2026-04-14 15:53:26 -04:00
factory.py feat: add claude_agent LLM provider backed by Claude Agent SDK (Shape A) 2026-04-14 15:53:26 -04:00
google_client.py Merge pull request #464 from CadeYu/sync-validator-models 2026-03-29 11:07:51 -07:00
mcp_tool_adapter.py feat: route analyst tool loop through Claude Agent SDK (Shape B) 2026-04-14 16:08:40 -04:00
model_catalog.py feat: add DeepSeek, Qwen, GLM, and Azure OpenAI provider support 2026-04-13 07:12:07 +00:00
openai_client.py feat: add DeepSeek, Qwen, GLM, and Azure OpenAI provider support 2026-04-13 07:12:07 +00:00
validators.py sync model validation with cli catalog 2026-03-25 21:23:02 +08:00