Typed chat: free hosted models -> local model (llama-server), no keyword rules; busy reply + Retry #7
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/local-llm-backup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Typed chat now uses OpenRouter free models → local model on this box → nothing else. The keyword-rules agent is removed from typed chat.
fallback_agent,parse_look_command(+ colour/gradient/section tables), the copy-edit parser and_rules_checkare deleted. If every model fails (or none is configured): "The assistant is busy, please try again in a moment." with a Retry button that resends the same message (agent: "unavailable", no actions, badgeAI: busy).fallback_event, unchanged). The landing view is a deterministic featured-listings panel, and the Sell button opens the empty form.llama-server, run directly (no Ollama serve).ops/local-llm-watchdog.sh:deploy.shmakes sure it's running (--ensure, idempotent).-c 6144 -np 1, q8 KV cache, flash attention,-t 6 -tb 6at nice 10,--poll 0,--cache-ram 1024,--swa-full(so Gemma's prompt cache is reused)./metricscounter). Otherwise it only reads/metricsevery 30 s, so the server idles at 0% CPU.cfg["local"]is a dict on hosted configs). Only the local server skips the key now. Test added.Measured on this box (8 vCPU, no GPU, 16 GB)
Idle: 0% CPU, 2.9 GB RSS (0.6 GB private + 2.4 GB mmapped model file). It was about 10 GB under Ollama.
Answering: about 6 cores at nice 10 for 4–14 s, RSS 3.0 GB.
Warm latency per reply (real chain, typed):
Cold (first turn before priming): 40–60 s.
Other services: stayed responsive during about 10 min of local-model load (294 probes each). Port 8788 had a median of 1.6 ms (max 34 ms). Sigil on 8789 had a median of 1.4 ms (max 11 ms). Gitea had a median of 1.1 ms (max 30 ms); one refused probe came from an unrelated Gitea restart (SIGTERM).
Tests
tests/llm_proxy_check.sh: 25/25. It covers the busy reply for every failure mode, clicks while busy, the no-model server, and that local requests use the grammar and never carry the hosted key.tests/fake_model_browser.sh: 15/15. It covers busy + Retry (resends once, no duplicate bubble), the quota badge and the local badge.test_agent_units13/13 (refs, primer restart detection),test_copy_defaults6/6 (replacestest_copyedit.py),test_themeOK.e2e_httpwithREQUIRE_LLM=1nl_checkbrowser_e2etheme_checkwithREQUIRE_LLM=1