diff --git a/app/MindWork AI Studio/Components/ChatComponent.razor.cs b/app/MindWork AI Studio/Components/ChatComponent.razor.cs index 265e176f..3070473a 100644 --- a/app/MindWork AI Studio/Components/ChatComponent.razor.cs +++ b/app/MindWork AI Studio/Components/ChatComponent.razor.cs @@ -611,9 +611,8 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable { var previousProvider = this.Provider; var previousChatTemplate = this.currentChatTemplate; - var chatProviderId = this.ChatThread?.SelectedProvider; - this.Provider = this.SettingsManager.GetChatProviderForLoadedChat(chatProviderId); + this.Provider = this.SettingsManager.GetChatProviderForLoadedChat(this.Provider.Id); if (this.Provider != previousProvider) await this.ProviderChanged.InvokeAsync(this.Provider);