From b57c041345b288167e26e32f4243dbf1a75eb9dd Mon Sep 17 00:00:00 2001 From: Cokky Turnip Date: Thu, 13 Aug 2026 11:53:39 +0700 Subject: [PATCH] fix(providers): add llm7 to provider test support --- src/app/api/providers/[id]/test/testUtils.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/api/providers/[id]/test/testUtils.js b/src/app/api/providers/[id]/test/testUtils.js index 0ea46b2d..e77a79fb 100644 --- a/src/app/api/providers/[id]/test/testUtils.js +++ b/src/app/api/providers/[id]/test/testUtils.js @@ -788,6 +788,13 @@ async function testApiKeyConnection(connection, effectiveProxy = null) { ); 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: return { valid: false, error: "Provider test not supported" }; }