From 35152cdae94fa1e5af508822692fa260ff32b9d0 Mon Sep 17 00:00:00 2001
From: zhanghuiying <20434979+UNHNQ@users.noreply.github.com>
Date: Thu, 16 Jul 2026 11:07:56 +0800
Subject: [PATCH] feat: add SiliconFlow CN and Global providers
---
src/llm_core.py | 4 ++++
static/index.html | 2 ++
static/js/providers.js | 6 ++++++
tests/test_admin_device_flow_static.py | 5 +++++
tests/test_provider_detection_builders.py | 8 ++++++++
tests/test_provider_detection_detect.py | 6 ++++++
tests/test_providers_mixtral_logo_js.py | 20 ++++++++++++++++++++
7 files changed, 51 insertions(+)
diff --git a/src/llm_core.py b/src/llm_core.py
index af1958f16f..2f0e5ce5c5 100644
--- a/src/llm_core.py
+++ b/src/llm_core.py
@@ -865,6 +865,8 @@ def _detect_provider(url: str) -> str:
return "openrouter"
if _host_match(url, "groq.com"):
return "groq"
+ if _host_match(url, "siliconflow.cn") or _host_match(url, "siliconflow.com"):
+ return "siliconflow"
if _host_match(url, "nvidia.com"):
return "nvidia"
if _host_match(url, "moonshot.ai") or _host_match(url, "moonshot.cn"):
@@ -1005,6 +1007,8 @@ def _provider_label(url: str) -> str:
if _host_match(url, "opencode.ai/zen/go"): return "OpenCode Go"
if _host_match(url, "opencode.ai/zen"): return "OpenCode Zen"
if _host_match(url, "groq.com"): return "Groq"
+ if _host_match(url, "siliconflow.cn"): return "SiliconFlow (CN)"
+ if _host_match(url, "siliconflow.com"): return "SiliconFlow (Global)"
from src.chatgpt_subscription import is_chatgpt_subscription_base
if is_chatgpt_subscription_base(url): return "ChatGPT Subscription"
from src.copilot import is_copilot_base
diff --git a/static/index.html b/static/index.html
index cb30e84899..d05b0cc20c 100644
--- a/static/index.html
+++ b/static/index.html
@@ -2191,6 +2191,8 @@