mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-25 17:22:27 +08:00
Move first-party, sponsor and relay presets to current model IDs so a pasted Key works without editing the model list. - Claude: opus/sonnet 5 -> 5.5, haiku 4.5 -> 5.5, fable 5 -> 5.1 - GPT: gpt-5.6-sol / gpt-6-sol -> gpt-6.1-sol; add gpt-6-astra/luna - Gemini 3.6 Flash -> 3.8 Flash, 3.1 Pro preview -> 4 Argon; Grok 4.5 -> 4.7; GLM 5.1/5.2 -> 5.3 (+5.3 Flash); DeepSeek V4 Flash -> V4.1 Flash; Doubao 2.1 Pro 260628 -> 260915; StepFun Step Plan -> step-5-preview; add Kimi K3.1 Pro, Qwen3.8 Max, MiniMax M3.1 Flash where the site serves them - Drop retired models: NVIDIA moonshotai/kimi-k3 (EOL 2026-10-15, now kimi-k2.6 without unverified Codex reasoning levels), MiMo V2.5 / V2.5 Pro, Claude Sonnet 4.5, MiniMax M2.7 on Tencent Token Plan Enterprise Pro - Relay presets follow each site's own ID spelling and catalog; DIT.ai, BuyToken and hao.ai are left as configured from their docs; Soshow, SiliconFlow CN, OpenCode Zen and the Ark rolling alias stay - MoArk Codex keeps the tested Kimi-K2.7-Code; K3.1 Pro and Qwen3.8 Max stay out of its Codex catalog until their levels are verified Tests updated to the new IDs; cross-app invariants unchanged.
50 lines
1.7 KiB
TypeScript
50 lines
1.7 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
openclawProviderPresets,
|
|
rebaseOpenClawSuggestedDefaults,
|
|
} from "@/config/openclawProviderPresets";
|
|
|
|
describe("Xiaomi MiMo Token Plan presets", () => {
|
|
it("uses a separate OpenClaw provider namespace from pay-as-you-go MiMo", () => {
|
|
const payAsYouGo = openclawProviderPresets.find(
|
|
(item) => item.name === "Xiaomi MiMo",
|
|
);
|
|
const tokenPlan = openclawProviderPresets.find(
|
|
(item) => item.name === "Xiaomi MiMo Token Plan (China)",
|
|
);
|
|
|
|
expect(payAsYouGo?.suggestedDefaults?.model?.primary).toBe(
|
|
"xiaomimimo/mimo-v2.6-pro",
|
|
);
|
|
expect(tokenPlan?.suggestedDefaults?.model?.primary).toBe(
|
|
"xiaomi-mimo-token-plan/mimo-v2.6-pro",
|
|
);
|
|
expect(tokenPlan?.suggestedDefaults?.modelCatalog).toHaveProperty(
|
|
"xiaomi-mimo-token-plan/mimo-v2.6-pro",
|
|
);
|
|
expect(tokenPlan?.suggestedDefaults?.modelCatalog).toHaveProperty(
|
|
"xiaomi-mimo-token-plan/mimo-v2.6-flash",
|
|
);
|
|
});
|
|
|
|
it("rebases OpenClaw defaults to the submitted provider key", () => {
|
|
const tokenPlan = openclawProviderPresets.find(
|
|
(item) => item.name === "Xiaomi MiMo Token Plan (China)",
|
|
);
|
|
|
|
expect(tokenPlan?.suggestedDefaults).toBeDefined();
|
|
|
|
const rebased = rebaseOpenClawSuggestedDefaults(
|
|
tokenPlan!.suggestedDefaults!,
|
|
"my-mimo-plan",
|
|
);
|
|
|
|
expect(rebased.model?.primary).toBe("my-mimo-plan/mimo-v2.6-pro");
|
|
expect(rebased.modelCatalog).toHaveProperty("my-mimo-plan/mimo-v2.6-pro");
|
|
expect(rebased.modelCatalog).toHaveProperty("my-mimo-plan/mimo-v2.6-flash");
|
|
expect(rebased.modelCatalog).not.toHaveProperty(
|
|
"xiaomi-mimo-token-plan/mimo-v2.6-pro",
|
|
);
|
|
});
|
|
});
|