Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
refactor(local-llm): drop the unused GET /api/local-llm/models route
Adam Eivy98d0921c8595
diff --git a/PLAN.md b/PLAN.mdindex 287ab8f3d1..539224f2af 100644--- a/PLAN.md+++ b/PLAN.md@@ -8,7 +8,6 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changel## Next Up-- [ ] [prune-unused-local-llm-models-route] **Decide the fate of `GET /api/local-llm/models`.** `server/routes/localLlm.js` exposes a per-backend installed-model list, but nothing consumes it: the UI reads installed models from `/status`, and the `/simplify` pass removed the only client wrapper (`getLocalLlmModels`). It's a coherent REST surface (cheap to keep) but currently dead and untested. Either delete the route (~6 lines, never shipped so safe) or add a thin test if it's meant to stay a public endpoint. Flagged during the `[local-llm-backend-management]` simplify pass as a judgment call, not auto-removed since dropping an HTTP endpoint is an API-design decision.- [ ] [extract-shared-env-file-helper] **Extract a shared `.env` parse/set-key helper.** `parseEnvFile()` + single-key upsert logic is now duplicated three ways: `scripts/setup-db.js` (`setPgMode`), `scripts/setup-llm.js` (`parseEnvFile`/`setBackend`), and `server/services/localLlm.js` (`readEnv`/`writeBackend`). Deferred from the `[local-llm-backend-management]` simplify pass because the two setup scripts are intentionally dependency-light/standalone (run before/around `npm install`) and shouldn't import from `server/lib`. Cleanest fix: a tiny `scripts/lib/envFile.js` shared only between the setup scripts (parse + `upsertEnvKey(path, key, value)`); leave `localLlm.js`'s copy or have it import the same helper if the script→server boundary is acceptable. ~15 lines each.- [ ] [migrate-taskitem-formatattachmentsize-to-formatbytes] **Migrate `TaskItem.jsx`'s local `formatAttachmentSize` to shared `formatBytes`.** `client/src/components/cos/tabs/TaskItem.jsx` still defines a local `formatAttachmentSize(bytes)` (B/KB/MB with `.toFixed(1)`) that duplicates `formatBytes` in `client/src/utils/formatters.js`. Surfaced by gemini review during the `[migrate-two-remaining-local-formatters]` claim 2026-05-24; deferred as out-of-scope for that item (which named only `formatDateTime` + `formatDurationMin`). Note the edge-case semantics differ: the local helper returns `''` for falsy/0 size (used inside an attachment `title` like `(1.5 KB)`), while `formatBytes(0)` returns `'0 B'` — preserve the empty-on-missing behavior with a guard (`att.size ? formatBytes(att.size) : ''`) so the title doesn't render `(0 B)` for sizeless attachments.diff --git a/server/routes/localLlm.js b/server/routes/localLlm.jsindex 8b46aa7031..2c5a5d5f9a 100644--- a/server/routes/localLlm.js+++ b/server/routes/localLlm.js@@ -34,13 +34,6 @@ router.get('/status', asyncHandler(async (req, res) => {res.json(await getStatus())}))-// GET /api/local-llm/models?backend=ollama — installed models for a backend-router.get('/models', asyncHandler(async (req, res) => {- const { backend } = req.query- if (!isBackend(backend)) return res.status(400).json({ error: 'backend must be "ollama" or "lmstudio"' })- res.json({ backend, models: await listModels(backend) })-}))-// GET /api/local-llm/catalog?backend=ollama&q=llama — curated install pickerrouter.get('/catalog', asyncHandler(async (req, res) => {const { backend, q } = req.query