fix(providers): add llm7 to provider test support
This commit is contained in:
parent
8a527fec91
commit
b57c041345
1 changed files with 7 additions and 0 deletions
|
|
@ -788,6 +788,13 @@ async function testApiKeyConnection(connection, effectiveProxy = null) {
|
||||||
);
|
);
|
||||||
return { valid: exRes.ok, error: exRes.ok ? null : "Invalid Personal Access Token" };
|
return { valid: exRes.ok, error: exRes.ok ? null : "Invalid Personal Access Token" };
|
||||||
}
|
}
|
||||||
|
case "llm7": {
|
||||||
|
const baseUrl = connection.providerSpecificData?.baseUrl || "https://api.llm7.io/v1";
|
||||||
|
const res = await fetchWithConnectionProxy(`${baseUrl.replace(/\/$/, "")}/models`, {
|
||||||
|
headers: { Authorization: `Bearer ${connection.apiKey}` },
|
||||||
|
}, effectiveProxy);
|
||||||
|
return { valid: res.ok, error: res.ok ? null : "Invalid API key or base URL" };
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return { valid: false, error: "Provider test not supported" };
|
return { valid: false, error: "Provider test not supported" };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue