File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/vs/workbench/contrib/chat/browser Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -560,7 +560,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
560
560
* Order of precedence:
561
561
* 1. TODO: Last used model for the provider (persisted in storage)
562
562
* 2. Preferred model from configuration (if set and available)
563
- * 3. TODO: Default model for the provider (if set in settings)
563
+ * 3. Default model for the provider (inherited from default model config in Positron Assistant extension, or if set in settings)
564
564
* 4. First available model from the provider
565
565
* @returns The model to select for the current provider, or undefined if no models are available.
566
566
*/
@@ -571,7 +571,12 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
571
571
return undefined ;
572
572
}
573
573
574
- // TODO: if the user has manually changed the model previously, use that model if it is still available
574
+ // TODO: if the user has manually changed the model previously, use that model if it is still available.
575
+ // When the user switches the provider, instead of using the last used model for that provider,
576
+ // we always use the preferred model from config or the default model for the provider, falling back to
577
+ // the first available model.
578
+ // We'd need to persist the last used model per provider in storage or in memory, and then look that up here.
579
+ // See https://github.com/posit-dev/positron/issues/9829 for more details.
575
580
576
581
const config = this . configurationService . getValue < { preferredModel : string } > ( 'positron.assistant' ) ;
577
582
You can’t perform that action at this time.
0 commit comments