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