配置文件是 ~/.openclaw/openclaw.json

使得普通用户可以打开web UI 要先运行 openclaw gateway 启动, 然后再openclaw dashboard!!

  "gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "loopback",
    "controlUi": {
      "allowedOrigins": [
        "http://127.0.0.1:18789",
        "http://localhost:18789"
      ],
      "allowInsecureAuth": true,
      "dangerouslyDisableDeviceAuth": true
    },
    "auth": {
      "mode": "token",
      "token": "08a6f176d1e90fad91dc62b9085b12219ffc7ce23042628e"
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    }
  }

按照千锤百炼的文档进行配置,只会使用没有免费额度的,测试会产生费用的模型,因此要修改。

可以借助chatgpt,提供免费额度的模型的表格,以及配置文档内容,让AI来生成要替换的部分的内容,报错也丢给chatgpt来修改。 3-5轮后测试成功了。

下图是Web 图形化的配置位置

配置是否成功,可以通过 Agents 来看,检查主要的和默认的模型是否是具有免费额度的那个

测试一下。

这里让AI写了一篇散文诗,然后存储到当前用户的 Documents/ 文件夹内,保存为 .docx 格式。 结果AI 执行了8个操作,也就是8次调用, 共消耗17W 的Tokens !!!。 所以尽管百万额度很多,但仅供测试

配置成功并能使用免费额度的配置文件:

{
  "meta": {
    "lastTouchedVersion": "2026.3.2",
    "lastTouchedAt": "2026-03-04T15:13:36.805Z"
  },
  "wizard": {
    "lastRunAt": "2026-03-04T15:13:36.780Z",
    "lastRunVersion": "2026.3.2",
    "lastRunCommand": "configure",
    "lastRunMode": "local"
  },
    "models": {
    "mode": "merge",
    "providers": {
      "bailian": {
        "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
        "apiKey": "sk-8g73b6b1kkxxyyzzdapipi73d02cb22a352",
        "api": "openai-completions",
        "models": [
          {
            "id": "qwen3.5-flash",
            "name": "qwen3.5-flash",
            "reasoning": false,
            "input": ["text"],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 131072,
            "maxTokens": 8192
          },
          {
            "id": "qwen3.5-flash-2026-02-23",
            "name": "qwen3.5-flash-stable",
            "reasoning": false,
            "input": ["text"],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 131072,
            "maxTokens": 8192
          },
          {
            "id": "qwen3.5-plus",
            "name": "qwen3.5-plus",
            "reasoning": false,
            "input": ["text"],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 131072,
            "maxTokens": 16384
          },
          {
            "id": "qwen3.5-plus-2026-02-15",
            "name": "qwen3.5-plus-stable",
            "reasoning": false,
            "input": ["text"],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 131072,
            "maxTokens": 16384
          },
          {
            "id": "qwen3.5-27b",
            "name": "qwen3.5-27b",
            "reasoning": false,
            "input": ["text"],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 131072,
            "maxTokens": 16384
          }
        ]
      }
    }
  },

  "agents": {
    "defaults": {
      "model": {
        "primary": "bailian/qwen3.5-flash"
      },
      "models": {
        "bailian/qwen3.5-flash": {
          "alias": "flash-fast"
        },
        "bailian/qwen3.5-flash-2026-02-23": {
          "alias": "flash-stable"
        },
        "bailian/qwen3.5-plus": {
          "alias": "plus-quality"
        },
        "bailian/qwen3.5-plus-2026-02-15": {
          "alias": "plus-stable"
        },
        "bailian/qwen3.5-27b": {
          "alias": "lrge-model"
        }
      },
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    }
  },
  "tools": {
    "web": {
      "search": {
        "enabled": false
      },
      "fetch": {
        "enabled": true
      }
    }
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto",
    "restart": true,
    "ownerDisplay": "raw"
  },
  "gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "loopback",
    "controlUi": {
      "allowedOrigins": [
        "http://127.0.0.1:18789",
        "http://localhost:18789"
      ],
      "allowInsecureAuth": true,
      "dangerouslyDisableDeviceAuth": true
    },
    "auth": {
      "mode": "token",      
      "token": "120ae85ae6571feae17c65192927e739286ae1cdd68f0af9"
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    }
  }
}

经过测试,让AI写了一篇散文诗,耗费了大量token 免费额度, 确认免费额度是token的额度

Logo

小龙虾开发者社区是 CSDN 旗下专注 OpenClaw 生态的官方阵地,聚焦技能开发、插件实践与部署教程,为开发者提供可直接落地的方案、工具与交流平台,助力高效构建与落地 AI 应用

更多推荐