feat(providers): implement real API key validation with OpenRouter support
- Replace mock API key validation with actual API calls to verify keys - Add validateApiKeyWithProvider() with provider-specific implementations - Support Anthropic, OpenAI, Google, and OpenRouter validation - Add OpenRouter as a new provider option in setup wizard and settings - Fix setup page to call real validation instead of mock length check - Allow validation during setup before provider is saved - Return user-friendly error messages instead of raw API errors
This commit is contained in:
@@ -31,6 +31,7 @@ const providerTypes = [
|
||||
{ id: 'anthropic', name: 'Anthropic', icon: '🤖', placeholder: 'sk-ant-api03-...' },
|
||||
{ id: 'openai', name: 'OpenAI', icon: '💚', placeholder: 'sk-proj-...' },
|
||||
{ id: 'google', name: 'Google', icon: '🔷', placeholder: 'AIza...' },
|
||||
{ id: 'openrouter', name: 'OpenRouter', icon: '🌐', placeholder: 'sk-or-v1-...' },
|
||||
{ id: 'ollama', name: 'Ollama', icon: '🦙', placeholder: 'Not required' },
|
||||
{ id: 'custom', name: 'Custom', icon: '⚙️', placeholder: 'API key...' },
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user