mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-11 17:52:31 +03:00
Perplexity deprecated the unversioned `/models` endpoint (now 404), so the OpenAI-like key validator (validateOpenAILikeProvider in src/lib/providers/validation.ts) would derive `<baseUrl>/models` via addModelsSuffix from the perplexity registry baseUrl and hit a dead endpoint, misclassifying valid keys. Pin an explicit `modelsUrl` on the perplexity registry entry so validation probes `/v1/models` directly. The dashboard models discovery route (src/app/api/providers/[id]/models/route.ts) already tries `/v1/models` first via its endpoints fallback list, so it is unaffected. Co-authored-by: gaoliao1688 <gaoliao1688@users.noreply.github.com> Inspired-by: https://github.com/decolua/9router/commit/db4499d6