fix: add novita case to validate-model route

Adds the missing 'novita' case to the OpenAI-compatible provider
block in the validate-model API route, fixing 400 errors when
users test their Novita API key in the UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex-wuhu
2026-03-29 01:05:40 +08:00
parent a5871ded9b
commit 3ca46f44c1

View File

@@ -345,11 +345,12 @@ export async function POST(req: Request) {
break break
} }
// GLM, Qwen, Kimi, Qiniu - OpenAI compatible // GLM, Qwen, Kimi, Qiniu, Novita - OpenAI compatible
case "glm": case "glm":
case "qwen": case "qwen":
case "kimi": case "kimi":
case "qiniu": { case "qiniu":
case "novita": {
const baseURL = const baseURL =
baseUrl || baseUrl ||
PROVIDER_INFO[provider as ProviderName]?.defaultBaseUrl || PROVIDER_INFO[provider as ProviderName]?.defaultBaseUrl ||