Enforce fallback provider confidence level check

This commit is contained in:
Thorsten Sommer 2026-01-29 08:18:27 +01:00
parent 19ab4012a3
commit 28974ee99f
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -381,7 +381,12 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
return; return;
} }
this.providerSettings = this.SettingsManager.GetPreselectedProvider(this.Component, this.providerSettings.Id); var fallbackProvider = this.SettingsManager.GetPreselectedProvider(this.Component, this.providerSettings.Id);
if (fallbackProvider != Settings.Provider.NONE &&
fallbackProvider.UsedLLMProvider.GetConfidence(this.SettingsManager).Level < minimumLevel)
fallbackProvider = Settings.Provider.NONE;
this.providerSettings = fallbackProvider;
this.currentProfile = this.ResolveProfileSelection(); this.currentProfile = this.ResolveProfileSelection();
} }