Files
OmniRoute/src
diegosouzapw 0016c74920 fix(validation): add chat completions fallback for OpenAI/Anthropic compatible providers
Previously, validateOpenAICompatibleProvider and validateAnthropicCompatibleProvider
only tried GET /models. Many compatible providers don't expose this endpoint,
causing the Check button to show 'Invalid' even with valid credentials.

Now both validators follow a 2-step approach:
1. Try GET /models (fast path)
2. If that fails, try a minimal chat/messages request as fallback

Any non-auth 4xx response (400, 422) is treated as valid since it means
the API key was accepted but the test model wasn't recognized.
2026-02-17 14:56:38 -03:00
..