feat(pi): preserve provider/model fields and sync Pi default provider/model on switch

- Fix stale configRef in useConfig so saves include the latest state.
- Preserve Pi models.json fields (headers, compat, cost, maxTokens,
  thinkingLevelMap, authHeader, modelOverrides, provider name) across edits.
- Add Pi settings.json I/O and update defaultProvider/defaultModel when
  activating a provider so Pi actually picks up the switch.
- Add round-trip and settings serialization tests.
This commit is contained in:
KimiSwitch Dev
2026-07-08 19:39:15 +08:00
parent 6eb57d2ac6
commit 232949a701
4 changed files with 338 additions and 17 deletions
+1
View File
@@ -476,6 +476,7 @@ api_key = ""
official_url: None,
managed: false,
enabled: true,
active: true,
raw_other: Value::Null,
},
);