leubeem 1d09a9fc2f feat(pm): LLM routing endpoint, usage capture, and admin review view
Backend counterpart to the Python engine's semantic router.

- POST /api/decision/route: service-secret-guarded endpoint the Python
  backend calls on regex-miss. Calls gpt-5-mini (ROUTER_LLM_MODEL),
  validates the chosen id against the candidate set, and writes both a
  UsageEvent (central cost ledger) and a routing-review record — including
  timeouts, with timeoutMs + actual latencyMs — so the budget can be tuned
- LlmRoutingDecision model + GET /api/admin/llm-routing (paginated,
  status-filtered, per-status counts)
- admin "LLM Routing" tab: transcript vs expected phrase, candidate chips
  with the chosen one highlighted, latency/budget chip, model reason
- serviceAuth util (mirrors CRON_SECRET pattern)
- .env.example: ROUTER_LLM_MODEL, SERVICE_SECRET

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 10:27:57 +02:00
2026-02-17 18:19:55 +01:00
2025-09-19 16:42:20 +02:00
2026-02-13 14:18:29 +01:00
2025-09-20 22:48:04 +02:00
2025-10-18 14:03:14 +02:00
2026-05-28 21:04:09 +02:00
2025-09-14 21:09:47 +02:00
Description
No description provided
AGPL-3.0 53 MiB
Languages
TypeScript 67.3%
Vue 31.8%
CSS 0.6%
JavaScript 0.3%