Update Codex provider migration test expectations

This commit is contained in:
Jason
2026-05-29 12:17:55 +08:00
parent 0877b9e35d
commit 2b6ede1431
2 changed files with 16 additions and 16 deletions
+6 -6
View File
@@ -210,7 +210,7 @@ experimental_bearer_token = "stored-bearer-key"
}
#[test]
fn sync_codex_provider_preserves_live_model_provider_id_for_history() {
fn sync_codex_provider_preserves_user_model_provider_id_after_migration() {
let _guard = test_mutex().lock().expect("acquire test mutex");
reset_test_fs();
@@ -264,8 +264,8 @@ requires_openai_auth = true
assert_eq!(
parsed.get("model_provider").and_then(|v| v.as_str()),
Some("custom"),
"legacy ConfigService sync should collapse third-party providers into the stable \"custom\" history bucket"
Some("aihubmix"),
"ConfigService sync should preserve user-editable model_provider after the one-time migration"
);
let model_providers = parsed
@@ -273,12 +273,12 @@ requires_openai_auth = true
.and_then(|v| v.as_table())
.expect("model_providers should exist");
assert!(
model_providers.get("aihubmix").is_none(),
"provider-specific target id should not be written to live config"
model_providers.get("custom").is_none(),
"provider sync should not force user-edited provider ids back to custom"
);
assert_eq!(
model_providers
.get("custom")
.get("aihubmix")
.and_then(|v| v.get("base_url"))
.and_then(|v| v.as_str()),
Some("https://aihubmix.example/v1")