OpenRouter Model Picker for Openclaw

An interactive, Canvas-based model configuration utility that dynamically fetches all OpenRouter models and applies configuration hot-updates with zero downtime.

ys727469926
v1.0.0
Jun 2, 2026
0
555
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install openrouter-model-picker

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install openrouter-model-picker using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is OpenRouter Model Picker?

The OpenRouter Model Picker is a powerful utility designed to simplify LLM management. It allows developers to dynamically retrieve the entire suite of models from the OpenRouter API, categorize them by vendor and capability (such as vision, reasoning, or free tiers), and present them in a clean, interactive Canvas UI.

By leveraging this tool, developers can switch their active LLMs on the fly. This utility integrates directly with Openclaw Skills, giving users an intuitive way to manage agents and model configurations without manual text-editing of configuration files. The configuration updates take effect instantly, ensuring zero-restart operations for the underlying gateway.

OpenRouter Model Picker Use Cases

  • When you need to quickly swap active LLMs or test different reasoning models without restarting the agent gateway.
  • Filtering models by specific capabilities such as vision, reasoning, or identifying cost-effective free-tier options.
  • Grouping models dynamically by provider (e.g., Anthropic, DeepSeek, OpenAI) for cleaner visualization.
  • Managing complex multi-agent setups by routing specific tasks to specialized models via hot-updated configuration patches.

How OpenRouter Model Picker Works

  1. Check Status: The skill polls the background configuration server via curl on port 18790 to determine if it is already running.
  2. Fetch and Serve: If the server is offline, the skill runs fetch_models.py to fetch up-to-date model metadata from the OpenRouter API and spawns the background config server.
  3. Canvas Deployment: A unique Canvas index page is deployed to prevent stale cache issues, embedding the retrieved JSON model data directly into the webview.
  4. User Selection: The UI presents a visual interface inside the Canvas iframe allowing the user to select primary, enabled, and fallback models.
  5. Apply Configuration: Upon clicking apply, the frontend POSTs the configuration patch to the local server, which applies the update natively via openclaw config patch --stdin and gracefully exits after successful execution.

OpenRouter Model Picker Setup

To set up and run the OpenRouter Model Picker within your workflow, ensure your environment variables are set and run the lifecycle steps:

# 1. Define paths
SKILL_DIR="$(dirname $(find ${HOME}/.openclaw/workspace/skills -name SKILL.md -path '*/openrouter-model-picker/*' 2>/dev/null | head -1 | xargs dirname))"
OPENCLAW_CANVAS="${HOME}/.openclaw/canvas"

# 2. Start the configuration background server if dead
python3 ${SKILL_DIR}/scripts/fetch_models.py > /dev/null
python3 ${SKILL_DIR}/scripts/config_server.py --port 18790 --idle 600 &

# 3. Deploy Canvas Document
DOC_ID="model-picker-$(date +%Y%m%d-%H%M%S)"
CANVAS_DIR="${OPENCLAW_CANVAS}/documents/${DOC_ID}"
mkdir -p "$CANVAS_DIR"
cp ${SKILL_DIR}/assets/picker.html "$CANVAS_DIR/index.html"

OpenRouter Model Picker Data Schema & Taxonomy

The skill maintains a modular structure within the workspace, keeping visual assets, background services, and update scripts isolated:

File / Component Purpose Details
scripts/fetch_models.py Data Retriever Fetches raw JSON list of models from OpenRouter and normalizes IDs by stripping prefixes
scripts/config_server.py Light local server Listens on port 18790 to handle configuration patching. Supports idle timeouts.
assets/picker.html Front-end Canvas UI Interactive model selector layout containing search, group, and filter matrices
scripts/update_config.py Headless CLI Fallback Allows updating models directly through CLI arguments: --primary, --enabled, --fallbacks

OpenRouter Model Picker Advanced Features

  • Zero-Restart Hot Reloading: Instantly patches both agents.* and models.* parameters without needing to restart the primary Gateway.
  • ID Normalization: Automatically strips the openrouter/ prefix in the picker UI for simplified viewing, while safely prepending it back when writing to the system configuration.
  • Network Proxy Support: The model fetching script natively respects the standard https_proxy environment variable to ensure reliable connectivity to OpenRouter.
  • UI Idle Protection: The config server automatically terminates itself after a configurable idle threshold (defaulting to 10 minutes) to prevent background resource leaks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*