OpenRouter Hot Model Router
Use the bundled script as the deterministic source for live model data. Do not hardcode a leaderboard: popularity, availability, model IDs, and pricing change frequently.
Quick start
Run commands from this skill directory:
python scripts/model_router.py list --limit 30
python scripts/model_router.py recommend --task "中文长文分析,需要工具调用" --limit 5
python scripts/model_router.py audit-skillhub --limit 30
Use python3 instead of python when required by the environment. Add --json when machine-readable output is preferable.
Select a model
- Refresh the live catalog with
recommend; never rely only on model names remembered from an earlier session. - Translate the user's actual constraints into flags:
- Use--mode popularfor adoption-first ranking.
- Use--mode budgetfor batch or cost-sensitive work.
- Use--mode balancedby default.
- Add--require-toolsfor function or tool calling.
- Add--require-visionfor image inputs.
- Add--min-context Nfor large repositories or long documents. - Present two or three candidates with model ID, weekly rank, context length, and estimated input/output price.
- Explain that weekly popularity is an adoption signal, not a universal quality benchmark.
- Keep preview, free, or newly listed models clearly labeled; do not imply stability guarantees.
Audit SkillHub coverage
Run:
python scripts/model_router.py audit-skillhub --limit 30
Treat a model as covered only when a Skill's display name or slug contains the normalized model name. Do not count a Skill merely because its description mentions the model. Review exact matches before recommending duplication.
When coverage is missing, prefer one differentiated workflow over many near-identical wrappers. Useful differentiation includes Chinese prompt adaptation, structured outputs, cost controls, fallback routing, validation, and privacy-safe key handling. Never copy another author's Skill content or imply an unofficial Skill is vendor-authored.
Call OpenRouter
Require the user to configure OPENROUTER_API_KEY in their own environment. Never ask them to paste the key into a prompt, command history, generated file, or published Skill.
python scripts/model_router.py call \
--models openai/gpt-5.5 anthropic/claude-sonnet-5 \
--prompt "Review this design and return three prioritized risks"
The model list is ordered. OpenRouter tries fallbacks when the primary model cannot complete the request. Report the actual model returned by the API rather than assuming the first candidate was used.
Before a paid call:
- Show the selected model order and whether fallbacks are enabled.
- Warn that the request can consume OpenRouter credits.
- Avoid sending secrets, private files, or personal data unless the user explicitly authorizes that transmission.
- Use
--max-tokensto bound output cost.
Interpret failures
401: key is invalid, expired, or disabled.402: account or key lacks sufficient credits.429: rate limited; honorRetry-Afterbefore retrying.502or503: provider/model unavailable; use ordered fallbacks or try later.- No candidates: relax only the least important filter and explain the change.
Read references/api-and-routing.md when modifying endpoints, selection rules, or fallback behavior.