mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
Centralize the requiresApiKey guard into providerAllowsOptionalApiKey() in src/shared/constants/providers.ts so testApiKeyConnection and validateProviderApiKey share the same logic. The test route was missing openai-compatible-* and anthropic-compatible-* checks, causing connection test failures for those provider types when no API key was provided. Test file now imports providerAllowsOptionalApiKey and SELF_HOSTED_CHAT_PROVIDER_IDS directly from the source instead of duplicating them.