Commit 592c62b
committed
feat(frontend): UI for affinity_mode + per-key limits
Settings page (#150 backend):
- New "Session affinity" select with bounded / off / strict options.
Defaults to bounded; loaded from /api/admin/settings.
API Keys page (#146 backend):
- New collapsible "Advanced limits" section in both create and edit
modals, auto-expanded when any limit is configured.
- Model allowlist/denylist via ChipInput, sourced from current
/api/admin/models so users can pick existing model IDs but also
type custom ones.
- Six numeric fields: rpm, rpd, cost_limit_5h/7d, token_limit_5h/7d
with appropriate suffix labels ($, tk, /min, /day) and step.
- limitsFromAPIKey / limitsFormToPayload bridge between
APIKeyLimits (snake_case backend type) and the form state.
- types.ts: APIKeyLimits + APIKeyRow.limits.
Verified end-to-end against 2004 instance.1 parent a425911 commit 592c62b
5 files changed
Lines changed: 339 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
1001 | 1006 | | |
1002 | 1007 | | |
1003 | 1008 | | |
| |||
1250 | 1255 | | |
1251 | 1256 | | |
1252 | 1257 | | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
1253 | 1279 | | |
1254 | 1280 | | |
1255 | 1281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
1001 | 1006 | | |
1002 | 1007 | | |
1003 | 1008 | | |
| |||
1250 | 1255 | | |
1251 | 1256 | | |
1252 | 1257 | | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
1253 | 1279 | | |
1254 | 1280 | | |
1255 | 1281 | | |
| |||
0 commit comments