towerops/priv
Graham McIntire e18d877695 feat(insights): persist LLM prompt + completion token counts
Track DeepSeek token spend per enriched insight so cost can be rolled
up by SQL — `SELECT date_trunc('day', llm_enriched_at), organization_id,
SUM(llm_prompt_tokens), SUM(llm_completion_tokens) FROM preseem_insights
GROUP BY 1, 2`.

- Migration adds llm_prompt_tokens + llm_completion_tokens to
  preseem_insights
- DeepSeek client surfaces the API's `usage` block (prompt/completion/
  total tokens) on the success response
- apply_llm_enrichment/4 takes a usage map and persists the two int
  columns
- Worker plumbs the usage from the response through to the context
2026-05-10 11:50:54 -05:00
..
antennas feat: 198 real vendor .msi antenna patterns + Leaflet auto-load 2026-05-06 15:09:29 -05:00
gettext fix: nav overflow on small screens and fix bad gettext translations 2026-03-11 14:00:31 -05:00
mibs mib update from librenms 2026-01-28 13:38:31 -06:00
profiles feat: ePMP firmware extraction + ePMP3000 NetSNMP-quirk detection 2026-05-09 08:34:23 -05:00
proto chore: migrate agent repo references from GitHub to Codeberg 2026-05-07 07:44:48 -05:00
repo feat(insights): persist LLM prompt + completion token counts 2026-05-10 11:50:54 -05:00
static feat(insights): OpticalRxLow rule for fiber transceivers 2026-05-09 17:56:38 -05:00