Files
ciregenzandClaude Opus 4.6 9a8fed3862 [eric] fix credential resolution for all providers + 9Router fallback
Fixed:
- validate_credentials now handles display names (Anthropic, OpenAI, Google)
  not just lowercase — was causing "Provider not found" errors
- OpenRouter-backed providers (xAI, Meta, DeepSeek, Mistral, Qwen, Cohere)
  now fall back to 9Router when no OpenRouter API key is set
- OpenAICompatProvider no longer crashes on empty API key
- Clear error messages per provider type when nothing is configured

Credential resolution order (per provider):
1. Direct API key → use native provider
2. 9Router running → route through 9Router
3. Neither → clear error with instructions

All 9 providers tested: validate + create_provider pass with 9Router,
correctly blocked with descriptive errors when 9Router is down + no keys.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 09:52:37 -07:00
..