feat: add built-in Volcengine Ark provider support (#741)

Add Volcengine Ark as a first-class API key provider with official model presets, endpoint configuration, API key validation, model discovery, connection testing, provider logo, and runtime alias mapping for `ark/*` model IDs.

Made-with: Cursor

Co-authored-by: kingsy <kingsylin@vip.qq.com>
This commit is contained in:
kenlin
2026-04-24 09:28:50 +07:00
committed by GitHub
co-authored by kingsy
parent 35f1d479e7
commit f2e7a98ce0
9 changed files with 49 additions and 0 deletions
@@ -439,6 +439,15 @@ async function testApiKeyConnection(connection, effectiveProxy = null) {
const valid = res.status !== 401 && res.status !== 403;
return { valid, error: valid ? null : "Invalid API key" };
}
case "volcengine-ark": {
const res = await fetchWithConnectionProxy("https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions", {
method: "POST",
headers: { "Authorization": `Bearer ${connection.apiKey}`, "content-type": "application/json" },
body: JSON.stringify({ model: getDefaultModel(connection.provider), max_tokens: 1, messages: [{ role: "user", content: "test" }] }),
}, effectiveProxy);
const valid = res.status !== 401 && res.status !== 403;
return { valid, error: valid ? null : "Invalid API key" };
}
case "deepseek": {
const res = await fetchWithConnectionProxy("https://api.deepseek.com/models", { headers: { Authorization: `Bearer ${connection.apiKey}` } }, effectiveProxy);
return { valid: res.ok, error: res.ok ? null : "Invalid API key" };