convez.ai
MCP ServerIntegração & APIsAvançado
Linux5Real

L4-Smartroute

Linux5Real/L4-Smartroute

Roteamento inteligente de modelos IA para agentes de código, economizando custos

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP que analisa a complexidade de tarefas de código usando grafos de conhecimento e recomenda automaticamente o melhor modelo de IA entre 80+ opções de 15+ provedores. Otimiza custos roteando tarefas simples para modelos leves e trabalhos complexos para modelos mais capazes.

Instalação

$npx convez-ai Linux5Real/L4-Smartroute

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
2

Casos de uso

  • Reduzir custos de API ao usar modelo apropriado para cada tarefa
  • Analisar complexidade de mudanças de código via blast radius
  • Automatizar seleção de modelo em pipelines de coding agents
  • Equilibrar qualidade e performance conforme necessidade da tarefa

Veredito

Ferramenta robusta para otimização de custos em ambientes multi-modelo. Requer compreensão técnica de complexidade de código e configuração cuidadosa, mas entrega valor real reduzindo despesa desnecessária com LLMs.

README

A tradução para o português deste README ainda está na fila.

L4-Smartroute

Intelligent AI model routing for coding agents. Picks the right model for the right task - so you stop overpaying for simple fixes and underpowering complex refactors.

made by linux5real

What is L4-Smartroute?

L4-Smartroute is an MCP server that analyzes your task (prompt or git diff), calculates code complexity using knowledge graph analysis, and recommends the best AI model + effort level. Instead of always using the most expensive model, it routes each task to the most appropriate one from 80+ AI-models (Coding-Models) across 15 providers.

Built on Graphify

L4-Smartroute uses Graphify knowledge graphs to calculate blast radius - how many files, communities, and code paths a change affects. This drives complexity scoring and ensures high-risk cross-module work gets a capable model while simple edits stay cheap.

Features

  • 54+ models across 14 providers (Anthropic, OpenAI, Google, xAI, Meta, and more)
  • 3 router modes: deterministic, hybrid, ai-review
  • 4 optimization levels: quality, balanced, performance, token-saver
  • Graphify-powered blast radius analysis for accurate complexity scoring
  • Web UI for configuration on http://localhost:6639
  • One-command install with auto Claude Code integration

Prerequisites

  • Python 3.11+
  • One of: uv, pipx, or pip
  • Claude Code CLI (optional — for automatic MCP server registration)
  • Graphify (optional — for full blast radius analysis, run graphify ./your-project)

Installation

One Command

curl -fsSL https://raw.githubusercontent.com/Linux5Real/L4-Smartroute/main/install.sh | bash

This auto-detects your package manager (uv > pipx > pip), clones the repo locally, installs it editable, installs the Claude Code commands, and registers Claude Code with the actual installed MCP executable path.

Manual

git clone https://github.com/Linux5Real/L4-Smartroute.git
cd L4-Smartroute
pip install -e .
claude mcp add l4-smartroute -- "$(command -v l4-smartroute)"

From Source

git clone https://github.com/Linux5Real/L4-Smartroute.git
cd L4-Smartroute
pip install -e .

Setup

Start the configuration UI:

l4-smartroute-setup

This opens http://localhost:6639 where you can:

  • Select which models are available
  • Choose optimization mode (Quality / Balanced / Performance / Token Saver)
  • Set router mode (Deterministic / Hybrid / AI Review)
  • Configure Graphify path and budget settings

Claude Code Commands

  • /smartroute — Get a model recommendation for your current task
  • /smartroute-settings — Open the configuration UI

How It Works

Prompt / Git Diff
  -> Graphify blast radius (files, communities, centrality)
  -> Task classification (13 task types)
  -> Candidate scoring (fit, tier, cost, speed)
  -> Optional AI review (hybrid/ai-review mode)
  -> Final model + effort level + budget alternative

Supported Models

ProviderModels
AnthropicClaude Fable 5, Opus 4.8, Opus 4.7, Opus 4.6, Sonnet 4.6 / 4.5, Haiku 4.5
OpenAIGPT-5.5, GPT-5.5 Pro, GPT-5.4, GPT-5.4 mini/nano, GPT-5.3 Codex, GPT-5.2
GoogleGemini 3.1 Pro, 3.5 Flash, 3.1 Flash-Lite, 3 Deep Think, 2.5 Pro / flash
xAIGrok 4.3, Grok 4.20, Grok 4.1, Grok-build-0.1
MetaLlama 4 Maverick, Llama 4 Scout
AlibabaQwen3.7 Max/Plus, Qwen3.6 Plus, Qwen3.5, Qwen3 Coder Next, and more
MistralMistral Large 3, Medium 3.5, Small 4
DeepSeekDeepSeek V4 Pro, V4 Flash and more
NVIDIANemotron 3 Ultra, Super, Nano Omni
MoonshotKimi K2.6, Kimi K2.5
MiniMaxMiniMax-M3, M2.7, M2.5, M2.1, M2
XiaomiMiMo-V2.5-Pro, V2.5, V2-Omni, V2-Flash
Zhipu AIGLM-5.1, GLM-5-Turbo and more
OthersCommand A/A+, Step 3.7 Flash, KAT-Coder-Pro V2, Hy3

Missing a model? Open an issue and we'll add it.

License

MIT

Ver o original no GitHub

Bom para

Relacionados