mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-06-16 13:34:04 +08:00
2d64d8c619
* fix(proxy): preserve Codex OAuth auth token on takeover * style(proxy): format Codex OAuth takeover fix * fix(proxy): unconditionally inject AUTH_TOKEN placeholder for codex takeover The preserve-if-exists condition left #3784 unfixed on three paths: hot-switch passes the provider's settings (presets carry no ANTHROPIC_AUTH_TOKEN key), fresh installs never had the key, and live configs already stripped by older releases stay stripped. - Fold the bool parameter into the policy enum as ManagedAccount { keep_auth_token } so every construction site declares intent - Decide via !is_github_copilot() within the managed branch so URL-only codex providers (no provider_type meta) are covered, matching the predicate family used for policy selection - Inject the placeholder unconditionally instead of only when the key pre-exists; Copilot behavior is unchanged (API_KEY only) - Pin the previously uncovered cases with tests: codex without a pre-existing key, URL-only codex, and Copilot removing a stale AUTH_TOKEN --------- Co-authored-by: codeasier <liuyekang@huawei.com> Co-authored-by: Jason <farion1231@gmail.com>
2d64d8c619
·
2026-06-11 22:21:42 +08:00
History