mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
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:
@@ -151,6 +151,23 @@ export async function POST(request) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "volcengine-ark": {
|
||||
const testModel = getDefaultModel(provider);
|
||||
const res = await fetch("https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Authorization": `Bearer ${apiKey}`,
|
||||
"content-type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
model: testModel,
|
||||
max_tokens: 1,
|
||||
messages: [{ role: "user", content: "test" }],
|
||||
}),
|
||||
});
|
||||
isValid = res.status !== 401 && res.status !== 403;
|
||||
break;
|
||||
}
|
||||
|
||||
case "deepseek":
|
||||
case "groq":
|
||||
|
||||
Reference in New Issue
Block a user