返回顶部
o

openclaw-model-optimizer

Optimize OpenClaw model configuration by declaring missing model capabilities (vision/multimodal input, context window, max output tokens, reasoning). Use when user mentions OpenClaw model optimization, model capabilities not working, image/vision not recognized, context window too small, output truncated, or after adding a new model provider to openclaw.json. Also triggers on "优化openclaw模型配置" or similar requests.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.0
安全检测
已通过
120
下载量
1
收藏
概述
安装方式
版本历史

openclaw-model-optimizer

# 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: ```json { "agents": { "defaults": { "models": { "provider-id/model-id": { "input": ["text", "image"], "contextWindow": 256000, "maxTokens": 16384, "reasoning": true } } } } } ``` ### Field Reference | Field | Type | Description | |-------|------|-------------| | `input` | `string[]` | Supported input modalities: `"text"`, `"image"`. Default if omitted: `["text"]` only — vision disabled | | `contextWindow` | `number` | Max input context in tokens. Default if omitted: conservative fallback — may truncate long conversations | | `maxTokens` | `number` | Max output tokens per response. Default if omitted: conservative fallback — long responses get cut off | | `reasoning` | `boolean` | Whether 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](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

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 openclaw-model-optimizer-1776103449 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 openclaw-model-optimizer-1776103449 技能

通过命令行安装

skillhub install openclaw-model-optimizer-1776103449

下载 Zip 包

⬇ 下载 openclaw-model-optimizer v1.1.0

文件大小: 2.82 KB | 发布时间: 2026-4-14 11:12

v1.1.0 最新 2026-4-14 11:12
Add config backup step: back up openclaw.json before modifying

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部