smart-router

Route LLM requests across budget, mid, and flagship tiers by task complexity.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/teodorboev/socialai --skill smart-router-teodorboev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-router
Source: https://github.com/teodorboev/socialai/tree/main/.opencode/skills/smart-router
Command: npx skills add https://github.com/teodorboev/socialai --skill smart-router-teodorboev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill optimizes LLM usage by intelligently routing requests to the most cost-effective model based on task complexity, significantly reducing operational expenses without compromising output quality.

Core Features & Use Cases

  • Dynamic Model Routing: Automatically selects the best LLM (budget, mid-tier, or flagship) for each task.
  • Cost Management: Tracks LLM costs in real-time, enabling profitability monitoring and per-organization attribution.
  • Provider Extensibility: Supports Anthropic, OpenAI, and Google Gemini, with easy integration for new providers.
  • Use Case: An agent needs to perform a simple profanity check on a user comment. SmartRouter routes this to a low-cost budget model. Later, the same agent needs to generate a complex marketing strategy; SmartRouter routes this to a high-performance flagship model.

Quick Start

Use the smartRouter.complete method to send a user message to the LLM, specifying the agent name and task type.

Frequently Asked Questions about smart-router

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I route LLM requests to cheaper models for simple tasks?

Route LLM requests to cheaper models by classifying task complexity dynamically, sending simple tasks like profanity checks to budget models and complex tasks like marketing strategies to flagship models.

Can I manage LLM costs across Anthropic, OpenAI, and Google Gemini?

You can manage LLM costs across Anthropic, OpenAI, and Google Gemini by tracking operational expenses in real-time, enabling profitability monitoring and per-organization cost attribution.

How does provider failover work for LLM infrastructure?

Provider failover for LLM infrastructure works by dynamically rerouting requests across configured Anthropic, OpenAI, and Google Gemini providers when a failure occurs, ensuring continuous task completion.

What is the best way to select the optimal LLM model based on task complexity?

The best way to select the optimal LLM model is using dynamic classification and resolver logic to evaluate task complexity and route requests across budget, mid, and flagship tiers automatically.

Does LLM cost optimization support budget, mid-tier, and flagship model routing?

LLM cost optimization supports budget, mid-tier, and flagship model routing by evaluating provider capabilities and task requirements to select the most cost-effective model without compromising output quality.

When should I not use dynamic LLM model routing?

You should not use dynamic LLM model routing when strict output consistency from a single specific flagship model is required, as the resolver automatically shifts requests between budget and mid-tier tiers based on task complexity.