mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 11:20:07 +08:00
fix: 默认模型在模型服务中禁用后显示错误 #266
This commit is contained in:
parent
c856b8d195
commit
5db5190e44
@ -9,7 +9,8 @@ export const getModelUniqId = (m?: Model) => {
|
||||
export const hasModel = (m?: Model) => {
|
||||
const allModels = store
|
||||
.getState()
|
||||
.llm.providers.map((p) => p.models)
|
||||
.llm.providers.filter((p) => p.enabled)
|
||||
.map((p) => p.models)
|
||||
.flat()
|
||||
|
||||
return allModels.find((model) => model.id === m?.id)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user