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() }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user