core: improve dependency management and error handling for more reliable builds

This commit is contained in:
Dax Raad
2025-10-14 01:33:25 -04:00
parent b03301a967
commit 87ff866318
6 changed files with 15 additions and 14 deletions
+4 -4
View File
@@ -526,11 +526,11 @@ export namespace Provider {
model_id: string
}[]
}
const models = state?.recently_used_models ?? []
if (models.length > 0) {
const [model] = state?.recently_used_models ?? []
if (model) {
return {
providerID: models[0].provider_id,
modelID: models[0].model_id,
providerID: model.provider_id,
modelID: model.model_id,
}
}
})