Skip to content

Commit c7b825a

Browse files
authored
fix(app): show custom models without valid release_date in web UI mod… (anomalyco#7349)
1 parent b1a613b commit c7b825a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/app/src/context/local.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,13 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
276276
visible(model: ModelKey) {
277277
const key = `${model.providerID}:${model.modelID}`
278278
const visibility = userVisibilityMap().get(key)
279-
return visibility !== "hide" && (latestSet().has(key) || visibility === "show")
279+
if (visibility === "hide") return false
280+
if (visibility === "show") return true
281+
if (latestSet().has(key)) return true
282+
// For models without valid release_date (e.g. custom models), show by default
283+
const m = find(model)
284+
if (!m?.release_date || !DateTime.fromISO(m.release_date).isValid) return true
285+
return false
280286
},
281287
setVisibility(model: ModelKey, visible: boolean) {
282288
updateVisibility(model, visible ? "show" : "hide")

0 commit comments

Comments
 (0)