feat(providers): add ShengSuanYun gateway
This commit is contained in:
1 parent
d35b755fc2
commit
cc57c35014
10 files changed
+169
-1
No files matched your search
@@ -27,6 +27,7 @@ const PROVIDER_SEARCH_ALIASES: Record<string, string> = {
|
||||
minimax: "海螺 稀宇",
|
||||
minimax_anthropic: "海螺 稀宇",
|
||||
siliconflow: "硅基流动 矽基流動 硅基流動",
|
||||
shengsuanyun: "胜算云 勝算雲",
|
||||
stepfun: "阶跃星辰 階躍星辰",
|
||||
xiaomi_mimo: "小米 mimo",
|
||||
longcat: "美团 美團",
|
||||
|
||||
@@ -39,6 +39,7 @@ const DEFERRED_MODEL_LIST_PROVIDERS = new Set([
|
||||
"orcarouter",
|
||||
"ovms",
|
||||
"siliconflow",
|
||||
"shengsuanyun",
|
||||
"vllm",
|
||||
"volcengine",
|
||||
"volcengine_coding_plan",
|
||||
|
||||
@@ -228,6 +228,9 @@ const PROVIDER_BRANDS: Record<string, ProviderBrand> = {
|
||||
initials: "SX",
|
||||
},
|
||||
siliconflow: brand("siliconflow.cn", "#111827", "SF"),
|
||||
shengsuanyun: { ...brand("shengsuanyun.com", "#5742EE", "SSY", [
|
||||
"https://www.shengsuanyun.com/svg/logo-C_e87Vaj.svg",
|
||||
]), logoLayout: "tile" },
|
||||
skywork: brand("skywork.ai", "#5B5BF6", "SW"),
|
||||
stepfun: brand("stepfun.com", "#2F6BFF", "SF", [
|
||||
"https://www.stepfun.com/step_favicon.svg",
|
||||
|
||||
@@ -20,6 +20,7 @@ export const PROVIDER_ICONS: Record<string, LucideIcon> = {
|
||||
gemini: Gem,
|
||||
mistral: Orbit,
|
||||
siliconflow: Layers,
|
||||
shengsuanyun: Cloud,
|
||||
volcengine: Cloud,
|
||||
volcengine_coding_plan: Cloud,
|
||||
byteplus: Cloud,
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user