From 89cdef53d565cb4a7d97ca9cf8bca69df45a0d92 Mon Sep 17 00:00:00 2001 From: Joachim Isaksson Date: Fri, 26 Dec 2025 10:57:05 +0100 Subject: [PATCH] fix: only filter displayed recent models from provider sections Models in positions 6-10 of the recent list were being filtered out from provider sections even though they weren't displayed in the Recent section (which only shows top 5). This caused models like github-copilot/claude-sonnet-4.5 to disappear from the provider sections if they were in the recent list but beyond position 5. Changed the filter to use recentList (displayed models) instead of recents (all models) to fix this issue. --- packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx index fc0559cd686..e50e5f3612c 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx @@ -152,10 +152,11 @@ export function DialogModel(props: { providerID?: string }) { (item) => item.providerID === value.providerID && item.modelID === value.modelID, ) if (inFavorites) return false - const inRecents = recents.some( + // Only filter out displayed recents (top 5), not all 10 in the list + const inRecentList = recentList.some( (item) => item.providerID === value.providerID && item.modelID === value.modelID, ) - if (inRecents) return false + if (inRecentList) return false return true }), sortBy(