test: align stale tests with merged Codex preset and bucket changes

CI on main was red because two tests did not follow intentional changes
that were already merged into the codebase:

- codexChatProviderPresets.test.ts still expected the "Kimi For Coding"
  preset, which was removed in 16c3ef3f. Drop the corresponding entry
  from the expected presets map.
- import_export_sync.rs still asserted the legacy per-provider
  model_provider id ("rightcode"), but 9fac15b8 unified Codex
  third-party providers into the stable "custom" history bucket. Mirror
  the assertion update already applied to provider_service.rs.

No production code changed; both fixes only update test expectations.
This commit is contained in:
Jason
2026-05-21 23:38:39 +08:00
parent f9db9913a0
commit 279b9eabde
2 changed files with 4 additions and 11 deletions
+4 -4
View File
@@ -194,8 +194,8 @@ requires_openai_auth = true
assert_eq!(
parsed.get("model_provider").and_then(|v| v.as_str()),
Some("rightcode"),
"legacy ConfigService sync should use the stable live provider id"
Some("custom"),
"legacy ConfigService sync should collapse third-party providers into the stable \"custom\" history bucket"
);
let model_providers = parsed
@@ -208,7 +208,7 @@ requires_openai_auth = true
);
assert_eq!(
model_providers
.get("rightcode")
.get("custom")
.and_then(|v| v.get("base_url"))
.and_then(|v| v.as_str()),
Some("https://aihubmix.example/v1")
@@ -221,7 +221,7 @@ requires_openai_auth = true
.and_then(|v| v.as_str())
.expect("synced config string");
assert!(
synced_cfg.contains("[model_providers.rightcode]"),
synced_cfg.contains("[model_providers.custom]"),
"ConfigService keeps its existing behavior of syncing provider config from live"
);
}
@@ -79,13 +79,6 @@ const expectedChatPresets = new Map<
contextWindows: { "kimi-k2.6": 262144 },
},
],
[
"Kimi For Coding",
{
baseUrl: "https://api.kimi.com/coding/v1",
contextWindows: { "kimi-for-coding": 262144 },
},
],
[
"StepFun",
{