TradingAgents/tradingagents/llm_clients
陈少杰 78312851f9 refactor(orchestrator): centralize provider validation in factory
Move provider × base_url validation patterns from llm_runner.py to
factory.py's ProviderSpec, implementing the architecture improvement
suggested in docs/architecture/orchestrator-validation.md.

Changes:
- Add base_url_patterns field to ProviderSpec dataclass
- Split ollama and openrouter into separate ProviderSpec entries
  (previously shared openai's spec with dynamic provider selection)
- Add validate_provider_base_url() function in factory for reusable validation
- Simplify LLMRunner._detect_provider_mismatch() to delegate to factory
- Update architecture doc with change log and implementation notes

Benefits:
- Single source of truth for provider configuration
- Easier maintenance when adding/updating providers
- Reduced code duplication (llm_runner.py: -39 lines, factory.py: +84 lines)
- Factory validation can be tested independently

All 28 orchestrator validation tests pass, including 6 provider mismatch tests.
2026-04-16 20:06:30 +08: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 Stabilize TradingAgents contracts so orchestration and dashboard can converge 2026-04-13 17:25:07 +08:00
anthropic_client.py wip: stage uncommitted changes before merge 2026-04-16 17:01:04 +08: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
factory.py refactor(orchestrator): centralize provider validation in factory 2026-04-16 20:06:30 +08:00
google_client.py Merge pull request #464 from CadeYu/sync-validator-models 2026-03-29 11:07:51 -07:00
model_catalog.py fix: resolve merge conflicts in README and factory.py 2026-04-16 17:01:57 +08:00
openai_client.py fix: resolve merge conflicts in README and factory.py 2026-04-16 17:01:57 +08:00
validators.py sync model validation with cli catalog 2026-03-25 21:23:02 +08:00