route

Featured

Route a task to the best LLM based on task type and complexity

AI & Automation 89 stars 11 forks Updated today MIT

Install

View on GitHub

Quality Score: 89/100

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

Skill Content

# /route — Smart LLM Task Router Route any task to the optimal LLM automatically. ## Usage ``` /route <task description> ``` ## Auto-Classification Most prompts are classified automatically by the `UserPromptSubmit` hook — no `/route` needed. The hook uses a **multi-layer classification chain**: 1. **Heuristic scoring** (instant, free) — Three signal layers accumulate evidence: - Intent patterns (+3) — action verbs and task markers - Topic patterns (+2) — domain-specific nouns - Format patterns (+1) — structural and temporal cues - High-confidence match (score >= 4) routes immediately 2. **Ollama local LLM** (~1s, free) — When heuristics are uncertain, qwen3.5 classifies locally via the chat API with thinking disabled 3. **Cheap API model** (~$0.0001) — If Ollama is unavailable, Gemini Flash or GPT-4o-mini classifies 4. **Weak heuristic / auto fallback** — Last resort: low-confidence heuristic match or `llm_route` (full LLM classifier) ## Task Categories The consolidated `llm(prompt=..., task=..., tier=...)` tool is the front door for all of these — `task=` picks the specialization, `tier=` (fast/balanced/best) picks the cost tier: | Category | Call | Signals | |----------|------|---------| | Research | `llm(task="research")` | Current events, news, funding, trends, market data, rankings | | Generate | `llm(task="generate")` | Writing, drafting, brainstorming, emails, articles, translations | | Analyze | `llm(task="analyze")` | Evaluation, debugging, c...

Details

Author
ypollak2
Repository
ypollak2/llm-router
Created
6 months 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