fix: ensure variants also work for completely custom models (#6481)

Co-authored-by: Daniel Smolsky <dannysmo@gmail.com>
This commit is contained in:
Aiden Cline
2025-12-30 14:37:32 -08:00
committed by GitHub
parent 3fe5d91372
commit 81fef60266
10 changed files with 955 additions and 27 deletions

View File

@@ -319,9 +319,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
const provider = sync.data.provider.find((x) => x.id === m.providerID)
const info = provider?.models[m.modelID]
if (!info?.variants) return []
return Object.entries(info.variants)
.filter(([_, v]) => !v.disabled)
.map(([name]) => name)
return Object.keys(info.variants)
},
set(value: string | undefined) {
const m = currentModel()