fix(settings): clear default_model when provider_deny_list blocks it#930
Merged
chrarnoldus merged 1 commit intomainfrom Mar 9, 2026
Merged
Conversation
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
|
markijbema
approved these changes
Mar 9, 2026
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.
Summary
provider_deny_listcould leave a now-blockeddefault_modelpersisted in org settings.model_deny_listwas included in the update and non-empty, so a provider-only deny-list update that blocked every provider for the current default model would silently leave the stale value in the DB.model_deny_listorprovider_deny_listis part of the update, and uses the effective (post-update) values of both lists to evaluate whetherdefault_modelis still allowed.Addresses: #799 (comment)
Verification
effectiveModelDenyList/effectiveProviderDenyListfallback to[]ensurescreateAllowPredicateFromDenyListreceives the correct post-update state regardless of which list was updated.Visual Changes
N/A
Reviewer Notes
The inner
if (effectiveModelDenyList.length > 0 || effectiveProviderDenyList.length > 0)guard preserves the original behaviour of skipping the async predicate check when both lists are empty (i.e. deny lists are being fully cleared — in that case all models become allowed, so no need to cleardefault_model).