Integrate NemoClaw recovery and dashboard routing

This commit is contained in:
mmckeen-nv
2026-05-08 09:32:56 -07:00
parent 819e3e5f7d
commit 94bd7737d3
25 changed files with 1001 additions and 152 deletions
+6 -2
View File
@@ -106,8 +106,12 @@ function isVllmEndpoint(name: string, baseUrl: string) {
return [name, baseUrl].some((value) => /vllm/i.test(value))
}
function isOllamaEndpoint(name: string, baseUrl: string) {
return [name, baseUrl].some((value) => /ollama|11434/i.test(value))
}
function normalizeProviderType(type: string, name: string, baseUrl: string) {
return isVllmEndpoint(name, baseUrl) ? "openai" : type
return isVllmEndpoint(name, baseUrl) || isOllamaEndpoint(name, baseUrl) ? "openai" : type
}
function redactSecretOutput(value: string, secrets: string[] = []) {
@@ -153,7 +157,7 @@ export async function POST(request: Request) {
const credentialKey = optionalString(body?.credentialKey) || "OPENAI_API_KEY"
const makeActive = body?.makeActive !== false
const system = body?.route === "system" || body?.system === true
const noVerify = body?.noVerify !== false || isVllmEndpoint(name, baseUrl)
const noVerify = body?.noVerify !== false || isVllmEndpoint(name, baseUrl) || isOllamaEndpoint(name, baseUrl)
const timeout = Number(body?.timeout ?? 0)
if (makeActive && !model) throw new Error("model is required when making the endpoint active")