fix: corrected defaults causing AI translation appear enabled on upgrade#1153
Merged
Conversation
Previously, the Summary API settings were initialised with a hardcoded fallback of "gpt-4o-mini" for the model ID preference. For users who had never configured the AI feature, this non-blank value caused isBlankConfiguration to return false, which made AIProviderPreset resolve to OPENAI_COMPATIBLE instead of NONE. Opening Settings then showed an "Enter an API key before saving" validation message even though the user had never opted in to any AI provider. Fixed by changing the fallback default for PREF_OPENAI_MODEL_ID to an empty string, so unconfigured installations correctly resolve to NONE. Closes #1152 Signed-off-by: Jonas Kalderstam <[email protected]>
4 tasks
There was a problem hiding this comment.
Pull request overview
This PR fixes the default Summary AI settings so unconfigured installs no longer appear to have an AI provider selected after upgrade.
Changes:
- Changes the Summary API model ID fallback from
"gpt-4o-mini"to an empty string. - Aligns Summary API defaults with Translation API defaults and
OpenAISettingsdefaults.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the Summary API settings were initialised with a hardcoded fallback of "gpt-4o-mini" for the model ID preference. For users who had never configured the AI feature, this non-blank value caused isBlankConfiguration to return false, which made AIProviderPreset resolve to OPENAI_COMPATIBLE instead of NONE. Opening Settings then showed an "Enter an API key before saving" validation message even though the user had never opted in to any AI provider.
Fixed by changing the fallback default for PREF_OPENAI_MODEL_ID to an empty string, so unconfigured installations correctly resolve to NONE.
Closes #1152