Model tiering

From UitbreidenOS/UitKit · View interactive version

Model tiering is an AI agent skill from the GitHub repository UitbreidenOS/UitKit. Automatically route and tier developer prompts across Opus, Sonnet, and Haiku based on task characteristics

How to use this skill

Skill file

Automatic Model Tiering Skill

When to activate

When NOT to use

Instructions

To route tasks dynamically, classify developer queries into one of the three following tiers:

1. The Reasoning Tier (Opus/Thinking Model)

```python

def route_to_reasoning(task_ctx):

return {

"model": "claude-3-opus",

"temperature": 0.2,

"max_tokens": 4096,

"system_prompt": "Focus entirely on planning and mathematical correctness."

}

```

2. The Planning Tier (Sonnet)

```python

def route_to_planning(task_ctx):

return {

"model": "claude-3-5-sonnet",

"temperature": 0.3,

"max_tokens": 4096

}

```

3. The Coding Tier (Haiku)

```python

def route_to_coding(task_ctx):

return {

"model": "claude-3-haiku",

"temperature": 0.0,

"max_tokens": 4096

}

```


Example

// Routing pipeline orchestrator
import { getTaskComplexity } from "./complexity-analyzer";

export async function executeTaskWithMoE(task: string) {
  const complexity = getTaskComplexity(task);
  
  if (complexity.score > 0.8) {
    const plan = await callModel("claude-3-opus", `Plan this task: ${task}`);
    const code = await callModel("claude-3-5-sonnet", `Write code for plan: ${plan}`);
    return { plan, code };
  } else {
    return callModel("claude-3-haiku", `Write snippet: ${task}`);
  }
}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.