mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
refactor: ensure invalid provider models always result in a valid model combination.
This commit is contained in:
parent
8e9718ba01
commit
f8eef3798e
1 changed files with 3 additions and 8 deletions
|
|
@ -97,15 +97,10 @@ export class SettingsService {
|
|||
const validModel = isValidProviderModel(this.settings.model);
|
||||
const validPlanningModel = isValidProviderModel(this.settings.model);
|
||||
|
||||
if (!validModel) {
|
||||
this.settings.model = AIProviderModel.ClaudeSonnet_4_6;
|
||||
}
|
||||
if (!validPlanningModel) {
|
||||
this.settings.planningModel = AIProviderModel.ClaudeSonnet_4_6;
|
||||
}
|
||||
|
||||
if (!validModel || !validPlanningModel) {
|
||||
this.saveSettings();
|
||||
this.settings.model = AIProviderModel.ClaudeSonnet_4_6;
|
||||
this.settings.planningModel = AIProviderModel.ClaudeSonnet_4_6;
|
||||
void this.saveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue