managarten/apps/api/src/modules
Till JS fea3adf5fe feat(llm-aliases): M5 — migrate consumers to MANA_LLM aliases
Final milestone of docs/plans/llm-fallback-aliases.md. Every backend
caller now requests models via the `mana/<class>` alias system instead
of hardcoded `ollama/...` strings. mana-llm resolves aliases through
`services/mana-llm/aliases.yaml` with health-aware fallback (M3) and
emits resolved-model + fallback metrics (M4).

SSOT moved to `packages/shared-ai/src/llm-aliases.ts` so apps/api,
apps/mana/apps/web, and services/mana-ai all import the same
`MANA_LLM` constant via the existing `@mana/shared-ai` workspace
dependency. Three additional sites (memoro-server, mana-events,
mana-research) inline the alias string with a SSOT comment because
they don't pull @mana/shared-ai today.

Migrated 14 sites across 10 files:
- apps/api: writing(LONG_FORM), comic(STRUCTURED), context(FAST_TEXT),
  food(VISION), plants(VISION), research orchestrator (3 tiers
  collapsed to STRUCTURED+FAST_TEXT/LONG_FORM)
- apps/mana/apps/web: voice/parse-task + parse-habit (STRUCTURED)
- services/mana-ai: planner llm-client + tick.ts (REASONING)
- services/mana-events: website-extractor (STRUCTURED, inlined)
- services/mana-research: mana-llm client (FAST_TEXT, inlined)
- apps/memoro/apps/server: ai.ts (FAST_TEXT, inlined)

Legacy env-vars removed: WRITING_MODEL, COMIC_STORYBOARD_MODEL,
VISION_MODEL, MANA_LLM_DEFAULT_MODEL. The chain in aliases.yaml is
now the single tuning surface; SIGHUP reloads it without redeploys.

New `scripts/validate-llm-strings.mjs` regex-scans 2538 files for
hardcoded `<provider>/<model>` strings and fails the build if any
land outside the SSOT or the explicitly-allowed paths (image-gen
modules, model-inspector code, this validator itself, the registry).
Wired into `validate:all` next to the i18n + theme validators.

Verified: `pnpm validate:llm-strings` clean, `pnpm --filter @mana/api
type-check` clean, `pnpm --filter @mana/ai-service type-check`
clean. Web type-check has 2 pre-existing errors in
SettingsSidebar.svelte (i18n MessageFormatter type drift, last
touched in 988c17a67 — unrelated to this work).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 21:26:03 +02:00
..
articles feat(articles): browser-HTML bookmarklet + consent-wall detection + auto-save 2026-04-22 15:29:53 +02:00
calendar feat(api): create unified API server with first 3 modules 2026-04-02 21:12:15 +02:00
chat refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
comic feat(llm-aliases): M5 — migrate consumers to MANA_LLM aliases 2026-04-26 21:26:03 +02:00
contacts refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
context feat(llm-aliases): M5 — migrate consumers to MANA_LLM aliases 2026-04-26 21:26:03 +02:00
food feat(llm-aliases): M5 — migrate consumers to MANA_LLM aliases 2026-04-26 21:26:03 +02:00
guides refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
moodlit feat(api): port remaining 12 modules to unified API server 2026-04-02 21:34:08 +02:00
music refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
news refactor(shared-rss): extract RSS parsing + Readability into one package 2026-04-15 22:30:44 +02:00
news-research feat(news-research): RSS feed discovery, filter, and AI-context export 2026-04-15 22:31:07 +02:00
picture feat(wardrobe,picture): Google Nano Banana as a Try-On option 2026-04-24 16:04:21 +02:00
plants feat(llm-aliases): M5 — migrate consumers to MANA_LLM aliases 2026-04-26 21:26:03 +02:00
presi refactor: rename planta → plants, clean up codebase 2026-04-12 18:59:44 +02:00
profile feat(profile,api): meImages foundation for AI reference generation (M1) 2026-04-23 13:50:53 +02:00
research feat(llm-aliases): M5 — migrate consumers to MANA_LLM aliases 2026-04-26 21:26:03 +02:00
storage docs: update architecture comparison — 5/10 roadmap items done 2026-04-16 15:00:09 +02:00
todo refactor: rename planta → plants, clean up codebase 2026-04-12 18:59:44 +02:00
traces refactor: rename planta → plants, clean up codebase 2026-04-12 18:59:44 +02:00
unlisted feat(augur): unlisted-snapshot publish pipeline 2026-04-25 15:38:09 +02:00
wardrobe feat(wardrobe): module foundation — garments + outfits space-scoped data layer (M1) 2026-04-23 18:27:37 +02:00
website fix(website): publish failed with uuid type error on Better-Auth ids 2026-04-23 21:43:57 +02:00
wetter feat(wetter): add multi-model source comparison view 2026-04-17 13:57:05 +02:00
who feat(who): add character dossier system for staged fact disclosure 2026-04-10 17:40:16 +02:00
writing feat(llm-aliases): M5 — migrate consumers to MANA_LLM aliases 2026-04-26 21:26:03 +02:00