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

+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();
});