From 8981c21262f13bd2fdf62329d1457eb37ae40e65 Mon Sep 17 00:00:00 2001 From: hfshfg <38004547@qq.com> Date: Sat, 20 Jun 2026 15:51:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(config):=20=E7=A7=BB=E9=99=A4=20gateway.aut?= =?UTF-8?q?h.scopes,=E4=BF=AE=E5=A4=8D=E4=BF=9D=E5=AD=98=E5=90=8E=20gatewa?= =?UTF-8?q?y=20=E8=B5=B7=E4=B8=8D=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Config.html 生成的 openclaw.json 里 gateway.auth 带 scopes:['operator.admin'], 被 OpenClaw 2026.6.x 的 strict schema 拒绝(gateway.auth: Invalid input), 导致用户选完模型保存后 gateway 启动失败。三个 Config 页统一为 { mode:'local', auth:{ mode:'token', token:'uclaw' }, remote:{ token:'uclaw' } }, 与服务页 public/index.html 及启动脚本默认配置对齐。 实测:虾盘云 Key + deepseek-v4-pro 直连 api.u-claw.org/v1 返回 200; 去 scopes 后 gateway 正常启动并加载 uclaw-cloud provider。 Co-Authored-By: Claude Opus 4.8 (1M context) --- portable/Config.html | 2 +- u-claw-app/resources/Config.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/portable/Config.html b/portable/Config.html index fcb4a20..02d6d98 100644 --- a/portable/Config.html +++ b/portable/Config.html @@ -498,7 +498,7 @@ function togglePw() { function buildOpenClawConfig(provider, base, model, apiKey) { // Base config that OpenClaw expects const baseConfig = { - gateway: { auth: { mode: 'token', token: 'uclaw', scopes: ['operator.admin'] }, remote: { token: 'uclaw' } }, + gateway: { mode: 'local', auth: { mode: 'token', token: 'uclaw' }, remote: { token: 'uclaw' } }, commands: { native: 'auto', nativeSkills: 'auto', restart: true, ownerDisplay: 'raw' }, meta: { lastTouchedVersion: '2026.3.13', lastTouchedAt: new Date().toISOString() } }; diff --git a/u-claw-app/resources/Config.html b/u-claw-app/resources/Config.html index 8b0e846..1b44e7d 100644 --- a/u-claw-app/resources/Config.html +++ b/u-claw-app/resources/Config.html @@ -164,7 +164,7 @@ input:focus { border-color: #ff6b35; }

最省心:用「虾盘云」一个 Key 调用国内外全部大模型(中转站)。也可用下面各家自己的官方 Key。

-
+

虾盘云 首选中转站

一个 Key 用 DeepSeek / Claude / GPT / 通义 等国内外全部大模型,无需翻墙

@@ -471,7 +471,7 @@ function togglePw() { function buildOpenClawConfig(provider, base, model, apiKey) { // Base config that OpenClaw expects const baseConfig = { - gateway: { auth: { mode: 'token', token: 'uclaw', scopes: ['operator.admin'] } }, + gateway: { auth: { mode: 'token', token: 'uclaw' }, remote: { token: 'uclaw' } }, commands: { native: 'auto', nativeSkills: 'auto', restart: true, ownerDisplay: 'raw' }, meta: { lastTouchedVersion: '2026.3.13', lastTouchedAt: new Date().toISOString() } };