More screenshots

    Works with the AI Agents you already use

    OpenRouter Model & Cost Optimizer

    by Mikhail Kulakov

    2

    Design evidence-labelled OpenRouter routing policies, cost projections, and fallback rules for AI workloads.

    $8.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    OpenRouter Model & Cost Optimizer

    OpenRouter Model & Cost Optimizer

    Example session with this skill installed

    We use OpenRouter for three tasks and want a routing policy. Priorities: support quality is more important than cost; classification must be fast and cheap; coding changes must be reliable.

    Our approximate monthly workload is 50,000 classifications, 8,000 support replies, and 1,200 coding tasks.

    Here is a fictional demonstration snapshot supplied by us, not a current market claim:

    Economy: input $0.20 / 1M tokens; output $0.80 / 1M tokens.
    Balanced: input $1.50 / 1M tokens; output $6.00 / 1M tokens.
    Premium: input $8.00 / 1M tokens; output $32.00 / 1M tokens.

    Average classification: 400 input and 30 output tokens.
    Average support reply: 1,300 input and 280 output tokens.
    Average coding task: 4,500 input and 1,200 output tokens.

    We need a primary model, fallback, escalation rule, budget controls, and a test plan. Do not modify our routing or use any API key.

    • Read your context and instructions
    • Compiled the openrouter model

    Decision Summary

    Using your fictional price snapshot only, the recommended policy is: Economy for classification, Balanced for support replies, and Premium for coding tasks. This matches the priorities: classification stays fast and cheap, support avoids underpowered replies, and coding favors reliability over cost.

    No browsing, API key use, or routing modification was performed.

    Evidence Ledger

    TypeItemSource or statusEffect on decision
    User-suppliedWorkload volumes50,000 classifications, 8,000 support replies, 1,200 coding tasks monthlyUsed for monthly cost estimates
    User-suppliedToken averagesClassification 400/30, support 1,300/280, coding 4,500/1,200 input/outputUsed for cost estimates
    User-suppliedFictional model-tier pricesEconomy, Balanced, Premium snapshotProvisional demo pricing only
    RecommendationTier routingPolicy choiceNeeds validation before production

    Cost Formula

    runs per month × (input tokens / 1,000,000 × input price
                      + output tokens / 1,000,000 × output price)
    

    Recommended Monthly Base Cost

    TaskRouteMonthly cost
    ClassificationEconomy$5.20
    Support repliesBalanced$29.04
    Coding tasksPremium$89.28
    TotalMixed policy$123.52

    For comparison: all-Economy would be $11.30, all-Balanced would be $84.78, and all-Premium would be $452.16. The mixed route spends where quality matters without wasting Premium capacity on simple classification.

    Routing Policy

    TaskPrimaryFallbackEscalation rules
    ClassificationEconomyBalancedEscalate when confidence is below Proposed 0.80, input is out-of-domain, schema validation fails, or result conflicts with deterministic rules
    Support repliesBalancedPremiumEscalate for angry customers, billing/account-risk cases, policy-sensitive answers, repeated user dissatisfaction, or answer-quality score below Proposed 4/5
    Coding tasksPremiumAlternate Premium, then human reviewEscalate/retry when tests fail, patch touches security/auth/data migration, diff is large, or model cannot explain the change coherently

    Budget Controls

    Base budget from supplied numbers is $123.52/month before retries and escalations.

    Recommended controls

    ControlPolicy
    Monthly alertProposed $150 soft alert
    Monthly review gateProposed $185 investigate routing, retries, and token growth
    Classification retryProposed 1 Balanced retry only after validation failure
    Support escalation capTrack Premium escalation rate; investigate if above Proposed 15%
    Coding cost guardRequire human approval before Premium retries above Proposed 1 retry per task
    Token driftAlert if average tokens grow above Proposed 25% from current averages
    Outage behaviorUse same-tier alternate first; if unavailable, move up one tier for support/coding and degrade classification to queue/retry

    Validation Plan

    TaskTest setPass condition
    ClassificationProposed 300 labeled cases, including Proposed 50 borderline/ambiguous casesEconomy remains primary if accuracy is at least Proposed 95% overall and at least Proposed 90% on borderline cases
    SupportProposed 120 real or realistic tickets across routine, angry, refund, technical, and policy-sensitive casesBalanced remains primary if human reviewers rate at least Proposed 90% as usable without major rewrite
    CodingProposed 60 tasks across bug fixes, refactors, tests, and small featuresPremium remains primary if tests pass on at least Proposed 90% and reviewer accepts at least Proposed 85% without material redesign
    Fallback drillForce simulated failure for each primary routeSystem must route to fallback correctly in Proposed 100% of drill cases

    Open Questions

    Current OpenRouter model names, live pricing, latency, context limits, and provider availability were not verified. The smallest next step would be to collect a dated OpenRouter snapshot and run an offline validation batch with logged token counts, outputs, reviewer scores, latency, retry rate, and escalation rate.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    Managing costs and reliability across multiple LLM providers is complex. Developers often overpay for simple tasks or suffer outages because they lack a systematic model routing and fallback strategy.

    What it does

    • Maps your specific workload into task classes based on risk, volume, and latency needs.
    • Defines primary and fallback model routes for every task type to ensure high availability.
    • Establishes observable escalation triggers and validation gates for quality control.
    • Calculates evidence-backed cost projections using your specific token usage and pricing data.

    Frameworks & tools

    OpenRouter API, LLM orchestration frameworks, and JSON-based routing configurations.

    Why this beats prompting it yourself

    Standard prompts often ignore the nuance of cost-to-quality ratios or fail to provide measurable validation gates. This skill enforces a rigorous evidence-based approach, marking every non-verified number as Proposed to prevent accidental reliance on hallucinated benchmarks or outdated pricing.

    Use cases

    • Optimizing OpenRouter spend by routing routine tasks to cheaper, specialized models.
    • Architecting multi-model redundancy to handle provider outages or rate limits.
    • Setting up automated quality gates that trigger escalation to high-reasoning models.
    • Projecting monthly API budgets for new AI features before deployment.

    Known limitations

    Does not provide real-time pricing from memory; requires user-supplied dated snapshots or permission to verify sources. Does not store or manage API keys.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Permissions

    No special permissions declared or detected

    Listed2 months ago
    Updated2 months ago

    What's inside

    Frequently Asked Questions

    This skill provides a structured framework for designing OpenRouter routing policies, including cost-to-quality mapping, fallback logic for outages, and evidence-based budget projections to prevent overspending on simple tasks.

    The skill generates JSON-based routing configurations and logic that are compatible with any LLM orchestration framework or custom agentic workflow that interfaces with the OpenRouter API.

    You will receive a systematic methodology for workload classification, a template for defining primary and fallback routes, and a protocol for establishing observable quality gates for your AI tasks.

    Since LLM pricing and performance change frequently, this skill marks all metrics as 'Proposed' and provides a validation protocol for you to update routes based on the latest provider benchmarks.

    No, for security reasons this skill does not store or manage API keys; it provides the logic and architectural configuration which you then implement within your own secure environment.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.