From 2ce17eda60ec4a01683e5b49f186f398900a1891 Mon Sep 17 00:00:00 2001
From: JK <2081217232@qq.com>
Date: Mon, 5 Oct 2026 17:26:47 +0800
Subject: [PATCH] =?UTF-8?q?fix(admin):=20=E8=AE=BE=E7=BD=AE=E9=A1=B5?=
=?UTF-8?q?=E5=8D=A1=E7=89=87=E6=B0=B4=E5=B9=B3=E5=B1=85=E4=B8=AD=E5=B9=B6?=
=?UTF-8?q?=E6=94=B9=E5=85=A8=E5=AE=BD=EF=BC=9B=E4=BD=BF=E7=94=A8=E8=AF=B4?=
=?UTF-8?q?=E6=98=8E=E8=A1=A5=20OpenAI=20=E5=8F=8C=E5=8D=8F=E8=AE=AE?=
=?UTF-8?q?=E7=AB=AF=E7=82=B9=EF=BC=9B.gitignore=20=E8=A1=A5=20.zcode/?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 3 +++
frontend/admin/settings.html | 11 ++++++++---
frontend/css/app.css | 3 ++-
frontend/version | 2 +-
4 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0d237a6..68f15e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,6 @@ node_modules/
# 秘钥 / 凭证导出
*accounts*.json
zcode-accounts*.json
+
+# 工具会话产物(ZCode 等,永不入库)
+.zcode/
diff --git a/frontend/admin/settings.html b/frontend/admin/settings.html
index 8c26ad5..584f91d 100644
--- a/frontend/admin/settings.html
+++ b/frontend/admin/settings.html
@@ -28,7 +28,7 @@
-
设置后,调用 /v1/messages 须携带 Authorization: Bearer <key> 或 x-api-key。清空并保存可关闭校验(生产必须配置)。输入框显示掩码,未改动保存不会覆盖原值。
+
设置后,调用 /v1/messages 或 /v1/chat/completions 须携带 Authorization: Bearer <key> 或 x-api-key。清空并保存可关闭校验(生产必须配置)。输入框显示掩码,未改动保存不会覆盖原值。
@@ -57,7 +57,9 @@
· 在「账号池」粘贴 Coding Plan JWT 或 API Key 即可加入轮询。
· 请求按 round-robin 分发;某账号额度用完会自动切到下一个账号。
· 账号额度、状态在「账号池」页实时刷新展示。
- · 对话端点:/v1/messages(兼容 Anthropic Messages 协议)。
+ · 对话端点(Anthropic 协议):/v1/messages
+ · 对话端点(OpenAI 协议):/v1/chat/completions
+ · 模型列表:/v1/models
@@ -70,7 +72,10 @@
await renderAdminHeader();
const key=await adminKey.get();
if(!key||!await verifyKey(ADMIN_API+'/verify',key).catch(()=>false))return location.href='/admin/login';
- document.getElementById('endpoint').textContent=location.origin+'/v1/messages';
+ const o=location.origin;
+ document.getElementById('endpoint-anthropic').textContent=o+'/v1/messages';
+ document.getElementById('endpoint-openai').textContent=o+'/v1/chat/completions';
+ document.getElementById('endpoint-models').textContent=o+'/v1/models';
load();
})();
diff --git a/frontend/css/app.css b/frontend/css/app.css
index 6e6d14a..d1ef7a9 100644
--- a/frontend/css/app.css
+++ b/frontend/css/app.css
@@ -243,7 +243,8 @@ select.input option{background:var(--panel);color:var(--ink)}
.dialog-btn-danger:hover{background:rgba(224,82,82,.2)}
/* Settings card */
-.settings-card{background:var(--panel);border:1px solid var(--hairline-soft);border-radius:14px;padding:22px;margin-bottom:16px;max-width:640px}
+/* Settings card:与 admin-main 同宽(设置页表单/说明需要整行宽度,窄卡已弃用) */
+.settings-card{background:var(--panel);border:1px solid var(--hairline-soft);border-radius:14px;padding:22px;margin:0 auto 16px}
.settings-row{display:grid;gap:6px;margin-bottom:18px}
.settings-row:last-child{margin-bottom:0}
.settings-row label{font-size:13px;font-weight:600}
diff --git a/frontend/version b/frontend/version
index bd4053b..a04abec 100644
--- a/frontend/version
+++ b/frontend/version
@@ -1 +1 @@
-2.6.3
\ No newline at end of file
+2.6.10