agentleFS
hamzzaqureshihamzzaqureshi/gravidex/.claude/skills/model-router/SKILL.md

model-router

Skill1 starsChanged 9 days agoMITView on GitHub

Multi-model routing, quality-ranked cloud model directory, and resilient 429 rate-limit failover engine. Connects Antigravity to DeepSeek (R1/V3), Claude (3.7/3.5), Qwen (2.5 Coder 32B), Groq (Llama 3.3), and OpenRouter. Runs standalone via CLI or mounts directly as an Antigravity MCP server.

  • Reads credentials

17 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When working on demanding projects, hitting rate limits (HTTP 429 / quota exhaustion) on your primary model halts progress.

    line 14
  2. Very specific:

    Add to your Antigravity MCP configuration (~/.gemini/config/mcp_config.json):

    line 54

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Model Router: Resilient Multi-Provider Subagent Engine

The Model Router equips Google Antigravity with multi-model dispatch, a quality-ranked cloud model directory, and zero-downtime rate-limit resilience, inspired by OpenCode's universal provider architecture and Austin Kleon's creative synthesis principles.

When working on demanding projects, hitting rate limits (HTTP 429 / quota exhaustion) on your primary model halts progress. This engine routes tasks to specialized cloud models and automatically cascades down a fallback chain if an upstream provider is throttled or offline.


Ranked Cloud Models Directory (Best on Top, Weakest at Bottom)

The router maintains an evaluated catalog across frontier cloud providers:

TierModel IDScoreContextStrengths
Tier 1 (Frontier S-Tier)deepseek/deepseek-r199/10064k/128kDeep mathematical reasoning, formal logic & complex architectural bugs
Tier 1 (Frontier S-Tier)anthropic/claude-3.7-sonnet98/100200kHybrid thinking + instant coding benchmark leader
Tier 1 (Frontier S-Tier)anthropic/claude-3.5-sonnet97/100200kFull-stack software engineering gold standard
Tier 1 (Frontier S-Tier)qwen/qwen-2.5-coder-32b-instruct96/100128kHighest open-weight coding benchmark; ultra-fast on Groq
Tier 1 (Frontier S-Tier)google/gemini-2.5-pro95/1002MMassive multi-file repository context comprehension
Tier 1 (Frontier S-Tier)openai/o3-mini94/100200kSTEM, algorithms, unit test derivation, concise logic
Tier 2 (Workhorse A-Tier)deepseek/deepseek-chat (V3)92/10064k/128kHigh-efficiency general development and architecture
Tier 2 (Workhorse A-Tier)meta-llama/llama-3.3-70b-versatile91/100128kFree tier on Groq, 280+ tokens/sec
Tier 2 (Workhorse A-Tier)openai/gpt-4o90/100128kMulti-modal diagram reading, structured JSON extraction
Tier 3 (Budget B-Tier)anthropic/claude-3.5-haiku85/100200kRapid linting, docstrings, JSON transforms
Tier 4 (Deprecated)openai/gpt-3.5-turbo45/10016kSuperseded; prone to hallucinating modern APIs
Tier 4 (Deprecated)meta-llama/llama-2-70b-chat38/1004kObsolete instruction tuning; easily confused on multi-file diffs

Configuration

The router reads from standard environment variables or a local configuration file at ~/.config/model-router/config.json.

export OPENROUTER_API_KEY="sk-or-..."  # Single key unlocks 200+ ranked models
export DEEPSEEK_API_KEY="sk-..."       # DeepSeek R1 & V3
export GROQ_API_KEY="gsk_..."          # Free tier available at console.groq.com
export DASHSCOPE_API_KEY="sk-..."      # Alibaba Qwen

Mounting in Antigravity as an MCP Server

Add to your Antigravity MCP configuration (~/.gemini/config/mcp_config.json):

{
  "mcpServers": {
    "model-router": {
      "command": "python3",
      "args": ["/home/hamza/Documents/skills/model-router/scripts/router.py", "--mcp"]
    }
  }
}

Antigravity tools exposed:

  1. list_ranked_models: Inspects the directory of cloud models ranked from S-Tier to Deprecated.
  2. cascade_query: Executes a prompt with automatic rate-limit failover across cloud providers.
  3. consult_model: Explicitly queries a specific model (e.g. DeepSeek R1).
  4. list_providers: Reports which providers are currently configured and online.

CLI Usage

# View ranked model directory
python3 scripts/router.py models

# Fetch live real-time directory from OpenRouter API
python3 scripts/router.py models --live

# Check provider readiness
python3 scripts/router.py status

# Run with automatic rate-limit failover
python3 scripts/router.py cascade --role reason --prompt "Solve this race condition in Node PTY"
python3 scripts/router.py cascade --role code --prompt "Write a TypeScript parser for JSON lines"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.