+ {enabled
+ ? t(
+ 'Enabling stores the full request and response of every call ensure this complies with your customer agreements'
+ )
+ : t(
+ 'Off by default the platform stores only billing metadata never your prompts or responses'
+ )}
+
+
+
+ )
+}
diff --git a/web/src/features/payload-logs/types.ts b/web/src/features/payload-logs/types.ts
new file mode 100644
index 000000000000..f7a60ed3ac63
--- /dev/null
+++ b/web/src/features/payload-logs/types.ts
@@ -0,0 +1,58 @@
+/*
+Copyright (C) 2023-2026 QuantumNous
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see .
+
+For commercial licensing, please contact support@quantumnous.com
+*/
+export interface PayloadLogItem {
+ id: number
+ created_at: number
+ user_id: number
+ username: string
+ token_name: string
+ model_name: string
+ channel_id: number
+ request_id: string
+ ip: string
+ status_code: number
+ duration_ms: number
+}
+
+export interface PayloadLogDetail extends PayloadLogItem {
+ request_body: string
+ response_body: string
+}
+
+export interface PayloadLogListData {
+ items: PayloadLogItem[]
+ total: number
+ page: number
+ page_size: number
+}
+
+export interface SwitchAudit {
+ id: number
+ created_at: number
+ user_id: number
+ username: string
+ enabled: boolean
+}
+
+export interface SwitchAuditListData {
+ items: SwitchAudit[]
+ total: number
+ page: number
+ page_size: number
+}
diff --git a/web/src/hooks/use-sidebar-data.ts b/web/src/hooks/use-sidebar-data.ts
index 40a0615aa347..ad65f24208c4 100644
--- a/web/src/hooks/use-sidebar-data.ts
+++ b/web/src/hooks/use-sidebar-data.ts
@@ -27,6 +27,7 @@ import {
ListTodo,
MessageSquare,
Radio,
+ ScrollText,
ServerCog,
Settings,
Ticket,
@@ -97,6 +98,11 @@ export function useSidebarData(): SidebarData {
configUrls: ['/usage-logs/drawing', '/usage-logs/task'],
icon: ListTodo,
},
+ {
+ title: t('Payload Logs'),
+ url: '/payload-logs',
+ icon: ScrollText,
+ },
],
},
{
diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json
index 86095b29c1b3..0873dc55dbc5 100644
--- a/web/src/i18n/locales/en.json
+++ b/web/src/i18n/locales/en.json
@@ -1,5 +1,23 @@
{
"translation": {
+ "On": "On",
+ "Off": "Off",
+ "Turned on": "Turned on",
+ "Turned off": "Turned off",
+ "Switch change history": "Switch change history",
+ "Only root can change this switch": "Only administrators can change this switch",
+ "My calls": "My calls",
+ "All calls": "All calls",
+ "No changes yet": "No changes yet",
+ "Payload Logs": "Payload Logs",
+ "Business payload logging": "Business payload logging",
+ "Off by default the platform stores only billing metadata never your prompts or responses": "Off by default — the platform stores only billing metadata, never your prompts or model responses.",
+ "Enabling stores the full request and response of every call ensure this complies with your customer agreements": "When enabled, the platform stores the full request and response of every call. Make sure this complies with your customer agreements.",
+ "No payload logs yet": "No payload logs yet",
+ "View detail": "View detail",
+ "Call detail": "Call detail",
+ "Request body": "Request body",
+ "Response body": "Response body",
"360": "360",
"1000": "1000",
"10000": "10000",
diff --git a/web/src/i18n/locales/zh.json b/web/src/i18n/locales/zh.json
index 457b1c53f2b0..c4b1b494c796 100644
--- a/web/src/i18n/locales/zh.json
+++ b/web/src/i18n/locales/zh.json
@@ -1,5 +1,23 @@
{
"translation": {
+ "On": "开启",
+ "Off": "关闭",
+ "Turned on": "已开启",
+ "Turned off": "已关闭",
+ "Switch change history": "开关变更记录",
+ "Only root can change this switch": "仅管理员可更改此开关",
+ "My calls": "我的调用",
+ "All calls": "全部调用",
+ "No changes yet": "暂无变更记录",
+ "Payload Logs": "业务报文日志",
+ "Business payload logging": "业务报文日志开关",
+ "Off by default the platform stores only billing metadata never your prompts or responses": "默认关闭——平台仅保留计费元数据,绝不存储你的 prompt 或模型响应正文。",
+ "Enabling stores the full request and response of every call ensure this complies with your customer agreements": "开启后,平台将存储每次调用的完整请求与响应报文。请确保符合与客户的约定与合规要求。",
+ "No payload logs yet": "暂无业务报文日志",
+ "View detail": "查看详情",
+ "Call detail": "调用详情",
+ "Request body": "请求报文",
+ "Response body": "响应报文",
"360": "360",
"1000": "1000",
"10000": "10000",
diff --git a/web/src/routes/_authenticated/payload-logs/index.tsx b/web/src/routes/_authenticated/payload-logs/index.tsx
new file mode 100644
index 000000000000..1a4c407ebc0a
--- /dev/null
+++ b/web/src/routes/_authenticated/payload-logs/index.tsx
@@ -0,0 +1,28 @@
+/*
+Copyright (C) 2023-2026 QuantumNous
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see .
+
+For commercial licensing, please contact support@quantumnous.com
+*/
+import { createFileRoute } from '@tanstack/react-router'
+
+import { PayloadLogs } from '@/features/payload-logs'
+
+// Visible to any authenticated user: regular users see only their own calls and
+// a read-only switch; root can toggle it and see all calls. Row-level scoping is
+// enforced server-side.
+export const Route = createFileRoute('/_authenticated/payload-logs/')({
+ component: PayloadLogs,
+})