loading…
Search for a command to run...
loading…
Enables AI agents to query OpenRouter model information including prices, ELO rankings, context, and perform comparisons.
Enables AI agents to query OpenRouter model information including prices, ELO rankings, context, and perform comparisons.
CLI + MCP server to query OpenRouter model info: prices, ELO rankings, context and comparisons.
Any person or AI agent (Claude Code, Codex, Cursor, pi, etc.) can install it and use it to make informed decisions about which model to use.
npm version CI smithery badge License: MIT
npm install -g @aggc/or-info
or-info --version
The npm package is published as @aggc/or-info, but the installed executable is
or-info.
You can also run it without a global install:
npx -y @aggc/or-info models --limit 5
Requires Node.js 22 or later.
Each release is also published as a Smithery MCPB bundle, importable in one click from clients that support the MCPB format (Claude Desktop, etc.):
https://smithery.ai/server/aggc/or-info
The bundle is attached as an asset to every GitHub release (or-info.mcpb) and
can also be installed manually by dropping the file into the client.
Supported runtimes and platforms:
or-info resolves config and cache natively per platform:
| Platform | Config directory | Cache directory |
|---|---|---|
| macOS / Linux | $XDG_CONFIG_HOME/or-info or ~/.config/or-info |
$XDG_CACHE_HOME/or-info or ~/.cache/or-info |
| Windows | %APPDATA%\\or-info |
%LOCALAPPDATA%\\or-info |
| Any platform | OR_INFO_CONFIG_DIR override |
OR_INFO_CACHE_DIR override |
Files of interest:
<config-dir>/.env<cache-dir>/models.json<cache-dir>/benchmarks.jsonWithout an API key the CLI works with OpenRouter's public catalog. With a key you also see private/pay-gated models.
export OPENROUTER_API_KEY=sk-or-...
$env:OPENROUTER_API_KEY = "sk-or-..."
set OPENROUTER_API_KEY=sk-or-...
macOS / Linux:
mkdir -p ~/.config/or-info
echo 'OPENROUTER_API_KEY=sk-or-...' >> ~/.config/or-info/.env
Windows PowerShell:
New-Item -ItemType Directory -Force "$env:APPDATA\or-info" | Out-Null
Add-Content -Path "$env:APPDATA\or-info\.env" -Value "OPENROUTER_API_KEY=sk-or-..."
Windows CMD:
if not exist "%APPDATA%\or-info" mkdir "%APPDATA%\or-info"
echo OPENROUTER_API_KEY=sk-or-...>> "%APPDATA%\or-info\.env"
For tests and debugging you can redirect storage without touching your real machine state:
OR_INFO_CONFIG_DIR=/tmp/or-info-config OR_INFO_CACHE_DIR=/tmp/or-info-cache or-info status
or-info models # All models sorted by name
or-info models --sort price # Cheapest output first
or-info models --sort context # Largest context first
or-info models --filter coding # Models whose ID/name contains "coding"
or-info models --free # Free models only
or-info models --limit 20 # Limit the number of results
or-info models --tags # Show feature tags (vision, tools, reasoning…)
or-info models --json # Raw JSON
or-info price anthropic/claude-sonnet-4.5
or-info price google/gemini-2.5-flash --json
or-info benchmark openai/gpt-4o
or-info benchmark deepseek/deepseek-r1 --json
Shows the model's ELO score from LMArena (human preference votes), confidence interval, global rank and vote count. Data is fetched live from HuggingFace and cached locally for 24 hours — no API key required.
or-info compare anthropic/claude-sonnet-4.5 google/gemini-2.5-flash
or-info compare openai/gpt-4o deepseek/deepseek-chat-v3-0324 --json
or-info top --task coding # Best coding models
or-info top --task reasoning # Best reasoning models
or-info top --task general # Best all-rounders
or-info top --task vision # Best vision models (requires image input)
or-info top --task cheap # Best value for money
or-info top --task premium # Highest quality, ignoring price
or-info top --task coding --pricing premium # Best coder regardless of price
or-info top --task coding --budget 2 # Best coders under $2/M output
or-info top --task general --limit 10
Ranking combines LMArena ELO with price and context window size.
--task controls which ELO category and capability filter to apply.
--pricing overrides the price-penalty strategy independently:
--pricing |
Effect |
|---|---|
standard (default) |
Moderate penalty for expensive models |
cheap |
Steep penalty; strongly favours free/low-cost models |
premium |
No penalty; ranks by quality alone |
Task defaults (when --pricing is not set):
| Task | Default pricing | Capability filter |
|---|---|---|
general |
standard | none |
coding |
standard | soft penalty (−15%) if no tool support |
reasoning |
standard | none |
vision |
standard | hard filter: image input required |
cheap |
cheap | none |
premium |
premium | none |
or-info status # Show cache age and TTL for each data source
or-info refresh # Force-refresh OpenRouter catalog + LMArena ELO
or-info can run as an MCP server for AI agents.
| Tool | Description |
|---|---|
models.get |
Pricing, context, architecture, features and LMArena ELO for a model |
models.list |
List models with optional filter, sort and limit |
models.compare |
Side-by-side comparison of two models |
models.top |
Ranked top models for coding/reasoning/general/vision/cheap/premium; accepts optional pricing override |
benchmarks.get |
LMArena ELO score, global rank, vote count and confidence interval for a model |
cache.refresh |
Force-refresh OpenRouter catalog + LMArena ELO |
Legacy flat names (get_model_info, list_models, get_benchmarks,
compare_models, best_for_task, refresh_cache) are still advertised in
tools/list as deprecated aliases (same schemas, prefixed [Deprecated])
and remain callable. The dot-notation names are the canonical ones.
The recommended way is the claude mcp add command, which writes to ~/.claude.json:
# Global — available in all projects
claude mcp add --scope user or-info -- or-info --mcp
# Project-only (run from the project directory)
claude mcp add or-info -- or-info --mcp
Then verify:
claude mcp list
Project .mcp.json — commit this file to share the config with your team:
macOS / Linux:
{
"mcpServers": {
"or-info": {
"command": "or-info",
"args": ["--mcp"]
}
}
}
Windows:
{
"mcpServers": {
"or-info": {
"command": "or-info.cmd",
"args": ["--mcp"]
}
}
}
Without a global install (macOS/Linux):
{
"mcpServers": {
"or-info": {
"command": "npx",
"args": ["-y", "@aggc/or-info", "--mcp"]
}
}
}
Without a global install (Windows):
{
"mcpServers": {
"or-info": {
"command": "npx.cmd",
"args": ["-y", "@aggc/or-info", "--mcp"]
}
}
}
Add to ~/.codex/config.toml:
[mcp_servers.or-info]
command = "or-info"
args = ["--mcp"]
Then restart Codex for the change to take effect.
Pi does not use an mcpServers settings schema. The recommended integration is a Pi skill
that calls the installed or-info CLI, for example ~/.pi/agent/skills/or-info/SKILL.md.
macOS / Linux:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | or-info --mcp
Windows PowerShell:
'{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | or-info.cmd --mcp
Windows CMD:
echo {"jsonrpc":"2.0","id":1,"method":"tools/list"} | or-info.cmd --mcp
| Data | Source | Refresh |
|---|---|---|
| Model catalog and pricing | OpenRouter API | Every 30 min |
| ELO rankings | LMArena via HuggingFace dataset | Every 24 h |
ELO data is fetched directly from the lmarena-ai/leaderboard-dataset dataset on HuggingFace
using their public Datasets Server API — no API key required. Coverage: ~350 models
including all major commercial and open-source models tracked by LMArena.
npm test
npm test runs the deterministic local suite and is the release gate used before publishing.
Live integration tests are available separately because they depend on OpenRouter and
HuggingFace availability and can occasionally hit third-party rate limits.
Additional entry points:
npm run test:local for deterministic no-network coveragenpm run test:online:smoke for the live smoke subset used by CI as a non-blocking signalnpm run test:online for the full live CLI/MCP suite, including edge casesSee CHANGELOG.md for release history and details.
See CONTRIBUTING.md — adding new CLI commands or new MCP tools.
Run in your terminal:
claude mcp add or-info -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.