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. |
||
|---|---|---|
| .. | ||
| TODO.md | ||
| __init__.py | ||
| anthropic_client.py | ||
| azure_client.py | ||
| base_client.py | ||
| factory.py | ||
| google_client.py | ||
| model_catalog.py | ||
| openai_client.py | ||
| validators.py | ||