openrouter-model-availability

Featured

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'.

AI & Automation 2,940 stars 439 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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. ## 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...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category