mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-30 18:14:32 -04:00
fix(middleware): show the recorded status for admission rejections
The admission audit row now records 429, but the Middleware page still printed a hard-coded 503. Read the status from the event, and update the two package comments that still said 503. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-opus-5-5 [Claude Code]
This commit is contained in:
1 parent
3c75e00839
commit
e435000d22
3 files changed
+4
-3
No files matched your search
@@ -931,7 +931,8 @@ function eventDetails(e) {
|
||||
}
|
||||
case 'admission': {
|
||||
const retry = e.duration_ms != null ? `retry-after ${Math.round(e.duration_ms / 1000)}s` : ''
|
||||
return `HTTP 503 rejected · ${retry}`
|
||||
// Older audit rows were recorded as 503; newer ones as 429.
|
||||
return `HTTP ${e.status_code || 429} rejected · ${retry}`
|
||||
}
|
||||
default: {
|
||||
const len = e.length != null ? `len ${e.length}` : ''
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Package admission is routing-module subsystem 5: per-model
|
||||
// concurrency control + audit. The middleware acquires a slot
|
||||
// before the handler runs; on full, the request gets 503 with
|
||||
// before the handler runs; on full, the request gets 429 with
|
||||
// Retry-After so clients back off rather than pile on. The audit
|
||||
// row goes into the shared event store alongside PII and proxy
|
||||
// rows so admins see a single timeline of routing pressure.
|
||||
|
||||
@@ -109,7 +109,7 @@ const (
|
||||
// model's MaxConcurrent ceiling is full. The Host field carries
|
||||
// the model name (overloading the existing column rather than
|
||||
// adding a new one — admins read it as "the thing that was
|
||||
// busy"); StatusCode is 503.
|
||||
// busy"); StatusCode is 429.
|
||||
KindAdmission EventKind = "admission"
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user