feat(providers): add ShengSuanYun gateway

This commit is contained in:
Xubin Ren committed 2026-11-14 20:44:28 +08:00
1 parent d35b755fc2
commit cc57c35014
10 files changed
+169 -1

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", "tavily", "xiaomi_mimo", "zhipu",
"modelscope", "moonshot", "olostep", "shengsuanyun", "tavily", "xiaomi_mimo", "zhipu",
])(
"does not double-frame %s's primary tile, but preserves unknown fallback assets",
(provider) => {
@@ -21,6 +21,18 @@ async function chooseProviderToConfigure(label: string) {
describe("Settings providers", () => {
installSettingsViewTestHooks();
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 }];
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();
expect(screen.getByPlaceholderText("Enter API key")).toBeInTheDocument();
});
it("manages providers unused by presets and returns focus through the manager", async () => {
const user = userEvent.setup();
const payload = settingsPayload();