mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-17 12:42:21 +03:00
OpenRouter serves embeddings via a dedicated OpenAI-compatible /api/v1/embeddings endpoint that is omitted from /v1/models, and the embeddingRegistry entry for it was stale (3 legacy ids). Meanwhile providerModelsConfig gives openrouter a live discovery config, so buildApiDiscoveryResponse's success path returned only the live chat catalog verbatim — the specialty (embeddings/rerank) static catalog was only ever merged in on the no-config local_catalog fallback, so OpenRouter embeddings never surfaced through model discovery. Refreshed the curated openrouter embeddingRegistry lineup (ids verified against https://openrouter.ai/docs/api/reference/embeddings and the collections page) and added a scoped, additive merge (mergeSpecialtyCatalogIntoLiveModels, allowlisted to openrouter) that folds embeddings/rerank entries from getStaticModelsForProvider() into the live discovery response, deduped by id. Scoped as an allowlist rather than a blanket merge because some providers (e.g. Gemini) already return embedding models directly from their live /v1/models endpoint, where a blind merge would risk stale/duplicate entries.