Maslul – Smart LLM router – one call, the right model Maslul, a new open-source Python library, provides smart LLM routing and provider normalization across Anthropic, Gemini, Grok, and OpenAI, allowing developers to route each request to the right model tier by difficulty without hardcoding model choices or rewriting plumbing for each provider. The library is async, fully typed, and embeddable as a library rather than a gateway, with features including difficulty-based routing, tool use, structured output, web search, and caching. Smart LLM router — one call, the right model. Async and fully typed, across Anthropic, Gemini, xAI Grok, and OpenAI — routing each request to the right model tier by difficulty. Stop hardcoding model choices and stop re-writing the tool-use / structured-output / web-search / retry plumbing for every provider. maslul Hebrew מסלול , "route / lane" is a small library that does exactly two things: routing pick a model tier per request, or pin one and provider normalization one Request / Response shape for every SDK . No server, no CLI, no heavy ML deps — providers live behind extras, and the core is stdlib-only. python import asyncio from maslul import Router, Request, Message router = Router.from toml "maslul.toml" tiers + classifier + providers, from config async def main - None: resp = await router.complete Request messages= Message role="user", content="Hello " print resp.text, "·", resp.level used, "·", resp.usage.output tokens, "tokens" asyncio.run main pip install "maslul anthropic,gemini,grok " or just the providers you use Each provider's SDK lives behind an extra, so import maslul pulls in none of them — you only install what you route to. maslul anthropic → anthropic ; maslul gemini → google-genai ; maslul grok → xai-sdk ; maslul openai → openai . maslul is a library, not a gateway — you embed the routing brain in your app, you don't run a proxy in front of it. maslul | RouteLLM | LiteLLM | | |---|---|---|---| | Shape | async library you embed no server | research framework / trained router | unified SDK + proxy server | | Routing | difficulty tiers + swappable strategies route default / classify / classify and answer / verify cascade + injectable bypass / classifier / verifier hooks | a trained strong-vs-weak router | manual config / fallback lists, load-balancing | | Providers | Anthropic · Gemini · Grok · OpenAI, normalized | model-agnostic you wire models | 100+ providers | | Tools / structured / vision | one normalized loop for all | — | per-provider | Web search | one flag, every provider → Response.sources | — | per-provider | | Caching | exact + semantic in-process | — | exact + semantic proxy | | Typing / footprint | fully typed, py.typed ; stdlib core, SDKs behind extras | research code | larger; server to operate | Choose maslul when you want a typed async library you embed — difficulty routing with your own strategy + hooks, and one Request / Response over several providers tools, structured output, vision, web search , retries, cost cache — without standing up a gateway. Reach for LiteLLM when you want a provider proxy across 100+ models, or RouteLLM when you specifically want a trained router. php flowchart LR R "complete req " -- M{"model= pin?"} M -- yes -- RUN "run that model" M -- no -- L{"level= pin?"} L -- yes -- RUN L -- no -- B{"bypass predicate?"} B -- "tier" -- RUN B -- "None" -- H{"hard signal?