mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-03 19:12:04 +08:00
fix(tests): align Sonnet tier expectations with claude-sonnet-5
The default Sonnet tier was bumped to claude-sonnet-5, but the TheRouter preset tests and ClaudeDesktopProviderForm tests still asserted claude-sonnet-4.6/4-6. Update the expected values to match the presets; input fixtures are left as-is to keep exercising legacy-route migration.
This commit is contained in:
@@ -22,7 +22,7 @@ describe("TheRouter OpenCode and OpenClaw presets", () => {
|
||||
);
|
||||
expect(preset?.settingsConfig.options?.setCacheKey).toBe(true);
|
||||
expect(models).toHaveProperty("openai/gpt-5.3-codex");
|
||||
expect(models).toHaveProperty("anthropic/claude-sonnet-4.6");
|
||||
expect(models).toHaveProperty("anthropic/claude-sonnet-5");
|
||||
expect(models).toHaveProperty("google/gemini-3.5-flash");
|
||||
expect(models["google/gemini-3.5-flash"]?.name).toBe("Gemini 3.5 Flash");
|
||||
});
|
||||
@@ -42,7 +42,7 @@ describe("TheRouter OpenCode and OpenClaw presets", () => {
|
||||
expect(preset?.settingsConfig.api).toBe("openai-completions");
|
||||
expect(modelIds).toEqual(
|
||||
expect.arrayContaining([
|
||||
"anthropic/claude-sonnet-4.6",
|
||||
"anthropic/claude-sonnet-5",
|
||||
"openai/gpt-5.3-codex",
|
||||
"openai/gpt-5.2",
|
||||
"google/gemini-3.5-flash",
|
||||
@@ -55,7 +55,7 @@ describe("TheRouter OpenCode and OpenClaw presets", () => {
|
||||
cost: { input: 1.5, output: 9, cacheRead: 0.15 },
|
||||
});
|
||||
expect(preset?.suggestedDefaults?.model).toEqual({
|
||||
primary: "therouter/anthropic/claude-sonnet-4.6",
|
||||
primary: "therouter/anthropic/claude-sonnet-5",
|
||||
fallbacks: [
|
||||
"therouter/openai/gpt-5.2",
|
||||
"therouter/google/gemini-3.5-flash",
|
||||
|
||||
@@ -17,12 +17,12 @@ describe("TheRouter provider presets", () => {
|
||||
expect(env.ANTHROPIC_BASE_URL).toBe("https://api.therouter.ai");
|
||||
expect(env.ANTHROPIC_AUTH_TOKEN).toBe("");
|
||||
expect(env.ANTHROPIC_API_KEY).toBe("");
|
||||
expect(env.ANTHROPIC_MODEL).toBe("anthropic/claude-sonnet-4.6");
|
||||
expect(env.ANTHROPIC_MODEL).toBe("anthropic/claude-sonnet-5");
|
||||
expect(env.ANTHROPIC_DEFAULT_HAIKU_MODEL).toBe(
|
||||
"anthropic/claude-haiku-4.5",
|
||||
);
|
||||
expect(env.ANTHROPIC_DEFAULT_SONNET_MODEL).toBe(
|
||||
"anthropic/claude-sonnet-4.6",
|
||||
"anthropic/claude-sonnet-5",
|
||||
);
|
||||
expect(env.ANTHROPIC_DEFAULT_OPUS_MODEL).toBe("anthropic/claude-opus-4.8");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user