mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: adjust model dialog to handle same model id but different names
This commit is contained in:
parent
bdac22cb07
commit
f87485f27d
1 changed files with 2 additions and 1 deletions
|
|
@ -303,7 +303,8 @@ func (m *modelDialog) buildSearchResults(query string) []list.Item {
|
|||
for _, match := range matches {
|
||||
model := modelMap[match.Target]
|
||||
// Create a unique key to avoid duplicates
|
||||
key := fmt.Sprintf("%s:%s", model.Provider.ID, model.Model.ID)
|
||||
// Include name to handle custom models with same ID but different names
|
||||
key := fmt.Sprintf("%s:%s:%s", model.Provider.ID, model.Model.ID, model.Model.Name)
|
||||
if seenModels[key] {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue