mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
fix(siliconflow): update baseUrl .cn -> .com + curate verified model list
Switch all siliconflow endpoints from api.siliconflow.cn to .com (chat, validate, test, models) — the .cn host rejected valid .com-issued keys. Replace the model list with 13 strong models verified live against the API. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
decolua
co-authored by
Cursor
parent
b33cbb0280
commit
e6bac77696
@@ -232,7 +232,7 @@ const PROVIDER_MODELS_CONFIG = {
|
||||
cerebras: createOpenAIModelsConfig("https://api.cerebras.ai/v1/models"),
|
||||
cohere: createOpenAIModelsConfig("https://api.cohere.ai/v1/models"),
|
||||
nebius: createOpenAIModelsConfig("https://api.studio.nebius.ai/v1/models"),
|
||||
siliconflow: createOpenAIModelsConfig("https://api.siliconflow.cn/v1/models"),
|
||||
siliconflow: createOpenAIModelsConfig("https://api.siliconflow.com/v1/models"),
|
||||
hyperbolic: createOpenAIModelsConfig("https://api.hyperbolic.xyz/v1/models"),
|
||||
ollama: createOpenAIModelsConfig("https://ollama.com/api/tags"),
|
||||
// ollama-local: url resolved dynamically below via providerSpecificData.baseUrl
|
||||
|
||||
@@ -527,7 +527,7 @@ async function testApiKeyConnection(connection, effectiveProxy = null) {
|
||||
return { valid: res.ok, error: res.ok ? null : "Invalid API key" };
|
||||
}
|
||||
case "siliconflow": {
|
||||
const res = await fetchWithConnectionProxy("https://api.siliconflow.cn/v1/models", { headers: { Authorization: `Bearer ${connection.apiKey}` } }, effectiveProxy);
|
||||
const res = await fetchWithConnectionProxy("https://api.siliconflow.com/v1/models", { headers: { Authorization: `Bearer ${connection.apiKey}` } }, effectiveProxy);
|
||||
return { valid: res.ok, error: res.ok ? null : "Invalid API key" };
|
||||
}
|
||||
case "hyperbolic": {
|
||||
|
||||
@@ -373,7 +373,7 @@ export async function POST(request) {
|
||||
cerebras: "https://api.cerebras.ai/v1/models",
|
||||
cohere: "https://api.cohere.ai/v1/models",
|
||||
nebius: "https://api.studio.nebius.ai/v1/models",
|
||||
siliconflow: "https://api.siliconflow.cn/v1/models",
|
||||
siliconflow: "https://api.siliconflow.com/v1/models",
|
||||
hyperbolic: "https://api.hyperbolic.xyz/v1/models",
|
||||
ollama: "https://ollama.com/api/tags",
|
||||
"ollama-local": `${resolveOllamaLocalHost({ providerSpecificData })}/api/tags`,
|
||||
|
||||
Reference in New Issue
Block a user