fix(providers): preserve existing ShengSuanYun connections

This commit is contained in:
Xubin Ren committed 2026-11-14 20:44:28 +08:00
1 parent 41f7f6f337
commit eb1df4d7b1
10 files changed
+110 -27

No files matched your search

@@ -27,7 +27,7 @@ const PROVIDER_SEARCH_ALIASES: Record<string, string> = {
minimax: "海螺 稀宇",
minimax_anthropic: "海螺 稀宇",
siliconflow: "硅基流动 矽基流動 硅基流動",
shengsuanyun: "胜算云 勝算雲",
shengsuanyun_router: "胜算云 勝算雲",
stepfun: "阶跃星辰 階躍星辰",
xiaomi_mimo: "小米 mimo",
longcat: "美团 美團",
@@ -38,8 +38,8 @@ const DEFERRED_MODEL_LIST_PROVIDERS = new Set([
"openrouter",
"orcarouter",
"ovms",
"shengsuanyun_router",
"siliconflow",
"shengsuanyun",
"vllm",
"volcengine",
"volcengine_coding_plan",
+1 -1
View File
@@ -228,7 +228,7 @@ const PROVIDER_BRANDS: Record<string, ProviderBrand> = {
initials: "SX",
},
siliconflow: brand("siliconflow.cn", "#111827", "SF"),
shengsuanyun: { ...brand("shengsuanyun.com", "#5742EE", "SSY", [
shengsuanyun_router: { ...brand("shengsuanyun.com", "#5742EE", "SSY", [
"https://www.shengsuanyun.com/svg/logo-C_e87Vaj.svg",
]), logoLayout: "tile" },
skywork: brand("skywork.ai", "#5B5BF6", "SW"),
+1 -1
View File
@@ -20,7 +20,7 @@ export const PROVIDER_ICONS: Record<string, LucideIcon> = {
gemini: Gem,
mistral: Orbit,
siliconflow: Layers,
shengsuanyun: Cloud,
shengsuanyun_router: Cloud,
volcengine: Cloud,
volcengine_coding_plan: Cloud,
byteplus: Cloud,
+1 -1
View File
@@ -48,7 +48,7 @@ describe("settings provider icons", () => {
it.each([
"aihubmix", "bedrock", "exa", "groq", "lm_studio", "minimax", "minimax_anthropic",
"modelscope", "moonshot", "olostep", "shengsuanyun", "tavily", "xiaomi_mimo", "zhipu",
"modelscope", "moonshot", "olostep", "shengsuanyun_router", "tavily", "xiaomi_mimo", "zhipu",
])(
"does not double-frame %s's primary tile, but preserves unknown fallback assets",
(provider) => {
+3 -3
View File
@@ -24,12 +24,12 @@ describe("Settings providers", () => {
it("finds ShengSuanYun by its Chinese name and opens its credential form", async () => {
const user = userEvent.setup();
const payload = settingsPayload();
payload.providers = [{ name: "shengsuanyun", label: "ShengSuanYun", configured: false }];
payload.providers = [{ name: "shengsuanyun_router", label: "ShengSuanYun Router", configured: false }];
renderProviderManager({ initialSection: "models", initialSettings: payload });
await user.click(screen.getByRole("button", { name: "Add provider" }));
await user.type(screen.getByRole("combobox", { name: "Search providers" }), "胜算云");
await user.click(screen.getByRole("option", { name: "ShengSuanYun" }));
expect(screen.getByRole("dialog", { name: "ShengSuanYun" })).toBeVisible();
await user.click(screen.getByRole("option", { name: "ShengSuanYun Router" }));
expect(screen.getByRole("dialog", { name: "ShengSuanYun Router" })).toBeVisible();
expect(screen.getByPlaceholderText("Enter API key")).toBeInTheDocument();
});