fix: failed provider models list due to broken cortex import (#5983)

This commit is contained in:
Louis 2025-07-30 17:37:44 +07:00 committed by GitHub
parent 0aaaca05a4
commit 7a3d9d765c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -866,6 +866,7 @@ export default class llamacpp_extension extends AIEngine {
const files = await fs.readdirSync(currentDir)
for (const child of files) {
try {
const childPath = await joinPath([currentDir, child])
const stat = await fs.fileStat(childPath)
if (
@ -926,6 +927,9 @@ export default class llamacpp_extension extends AIEngine {
continue
}
}
} catch (error) {
console.error(`Error migrating model ${child}:`, error)
}
}
// otherwise, look into subdirectories
@ -1093,9 +1097,7 @@ export default class llamacpp_extension extends AIEngine {
attempts++
}
throw new Error(
'Failed to find an available port for the model to load'
)
throw new Error('Failed to find an available port for the model to load')
}
private async sleep(ms: number): Promise<void> {