From 279b9eabde609b9f7c196029ae30a707417ad136 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 21 May 2026 23:38:39 +0800 Subject: [PATCH] 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. --- src-tauri/tests/import_export_sync.rs | 8 ++++---- tests/config/codexChatProviderPresets.test.ts | 7 ------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src-tauri/tests/import_export_sync.rs b/src-tauri/tests/import_export_sync.rs index 7fb9e5aaf..685831612 100644 --- a/src-tauri/tests/import_export_sync.rs +++ b/src-tauri/tests/import_export_sync.rs @@ -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" ); } diff --git a/tests/config/codexChatProviderPresets.test.ts b/tests/config/codexChatProviderPresets.test.ts index 74ed5306a..1ce739729 100644 --- a/tests/config/codexChatProviderPresets.test.ts +++ b/tests/config/codexChatProviderPresets.test.ts @@ -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", {