mirror of
https://github.com/mudler/LocalAI
synced 2026-05-24 09:28:23 +00:00
The merged feature (#9920) let admins see per-API-key and per-source totals but did not surface which user owned each key, and lumped every user's Web UI traffic into a single global Web UI row. This makes the admin Sources tab properly per-user attributable: - KeyTotal gains UserID + UserName, populated from the snapshot the usage middleware already records. The by_key roll-up now groups by (api_key_id, api_key_name, user_id, user_name). - New SourceTotals.ByUserSource roll-up groups (source, user_id, user_name) for sources without a key identity (web, legacy). Only populated on the admin path (includeLegacy=true); the non-admin endpoint stays unchanged for backwards compatibility. - SourcesTable accepts showUserColumn={isAdmin}; admin view renders a User column, makes the search match user name/id, and expands Web UI / legacy pseudo-rows from the global aggregate to one row per user using by_user_source. Refs: #9862 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io> |
||
|---|---|---|
| .. | ||
| e2e | ||
| public/locales | ||
| scripts | ||
| src | ||
| bun.lock | ||
| eslint.config.js | ||
| i18next-parser.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.js | ||
| vite.config.js | ||