refactor(channels): integrate channel runtime status management and enhance account status handling (#547)

This commit is contained in:
Haze
2026-03-17 11:29:17 +08:00
committed by GitHub
Unverified
parent 43fe7a4d1c
commit d4367d3265
10 changed files with 713 additions and 61 deletions

View File

@@ -195,7 +195,7 @@ export async function handleProviderRoutes(
const registryBaseUrl = getProviderConfig(providerType)?.baseUrl;
const resolvedBaseUrl = body.options?.baseUrl || provider?.baseUrl || registryBaseUrl;
const resolvedProtocol = body.options?.apiProtocol || provider?.apiProtocol;
sendJson(res, 200, await validateApiKeyWithProvider(providerType, body.apiKey, { baseUrl: resolvedBaseUrl, apiProtocol: resolvedProtocol as any }));
sendJson(res, 200, await validateApiKeyWithProvider(providerType, body.apiKey, { baseUrl: resolvedBaseUrl, apiProtocol: resolvedProtocol }));
} catch (error) {
sendJson(res, 500, { valid: false, error: String(error) });
}