feat: track upstream request ID and prevent response header override

When proxying through another new-api instance, the upstream
X-Oneapi-Request-Id was overwriting the local one in client responses.
This adds a new `upstream_request_id` field to the logs table, captures
the upstream ID during relay, and filters it from being copied back to
the client. Frontend gains search/filter and detail display support.
This commit is contained in:
CaIon
2026-05-12 21:53:37 +08:00
parent 428e3d91f2
commit aa56667b8f
20 changed files with 112 additions and 32 deletions
+2 -1
View File
@@ -179,7 +179,8 @@ var GeminiSafetySetting string
var CohereSafetySetting string
const (
RequestIdKey = "X-Oneapi-Request-Id"
RequestIdKey = "X-Oneapi-Request-Id"
UpstreamRequestIdKey = "X-Upstream-Request-Id"
)
const (