Agent skill

Openrouter Model Availability

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Monitor OpenRouter model availability and implement health checks.

MITAuto-check passedAI & LLM Engineering

Install Openrouter Model Availability

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill openrouter-model-availability -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace openrouter-model-availability --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/openrouter-model-availability .claude/skills/openrouter-model-availability && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
openrouter-model-availability
GitHub stars
2.8k
Token cost
~2.2k tokens
SKILL.md length
509 words
Files
7 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Monitor OpenRouter model availability and implement health checks.

  • Works in 6 steps: Confirm your models exist in the catalog… → For a zero-cost existence check inside… → Probe live health with probe_model()… → …
  • Building systems that depend on specific models being online
  • SKILL.md covers Overview, Prerequisites, Instructions and Query Model Status, plus 8 more sections
  • Calls curl, jq and pip; reaches openrouter.ai; needs OPENROUTER_API_KEY

What it does

Openrouter Model Availability is an agent skill from jeremylongshore/tons-of-skills-marketplace. Monitor OpenRouter model availability and implement health checks. Use when building systems that depend on specific models being online. Triggers: 'openrouter model status', 'is model available', 'openrouter health check', 'model availability'.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/checking-model-status.md`, `references/errors.md` and `references/examples.md`). Compatibility notes: Designed for Claude Code

It sits in AI & LLM Engineering, covering Model routing and gateways. It works with OpenRouter. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Building systems that depend on specific models being online
  • Tasks that involve Model routing and gateways

Example prompts

  • “openrouter model status”
  • “is model available”
  • “openrouter health check”
  • “/openrouter-model-availability”

Requirements

  • Python 3
  • A credential in OPENROUTER_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Bash(python3:*), Bash(curl:*), Bash(jq:*)

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Confirm your models exist in the catalog with curl -s https://openrouter.ai/api/v1/models | jq ... per Query Model Status — pull…
  2. For a zero-cost existence check inside code, use check_model_exists() from Catalog-Based Availability Check; on a miss it calls…
  3. Probe live health with probe_model() from Health Check Service — a max_tokens: 1 request that returns a HealthStatus with available…
  4. Sweep your critical set with check_critical_models(), which logs OK/FAIL plus latency per model.
  5. Automate via the Availability Monitoring Script as a */5 * * * * cron job appending timestamped status lines to…
  6. Tune alerting per Error Handling — require 2-3 consecutive failures before marking a model down to avoid false positives.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Bash(python3:*)
    • Bash(curl:*)
    • Bash(jq:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • jq
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • openrouter.ai

    Also links to:

    • status.openrouter.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENROUTER_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Openrouter Model Availability loads about 2.2k tokens when it runs, and up to ~5.6k if it reads all its reference files. Until then it costs about 69 tokens; SKILL.md has 509 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 509 words, ~2,244 tokens.

Download SKILL.mdSave it as .claude/skills/openrouter-model-availability/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
openrouter-model-availability
description
Monitor OpenRouter model availability and implement health checks. Use when building systems that depend on specific models being online. Triggers: 'openrouter model status', 'is model available', 'openrouter health check', 'model availability'.
allowed-tools
Read, Write, Edit, Grep, Bash(python3:*), Bash(curl:*), Bash(jq:*)
compatibility
Designed for Claude Code
version
1.20.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, openrouter, monitoring, availability

OpenRouter Model Availability

Overview

OpenRouter's /api/v1/models endpoint is the source of truth for model availability. Models can be temporarily unavailable, have degraded performance, or be permanently removed. This skill covers querying model status, building health probes, tracking availability over time, and automating failover.

Prerequisites

  • An OpenRouter API key exported as OPENROUTER_API_KEY for live probes (the catalog query itself needs no auth) — see the openrouter-install-auth skill for setup
  • curl and jq for the catalog status queries and the cron monitoring script
  • Python 3.8+ with the OpenAI SDK and requests (pip install openai requests) for the health-check service
  • A small credit balance — each max_tokens: 1 probe costs roughly $0.0001

Instructions

  1. Confirm your models exist in the catalog with curl -s https://openrouter.ai/api/v1/models | jq ... per Query Model Status — pull context_length and per-million pricing without spending any tokens.
  2. For a zero-cost existence check inside code, use check_model_exists() from Catalog-Based Availability Check; on a miss it calls find_similar() to suggest same-provider replacements.
  3. Probe live health with probe_model() from Health Check Service — a max_tokens: 1 request that returns a HealthStatus with available, latency_ms, and checked_at.
  4. Sweep your critical set with check_critical_models(), which logs OK/FAIL plus latency per model.
  5. Automate via the Availability Monitoring Script as a */5 * * * * cron job appending timestamped status lines to /var/log/openrouter-health.log.
  6. Tune alerting per Error Handling — require 2-3 consecutive failures before marking a model down to avoid false positives.

Query Model Status

bash
# Check if specific models exist and their status
curl -s https://openrouter.ai/api/v1/models | jq '[.data[] | select(
  .id == "anthropic/claude-3.5-sonnet" or
  .id == "openai/gpt-4o" or
  .id == "openai/gpt-4o-mini"
) | {
  id,
  context_length,
  prompt_per_M: ((.pricing.prompt | tonumber) * 1000000),
  completion_per_M: ((.pricing.completion | tonumber) * 1000000)
}]'

# List all available models (just IDs)
curl -s https://openrouter.ai/api/v1/models | jq '[.data[].id] | sort'

# Count models by provider
curl -s https://openrouter.ai/api/v1/models | jq '[.data[].id | split("/")[0]] | group_by(.) | map({provider: .[0], count: length}) | sort_by(-.count)'

Health Check Service

python
import os, time, logging
from datetime import datetime, timezone
from dataclasses import dataclass
import requests
from openai import OpenAI, APIError, APITimeoutError

log = logging.getLogger("openrouter.health")

@dataclass
class HealthStatus:
    model: str
    available: bool
    latency_ms: float
    checked_at: str
    error: str = ""

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key=os.environ["OPENROUTER_API_KEY"],
    timeout=15.0,
    default_headers={"HTTP-Referer": "https://my-app.com", "X-Title": "health-check"},
)

def probe_model(model_id: str) -> HealthStatus:
    """Send a minimal request to test model availability."""
    start = time.monotonic()
    try:
        response = client.chat.completions.create(
            model=model_id,
            messages=[{"role": "user", "content": "hi"}],
            max_tokens=1,  # Minimal cost
        )
        latency = (time.monotonic() - start) * 1000
        return HealthStatus(
            model=model_id, available=True, latency_ms=round(latency, 1),
            checked_at=datetime.now(timezone.utc).isoformat(),
        )
    except (APIError, APITimeoutError) as e:
        latency = (time.monotonic() - start) * 1000
        return HealthStatus(
            model=model_id, available=False, latency_ms=round(latency, 1),
            checked_at=datetime.now(timezone.utc).isoformat(),
            error=str(e),
        )

def check_critical_models() -> list[HealthStatus]:
    """Probe all critical models."""
    CRITICAL_MODELS = [
        "anthropic/claude-3.5-sonnet",
        "openai/gpt-4o",
        "openai/gpt-4o-mini",
        "google/gemini-2.0-flash-001",
    ]
    results = []
    for model in CRITICAL_MODELS:
        status = probe_model(model)
        log.info(f"{'OK' if status.available else 'FAIL'} {model} ({status.latency_ms}ms)")
        results.append(status)
    return results

Catalog-Based Availability Check

python
def check_model_exists(model_id: str) -> dict:
    """Check if a model exists in the catalog (no API call cost)."""
    resp = requests.get("https://openrouter.ai/api/v1/models")
    models = {m["id"]: m for m in resp.json()["data"]}

    if model_id in models:
        m = models[model_id]
        return {
            "exists": True,
            "context_length": m["context_length"],
            "pricing": m["pricing"],
        }
    return {"exists": False, "suggestion": find_similar(model_id, models)}

def find_similar(model_id: str, models: dict) -> list[str]:
    """Find models with similar names (for migration when model is removed)."""
    prefix = model_id.split("/")[0]
    return [m for m in models if m.startswith(prefix)][:5]

Availability Monitoring Script

bash
#!/bin/bash
# Run as cron job: */5 * * * * /path/to/check_models.sh

MODELS=("anthropic/claude-3.5-sonnet" "openai/gpt-4o" "openai/gpt-4o-mini")
LOG_FILE="/var/log/openrouter-health.log"

for MODEL in "${MODELS[@]}"; do
  START=$(date +%s%N)
  HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
    https://openrouter.ai/api/v1/chat/completions \
    -H "Authorization: Bearer $OPENROUTER_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"model\":\"$MODEL\",\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}],\"max_tokens\":1}" \
    --max-time 15)
  END=$(date +%s%N)
  LATENCY=$(( (END - START) / 1000000 ))

  STATUS="OK"
  [ "$HTTP_CODE" != "200" ] && STATUS="FAIL"

  echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) $STATUS $MODEL $HTTP_CODE ${LATENCY}ms" >> "$LOG_FILE"
done

Output

  • HealthStatus records per probed model: available, latency_ms, an ISO-8601 checked_at timestamp, and the error string when a model is down
  • Catalog check dicts: {"exists": True, "context_length": ..., "pricing": ...} on a hit, or {"exists": False, "suggestion": [...]} listing similar model IDs on a miss
  • Append-only log lines from the cron script, e.g. 2026-07-02T14:05:01Z OK anthropic/claude-3.5-sonnet 200 842ms, one per critical model every 5 minutes
Show full SKILL.md (203 more words)Show less

Examples

Check that a critical model is still in the catalog before spending tokens on a probe:

bash
curl -s https://openrouter.ai/api/v1/models | jq '[.data[] | select(
  .id == "anthropic/claude-3.5-sonnet") | {id, context_length}]'
# [{"id": "anthropic/claude-3.5-sonnet", "context_length": 200000}]

Then run the Python health sweep — run_health_checks() in references/examples.md prints [OK] anthropic/claude-3.5-sonnet: 842.3ms per model, a 3/3 models healthy summary, and the mapped fallback (e.g. openai/gpt-4-turbo) for any failure. More worked examples: references/examples.md.

Error Handling

ErrorCauseFix
Model not in catalogModel renamed or removedUse find_similar() to find replacement
Health check timeout (>15s)Model overloaded or cold-startingDistinguish slow vs down; increase timeout for probes
False positive downTransient network issueRequire 2-3 consecutive failures before alerting
402 on health checkCredits exhaustedHealth checks cost ~$0.0001 each; ensure adequate credits

Enterprise Considerations

  • Health probes cost tokens ($0.0001 or less per probe with max_tokens: 1) -- budget for monitoring
  • Require 2-3 consecutive failures before marking a model as down to avoid false positives
  • Cache the models list and refresh every 5 minutes -- don't hit /api/v1/models on every request
  • Subscribe to OpenRouter announcements for model deprecations and new additions
  • Maintain a model alias map so your code uses logical names (e.g., "primary-chat") that you can remap
  • Alert when critical models disappear from the catalog, not just when they fail probes

References

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in skills/.curated/openrouter-model-availability of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/checking-model-status.md
  • references/errors.md
  • references/examples.md
  • references/handling-model-unavailability.md
  • references/model-health-monitoring.md
  • references/status-dashboard.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Openrouter Model Availability next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Openrouter Model Availability compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Openrouter Model Availability this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.2kAutomated safety check: PassMIT
Add Modelget-convex/convex-evals130—~1.5kAutomated safety check: NotesApache-2.0
To Imgrtadewald/skills185—~673Automated safety check: NotesNone
Openrouterdavidondrej/skills4.1k—~1.3kAutomated safety check: PassMIT
Openrouter Text2musicQinghongLin/data2story-skill155—~618Automated safety check: PassMIT
Fabrica Personagenscorosolto/client257—~1.6kAutomated safety check: NotesAGPL-3.0

Similar skills

  • Add Model

    get-convex/convex-evals

    Add a new model to the convex-evals coding leaderboard, and optionally the decision benchmark, through a PR, then dispatch its baseline runs.

    130 GitHub stars~1.5k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • To Img

    rtadewald/skills

    Gera imagens em paralelo via OpenRouter a partir de um pedido simples ou de um batch com prompts e filenames definidos.

    185 GitHub stars~673 tokensUpdated 11 days ago
    AI & LLM EngineeringAuto-check: notes
  • Openrouter

    davidondrej/skills

    Design, build, debug, and optimize OpenRouter API integrations.

    4.1k GitHub stars~1.3k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Openrouter Text2music

    QinghongLin/data2story-skill

    Generate atmospheric sound-design / SFX (NOT speech, NOT the front-of-blog BGM) via OpenRouter using Google Lyria 3 Pro.

    155 GitHub stars~618 tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Fabrica Personagens

    corosolto/client

    Fábrica de personagens e skins do CS BRASIL, da ficha ao personagem no jogo com avatar e arte de resultado.

    257 GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Openrouter Text2music

    QinghongLin/data2story-skill

    Generate music (NOT speech) via OpenRouter using Google Lyria 3 Pro.

    155 GitHub stars~407 tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Openrouter Model Availability

What does Openrouter Model Availability do?

Monitor OpenRouter model availability and implement health checks. Openrouter Model Availability is an agent skill from jeremylongshore/tons-of-skills-marketplace. Monitor OpenRouter model availability and implement health checks.

When should I use Openrouter Model Availability?

Openrouter Model Availability fits situations like: building systems that depend on specific models being online; tasks that involve Model routing and gateways.

How do I install Openrouter Model Availability in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill openrouter-model-availability -a claude-code`. Or copy the skill folder (skills/.curated/openrouter-model-availability in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/openrouter-model-availability in your project. Claude Code loads it when a task matches its description.

How do I install Openrouter Model Availability in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill openrouter-model-availability -a codex`. Or copy the skill folder (skills/.curated/openrouter-model-availability in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/openrouter-model-availability in your project. Codex loads it when a task matches its description.

Can I use Openrouter Model Availability in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill openrouter-model-availability -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/openrouter-model-availability, .gemini/skills/openrouter-model-availability, .github/skills/openrouter-model-availability and .opencode/skills/openrouter-model-availability in your project.

What does Openrouter Model Availability need to run?

Going by SKILL.md and its folder, Openrouter Model Availability needs the command-line tools its instructions call (curl, jq and pip) and credentials named OPENROUTER_API_KEY. Our summary lists: Python 3; A credential in OPENROUTER_API_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Bash(python3:*), Bash(curl:*), Bash(jq:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Openrouter Model Availability access the network?

SKILL.md names 2 domains. In commands or code: openrouter.ai; the agent is likely to contact it when it follows the instructions. As links in the text: status.openrouter.ai. This is read from the text; nothing was executed.

Is Openrouter Model Availability safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Openrouter Model Availability use?

Openrouter Model Availability is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Openrouter Model Availability use?

About 2.2k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.3k tokens, read only when the agent opens those files.

What are the alternatives to Openrouter Model Availability?

Skills that share tags, products or a category with Openrouter Model Availability: Add Model (get-convex/convex-evals, 130 stars), To Img (rtadewald/skills, 185 stars), Openrouter (davidondrej/skills, 4.1k stars) and Openrouter Text2music (QinghongLin/data2story-skill, 155 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Openrouter Model Availability?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.