Skip to content

Commit fe45a76

Browse files
authored
fix: adjust model dialog to handle same model id but different names (anomalyco#2881)
1 parent bdac22c commit fe45a76

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • packages/tui/internal/components/dialog

packages/tui/internal/components/dialog/models.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ func (m *modelDialog) buildSearchResults(query string) []list.Item {
303303
for _, match := range matches {
304304
model := modelMap[match.Target]
305305
// Create a unique key to avoid duplicates
306-
key := fmt.Sprintf("%s:%s", model.Provider.ID, model.Model.ID)
306+
// Include name to handle custom models with same ID but different names
307+
key := fmt.Sprintf("%s:%s:%s", model.Provider.ID, model.Model.ID, model.Model.Name)
307308
if seenModels[key] {
308309
continue
309310
}

0 commit comments

Comments
 (0)