fix(ai-chat): clearing ollama url results in a 500 error

This commit is contained in:
Henry Estela 2026-03-12 14:07:35 -07:00
parent 9f58280a8e
commit ac87cfce59
No known key found for this signature in database
GPG Key ID: 90439853E9E235BA

View File

@ -56,7 +56,7 @@ export default class SettingsController {
async models({ inertia }: HttpContext) {
const availableModels = await this.ollamaService.getAvailableModels({ sort: 'pulls', recommendedOnly: false, query: null, limit: 15 });
const installedModels = await this.ollamaService.getModels();
const installedModels = await this.ollamaService.getModels().catch(() => [])
const chatSuggestionsEnabled = await KVStore.getValue('chat.suggestionsEnabled')
const aiAssistantCustomName = await KVStore.getValue('ai.assistantCustomName')
const remoteOllamaUrl = await KVStore.getValue('ai.remoteOllamaUrl')