mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 02:05:57 +08:00
refactor(codex): stop force-rewriting user's model_provider field in live config
The one-time history migration already consolidates legacy provider IDs into a single bucket; there is no need to normalize on every write. This preserves user-chosen provider identities through the full write/backup/restore cycle.
This commit is contained in:
@@ -187,8 +187,8 @@ impl ConfigService {
|
||||
&provider.settings_config,
|
||||
restore_provider_token,
|
||||
)?;
|
||||
// 必须同时写回 auth 和 config: backfill 会恢复 stored provider id,
|
||||
// 并把 live 的 experimental_bearer_token 移到 restored.auth.OPENAI_API_KEY。
|
||||
// 必须同时写回 auth 和 config: backfill 会把 live 的
|
||||
// experimental_bearer_token 移到 restored.auth.OPENAI_API_KEY。
|
||||
if let Some(restored_obj) = restored.as_object() {
|
||||
if let Some(auth_value) = restored_obj.get("auth") {
|
||||
obj.insert("auth".to_string(), auth_value.clone());
|
||||
|
||||
Reference in New Issue
Block a user