TradingAgents/orchestrator
陈少杰 eda9980729 feat(orchestrator): add comprehensive provider and timeout validation
Add three layers of configuration validation to LLMRunner:

1. Provider × base_url matrix validation
   - Validates all 6 providers (anthropic, openai, google, xai, ollama, openrouter)
   - Uses precompiled regex patterns for efficiency
   - Detects mismatches before expensive graph initialization

2. Timeout configuration validation
   - Warns when analyst/research timeouts may be insufficient
   - Provides recommendations based on analyst count (1-4)
   - Non-blocking warnings logged at init time

3. Enhanced error classification
   - Distinguishes provider_mismatch from provider_auth_failed
   - Uses heuristic detection for auth failures
   - Simplified nested ternary expressions for readability

Improvements:
- Validation runs before cache check (prevents stale cache on config errors)
- EAFP pattern for cache reading (more robust than TOCTOU)
- Precompiled regex patterns (avoid recompilation overhead)
- All 21 unit tests passing

Documentation:
- docs/architecture/orchestrator-validation.md - complete validation guide
- orchestrator/examples/validation_examples.py - runnable examples

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 11:43:19 +08:00
..
contracts feat(orchestrator): add comprehensive provider and timeout validation 2026-04-16 11:43:19 +08:00
data Harden executor configuration and failure contracts before further rollout 2026-04-14 01:54:44 +08:00
examples feat(orchestrator): add comprehensive provider and timeout validation 2026-04-16 11:43:19 +08:00
tests feat(orchestrator): add comprehensive provider and timeout validation 2026-04-16 11:43:19 +08:00
__init__.py feat(orchestrator): add signals.py and config.py 2026-04-09 21:35:31 +08:00
backtest_mode.py fix(review): api_key→anthropic_key bug, sync-in-async event loop block, orchestrator per-message re-init, dead code cleanup 2026-04-09 22:55:36 +08:00
config.py Stabilize TradingAgents contracts so orchestration and dashboard can converge 2026-04-13 17:25:07 +08:00
live_mode.py Keep research degradation visible while bounding researcher nodes 2026-04-14 03:49:33 +08:00
llm_runner.py feat(orchestrator): add comprehensive provider and timeout validation 2026-04-16 11:43:19 +08:00
market_calendar.py Harden executor configuration and failure contracts before further rollout 2026-04-14 01:54:44 +08:00
orchestrator.py Keep research degradation visible while bounding researcher nodes 2026-04-14 03:49:33 +08:00
profile_ab.py Make A/B trace comparisons easier to trust during profiling 2026-04-14 05:12:13 +08:00
profile_stage_chain.py Finish the A/B harness recovery without leaving conflict markers behind 2026-04-14 05:15:21 +08:00
profile_trace_utils.py omx(team): auto-checkpoint worker-4 [unknown] 2026-04-14 05:14:01 +08:00
quant_runner.py Carry Phase 4 rollout-readiness work back into the mainline safely 2026-04-14 01:15:18 +08:00
signals.py Stabilize TradingAgents contracts so orchestration and dashboard can converge 2026-04-13 17:25:07 +08:00