mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-14 10:52:17 +03:00
The embedding-models route only treated a provider connection as "configured" when it had a real apiKey or authType "oauth". Local/self-hosted providers (ollama-local, lm-studio, vllm, etc.) connect through the connections route with authType "apikey" but no apiKey — the connect form never asks for one (src/shared/constants/providers/local.ts) — so an active local connection's embedding models (embeddinggemma, nomic-embed-text, bge-m3 for ollama-local) never surfaced in the dropdown even though the connection tested "Ativo". Reuse the existing canonical providerAllowsOptionalApiKey() helper (src/shared/constants/providers.ts) — already used for the identical requiresApiKey check in src/app/api/providers/[id]/test/route.ts and across the Zod validation schemas — instead of hardcoding a provider id list.