Install
openclaw skills install @yay2008/openclaw-model-optimizerOptimize 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.
openclaw skills install @yay2008/openclaw-model-optimizerOptimize openclaw.json model configurations by declaring model capabilities that OpenClaw cannot auto-detect.
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.
~/.openclaw/openclaw.json~/.openclaw/openclaw.json to ~/.openclaw/openclaw.json.bak before making any changesmodels.providersagents.defaults.models exists with capability declarations for each modelagents.defaults.models block with proper declarationsDeclare 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 | 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 |
Reference for popular models (always verify with user before applying):
See references/model-capabilities.md for known model defaults.
openclaw.json to openclaw.json.bak before modifying — never edit the config without a backupprovider-id/model-id key must match exactly what appears in models.providers and agents.defaults.model.primary