fix(config): 移除 gateway.auth.scopes,修复保存后 gateway 起不来
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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() }
|
||||
};
|
||||
|
||||
@@ -164,7 +164,7 @@ input:focus { border-color: #ff6b35; }
|
||||
<p class="desc">最省心:用「虾盘云」一个 Key 调用国内外全部大模型(中转站)。也可用下面各家自己的官方 Key。</p>
|
||||
|
||||
<div class="model-grid">
|
||||
<div class="model-card" data-provider="uclaw-cloud" data-base="https://api.u-claw.org/v1" data-model="deepseek-v4-flash">
|
||||
<div class="model-card" data-provider="uclaw-cloud" data-base="https://api.u-claw.org/v1" data-model="deepseek-v4-pro">
|
||||
<span class="check">✓</span>
|
||||
<h4>虾盘云 <span class="tag hot">首选</span><span class="tag">中转站</span></h4>
|
||||
<p>一个 Key 用 DeepSeek / Claude / GPT / 通义 等国内外全部大模型,无需翻墙</p>
|
||||
@@ -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() }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user