add-top-openrouter-models

Sync OpenRouter models used by OpenClaw into this installation's config. Fetches the OpenClaw app leaderboard from OpenRouter, verifies model IDs against the API catalog, and adds missing models with correct specs and aliases. Use when asked to "sync openrouter models", "add missing models", "update openrouter config", or "check openrouter models".

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "add-top-openrouter-models" with this command: npx skills add chunhualiao/add-top-openrouter-models

OpenRouter Model Sync

Syncs models from the OpenClaw app leaderboard on OpenRouter into this openclaw installation.

Workflow

Step 1: Extract Model IDs via Browser

The app page is a React SPA -- must use browser tool, not web_fetch.

  1. Open https://openrouter.ai/apps?url=https%3A%2F%2Fopenclaw.ai%2F in browser (profile: openclaw)
  2. Take a snapshot, find and click "Show more" to expand full leaderboard
  3. Take another snapshot after expansion
  4. Extract model IDs from link hrefs -- they follow the pattern /<provider>/<model-name> (e.g. /moonshotai/kimi-k2.5)
  5. Filter out non-model links (navigation links to /docs, /chat, /rankings, /pricing, /enterprise, /about, etc.)
  6. Collect the model IDs (without leading slash)

Step 2: Run Sync Script

python3 scripts/sync-openrouter-models.py --models "model/id1,model/id2,..."

Options:

  • --dry-run — preview changes without writing files
  • --json — machine-readable JSON output on stdout
  • stdin also accepted (one model ID per line)

The script:

  1. Verifies each ID against the OpenRouter /api/v1/models catalog (rejects unverified)
  2. Converts verified models to openclaw format (context window, pricing, reasoning, modalities)
  3. Creates timestamped backups before writing any config file
  4. Adds missing models to ~/.openclaw/agents/<agent>/agent/models.json and ~/.openclaw/openclaw.json
  5. Generates aliases (from references/aliases.json or auto-derived)

Step 3: Restart Gateway

openclaw gateway restart

Environment Variables

VariablePurposeDefault
OPENCLAW_DIROverride openclaw directory~/.openclaw
OPENCLAW_AGENT_DIROverride agent directoryauto-detected
OPENROUTER_API_KEYAPI key (falls back to config)from config

Maintaining Aliases

Edit references/aliases.json to add or update short aliases for model IDs. The script loads this file at runtime. If missing, built-in defaults are used.

What Gets Updated

  • ~/.openclaw/agents/main/agent/models.json — openrouter provider models
  • ~/.openclaw/openclaw.json — openrouter provider models + aliases
  • Backups created as <file>.bak.<timestamp> before each write

Limitations

  • Additive only (does not remove delisted models)
  • Reasoning detection uses heuristics (architecture field + known model families)
  • Requires browser tool for Step 1 (app page is JS-rendered)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Aws Fis Experiment Prepare

Use when the user wants to prepare, create, or generate an AWS FIS (Fault Injection Service) experiment configuration. Triggers on "prepare FIS experiment",...

Registry SourceRecently Updated
General

Aws Fis Experiment Execute

Use when the user wants to run a prepared AWS FIS experiment where the CloudFormation stack has already been deployed. Triggers on "execute FIS experiment",...

Registry SourceRecently Updated
General

Warranty Return Dispute Kit

Organizes a defective-product, denied-warranty, or return-window dispute into an evidence packet, timeline, support message, escalation script, contact log,...

Registry SourceRecently Updated
General

Goldman Sachs Co

提供高盛公司历史、业务模式、市场地位及关键数据,助力研究投资银行和金融机构角色分析。

Registry SourceRecently Updated