fix(app): show custom models without valid release_date in web UI mod… #7349
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
Fix custom models not appearing in the web UI model selector.
Problem
Users who configure custom models (e.g., DeepSeek, OpenRouter, Aliyun) in their
opencode.jsoncan see and use all models in the TUI, but only a subset appears in the web UI. This inconsistency creates confusion and limits the web UI's usefulness.Root Cause
The web UI model visibility logic filters models based on whether they belong to a "latest" set, which relies on
release_datemetadata. Custom models typically don't have a validrelease_date, causing them to be filtered out by default.Solution
Update the
visible()function inpackages/app/src/context/local.tsxto show models without a validrelease_dateby default. This ensures custom models are visible in the web UI while preserving the existing behavior for official models with proper metadata.Before: Models without
release_date→ hidden by defaultAfter: Models without
release_date→ shown by defaultTesting
release_datemaintain their existing visibility behaviorshow/hide) still take precedenceFixes #6798