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:54 +08:00
parent 428e3d91f2
commit aa56667b8f
20 changed files with 112 additions and 32 deletions
+4 -3
View File
@@ -1817,6 +1817,7 @@
"Generation quality preset": "生成质量预设",
"Generic cache": "通用缓存",
"Get notified when balance falls below this value": "当余额低于此值时接收通知",
"Get one here": "点此获取",
"Get started": "开始使用",
"Get Started": "开始使用",
"GitHub": "GitHub",
@@ -2059,7 +2060,6 @@
"IP Filter Mode": "IP 过滤模式",
"IP Restriction": "IP 限制",
"IP Whitelist (supports CIDR)": "IP 白名单(支持 CIDR 表达式)",
"Power AI applications, manage digital assets, connect the Future": "承载 AI 应用,管理数字资产,连接未来",
"is less than the configured maximum cache size": "小于配置的最大缓存大小",
"is the default price; ": "为默认价格;",
"It seems like the page you're looking for": "您要查找的页面似乎",
@@ -2946,6 +2946,7 @@
"PostgreSQL detected": "检测到 PostgreSQL",
"PostgreSQL offers advanced reliability and data integrity for production workloads.": "PostgreSQL 为生产工作负载提供高级可靠性和数据完整性。",
"PostgreSQL offers strong reliability guarantees. Double check your maintenance window and retention policies before going live.": "PostgreSQL 提供强大的可靠性保证。在上线之前,请仔细检查您的维护窗口和保留策略。",
"Power AI applications, manage digital assets, connect the Future": "承载 AI 应用,管理数字资产,连接未来",
"Powerful API Management Platform": "强大的 API 管理平台",
"Pre-Consume for Free Models": "免费模型预消耗",
"Pre-consumed": "预扣费",
@@ -3073,8 +3074,6 @@
"Pull": "拉取",
"Pull model": "拉取模型",
"Pulling...": "拉取中...",
"Subscribe to a plan for model access": "订阅套餐以获取模型访问权限",
"Get one here": "点此获取",
"Purchase Limit": "限购",
"Purchase limit reached": "已达到购买上限",
"Purchase Subscription": "购买订阅套餐",
@@ -3702,6 +3701,7 @@
"Submitting...": "提交中...",
"Submodel": "Submodel",
"Subscribe Now": "立即订阅",
"Subscribe to a plan for model access": "订阅套餐以获取模型访问权限",
"Subscription": "订阅",
"Subscription Billing": "订阅计费",
"Subscription First": "优先订阅",
@@ -4140,6 +4140,7 @@
"Upstream price sync": "上游价格同步",
"Upstream prices fetched successfully": "已成功获取上游价格",
"Upstream ratios fetched successfully": "上游比率获取成功",
"Upstream Request ID": "上游请求 ID",
"Upstream Response": "上游返回",
"upstream services integrated": "上游服务适配",
"Upstream Updates": "上游更新",