Skip to content

Commit b6de4b7

Browse files
committed
update comments re: determining the selected model
1 parent ecab9de commit b6de4b7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/vs/workbench/contrib/chat/browser/chatInputPart.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
560560
* Order of precedence:
561561
* 1. TODO: Last used model for the provider (persisted in storage)
562562
* 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)
564564
* 4. First available model from the provider
565565
* @returns The model to select for the current provider, or undefined if no models are available.
566566
*/
@@ -571,7 +571,12 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
571571
return undefined;
572572
}
573573

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.
575580

576581
const config = this.configurationService.getValue<{ preferredModel: string }>('positron.assistant');
577582

0 commit comments

Comments
 (0)