Commit f2ce225
committed
[ai] endpoint -> Ollama; firstboot retries instead of premature sentinel
Two bugs that left `mios hello` returning 500s on a fresh install:
1. mios.toml [ai].endpoint pointed at LocalAI (:8080/v1) but
[ai].model used Ollama's name:tag format (qwen2.5-coder:7b),
which LocalAI does not understand. LocalAI v2.20.0 also chokes
on aichat's multimodal content-list request shape with:
interface conversion: interface {} is []interface {},
not string
The intended chat surface for `mios <prompt>` was always Ollama
(the dashboard's `AI http://localhost:8080/v1 qwen2.5-coder:7b`
line is the leftover misalignment; that endpoint will route to
Ollama once mios-dashboard reads the new value). LocalAI stays
in the stack for sidecar surfaces (embeddings, image gen,
STT/TTS) -- it just isn't the chat backend.
2. usr/libexec/mios/ollama-firstboot.sh wrote the sentinel
/var/lib/mios/.ollama-firstboot-done even when the ollama
container was unreachable after the 50-second poll. Symptom
2026-05-11: during the operator's install the ollama container
crash-looped on the UID-818 typo (commit 9702d43 fix). firstboot
ran during that crash window, timed out polling for the
container, wrote the sentinel as if it had succeeded, and the
unit's ConditionPathExists=!sentinel permanently blocked any
future retry. Result: zero models pulled, /v1/chat/completions
served by an empty model list, 500s forever.
Exit non-zero on container-unreachable and DO NOT write the
sentinel. systemd's Restart= behavior (and the next boot's
ConditionPathExists check) then retries until the container
actually responds.1 parent 9702d43 commit f2ce225
2 files changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
91 | 99 | | |
92 | 100 | | |
93 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
396 | 406 | | |
397 | 407 | | |
398 | 408 | | |
| |||
0 commit comments