mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
fix(core): shallow-clone savedApiKeySource to avoid mutation risk
Copy the ConfigSource object before applyResolvedModelDefaults runs, so a future refactor that mutates source objects in place won't break the save/restore logic. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
0e3cb0a753
commit
7b628d7003
1 changed files with 2 additions and 0 deletions
|
|
@ -905,6 +905,8 @@ export class ModelsConfig {
|
|||
: undefined;
|
||||
const savedApiKeySource = isUnchanged
|
||||
? this.generationConfigSources['apiKey']
|
||||
? { ...this.generationConfigSources['apiKey'] }
|
||||
: undefined
|
||||
: undefined;
|
||||
|
||||
this.applyResolvedModelDefaults(resolved);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue