fix(model): validate default model against available options#3217
Open
waleedlatif1 wants to merge 1 commit intostagingfrom
Open
fix(model): validate default model against available options#3217waleedlatif1 wants to merge 1 commit intostagingfrom
waleedlatif1 wants to merge 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryFixed a bug where model dropdowns would default to
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ComboBox
participant getModelOptions
participant ProviderStore
participant PermissionConfig
User->>ComboBox: Open model dropdown
ComboBox->>getModelOptions: Get all available models
getModelOptions->>ProviderStore: Fetch models from providers
ProviderStore-->>getModelOptions: Return base, ollama, vllm, openrouter models
getModelOptions-->>ComboBox: Return combined model list
ComboBox->>PermissionConfig: Filter by allowed providers
PermissionConfig-->>ComboBox: Return filtered options
ComboBox->>ComboBox: Validate defaultValue against filtered options
alt defaultValue exists in filtered options
ComboBox->>User: Apply defaultValue
else defaultValue not in filtered options
ComboBox->>ComboBox: Fallback to first available model
ComboBox->>User: Apply fallback model
end
Last reviewed commit: 43d0295 |
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
claude-sonnet-4-5even when the provider is disabled via permission/access groupsdefaultValueagainst filtered options before applying it — falls back to first available modelgetModelOptions()helper inblocks/utils.ts, replacing duplicated inline logic across agent, evaluator, router, guardrails, and translate blocksType of Change
Testing
Tested manually
Checklist