← 返回
未分类

OpenClaw Model Optimizer

Optimize OpenClaw model configuration by declaring missing model capabilities (vision/multimodal input, context window, max output tokens, reasoning). Use wh...
通过声明缺失的模型能力(视觉/多模态输入、上下文窗口、最大输出token、推理)来优化OpenClaw模型配置。使用...
yay2008 yay2008 来源
未分类 clawhub v1.1.0 1 版本 99780.7 Key: 无需
★ 1
Stars
📥 435
下载
💾 1
安装
1
版本
#latest

概述

OpenClaw Model Optimizer

Optimize openclaw.json model configurations by declaring model capabilities that OpenClaw cannot auto-detect.

Problem

OpenClaw does not auto-detect model capabilities from providers. Without explicit declarations, features like vision input, large context windows, extended output, and reasoning mode remain disabled — even when the underlying model and API fully support them.

Workflow

  1. Read ~/.openclaw/openclaw.json
  2. Back up the config — copy ~/.openclaw/openclaw.json to ~/.openclaw/openclaw.json.bak before making any changes
  3. Identify all configured models under models.providers
  4. Check if agents.defaults.models exists with capability declarations for each model
  5. For missing or incomplete declarations, ask the user to confirm each model's capabilities
  6. Add the agents.defaults.models block with proper declarations
  7. Remind user to restart OpenClaw for changes to take effect

Capability Fields

Declare capabilities in agents.defaults.models using the provider-id/model-id key format:

{
  "agents": {
    "defaults": {
      "models": {
        "provider-id/model-id": {
          "input": ["text", "image"],
          "contextWindow": 256000,
          "maxTokens": 16384,
          "reasoning": true
        }
      }
    }
  }
}

Field Reference

FieldTypeDescription
--------------------------
inputstring[]Supported input modalities: "text", "image". Default if omitted: ["text"] only — vision disabled
contextWindownumberMax input context in tokens. Default if omitted: conservative fallback — may truncate long conversations
maxTokensnumberMax output tokens per response. Default if omitted: conservative fallback — long responses get cut off
reasoningbooleanWhether model supports extended thinking/CoT. Default if omitted: false

Common Model Capabilities

Reference for popular models (always verify with user before applying):

See references/model-capabilities.md for known model defaults.

Important Notes

  • Always back up openclaw.json to openclaw.json.bak before modifying — never edit the config without a backup
  • Always confirm capabilities with the user — API endpoints may differ from model defaults
  • The provider-id/model-id key must match exactly what appears in models.providers and agents.defaults.model.primary
  • Do not overwrite existing capability declarations without user consent

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-03-31 00:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 677 📥 326,992
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,602
dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,500