Logo : Router Llm

Router Llm

OrganisationPopulaire
GetStream
router-llm

What the LLM router can be asked for, what each provider calls it, and what it refuses to fake. Read before adding a response parameter or an LLM provider.

Présentation

ÉditeurGetStream
DépôtAgents
Nom de la compétencerouter-llm
Étoiles
8.2K
Forks
709
Fichiers inclus
Instructions uniquement
LicenceApache-2.0
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Tout dans les instructions

    Tout ce dont le modèle a besoin se trouve dans les instructions : aucun fichier supplémentaire à synchroniser.

  • Open source

    Publiée par GetStream sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Router Llm dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/GetStream/Agents/tree/main/.claude/skills/router-llm
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/GetStream/Agents.git /tmp/Agents
mkdir -p .claude/skills
cp -r /tmp/Agents/.claude/skills/router-llm .claude/skills/router-llm
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Router Llm dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Router Llm dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Router Llm n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

Routing completions

The per-modality half of router-interface. The vocabulary is ResponseParams, and options.LLM is the subset a router config holds as defaults. It is deliberately the same vocabulary rather than a second one for the same things, so nothing is translated on the way through.

The router speaks OpenAI's Responses shape because that is what most of the field now speaks: instructions separate from input, one stream per response, tool calls as events. Providers that only offer chat completions are adapted in openaicompat.

There is only one path here. A completion is already whole by the time it is returned, so there is no recording() — what the socket buys is the answer arriving as it is written.

The top six, and what each calls the same thing

OptionOpenAIAnthropicGemini FlashxAI GrokMuseDeepSeek
instructionsinstructionssystemsystemInstructioninstructions, or a first system messageinstructionsfirst system message
inputinputmessagescontentsinputinputmessages
max_output_tokensmax_output_tokensmax_tokens (required)generationConfig.maxOutputTokensmax_output_tokensmax_output_tokensmax_tokens
temperaturedropped on reasoning models1.0, or 4000–2, and don't0–20–2ignored while thinking
reasoning_effortreasoning.effort, none–maxoutput_config.effort, low–maxthinkingConfig.thinkingLevel, low–highreasoning.effort, low–xhighreasoning.effort, minimal–maxthinking, then reasoning_effort
formattext.formatoutput_config.formatresponseMimeType, responseSchematext.formattext.formatresponse_format, JSON but not a schema
verbositytext.verbosity———400accepted, then ignored
tools, tool_choiceauto, none, requiredauto, any, tool, nonefunctionDeclarations, functionCallingConfig.modeauto, none, requiredauto and nothing elseauto, none, required, named
store, previous_response_idboth, kept 30 days; a Zero Data Retention org refuses previous_response_id, so we send store: false—the Interactions API onlyboth, kept 30 daysboth—
prompt_cache_keyprompt_cache_keycache_control breakpoints, four of themimplicit over 4k tokens, or a cachedContents resourceprompt_cache_key, which is x-grok-conv-idprompt_cache_keyautomatic, by prefix
cache TTLprompt_cache_options.ttl, which is 30m5m or 1hwhatever the explicit cache was made with—prompt_cache_retention, as a hint—
metadatametadata, safety_identifiermetadata.user_idlabels, Interactions onlyaccepted, then ignoredmetadatauser_id

What the table is saying:

  • Thinking is not one scale, and it is mostly not optional any more. The ladders run from three rungs to seven, and Gemini Flash, Grok and Muse cannot be told not to think at all: Muse takes none and answers 400, Gemini took minimal away in 3.8 Flash. OpenAI's 5.6 family and DeepSeek still have an off switch, which is what a live tier is built on. There is no honest common scale, which is why each model declares the words it answers to.
  • Temperature is being withdrawn. Anthropic rejects anything but 1.0 on models after Opus 4.6, OpenAI's own migration guide says to remove it on reasoning models, Gemini takes it and warns that below 1.0 the model loops, and DeepSeek accepts it and ignores it while thinking is on. Temperature is a pointer for exactly this reason: saying nothing is the only portable thing left to say.
  • Caching is four unrelated mechanisms. A key you choose, breakpoints you place, a prefix match you get for free, and a cache you create as a resource and point at. prompt_cache_key is the first; the rest is the provider's. TTL is not a duration anyone picks either — 30m or nothing, 5m or 1h, a hint, or no say at all — which is why CacheTTLs is a list of what a provider accepts rather than a number.
  • Render earlier messages the same way every time. Don't reorder or rewrite them, and don't put a cache breakpoint on a mid-conversation system message: every request has to open with the one before it, or the cache is lost (see internal/harness/AGENTS.md).
  • The conversation still lives in the caller, though it no longer has to. OpenAI, Grok, Muse and Gemini's Interactions API will all hold it now; Anthropic and DeepSeek will not. Sending it whole every time is what makes a failover to one of those two work, and what lets consecutive turns be answered by different providers. No provider here continues from previous_response_id either: an OpenAI organisation with Zero Data Retention refuses it, a customer's own key can belong to one, and a continued response is billed for the whole chain anyway.
  • Thinking does not survive the crossing. Every provider that reasons wants its own reasoning handed back on the next turn: Anthropic's signed blocks, Gemini's thought signatures (a missing one is a 400 on a function call), Grok's encrypted content (omitting it is their own top cause of cache misses), Muse's encrypted replay, and DeepSeek's reasoning_content, which has to be replayed when tools are in play and left out when they are not. It is opaque, it is per provider, and it means nothing to the next one, so it belongs to the turn it came from and is dropped when the provider changes.

What the router refuses to fake

Not by supports: — options.LLM.Terms() returns nothing, because every provider here speaks the whole of the response parameters. It is Capabilities instead, checked before the request goes out:

  • A reasoning effort the model does not accept is an error. Not silently dropped, and not passed through either, because a provider's own answer to an unknown effort is a 400 halfway through a phone call.
  • A verbosity the model does not accept is an error, where the model accepts any.
  • store means nothing to a provider that does not report Store. A previous_response_id or conversation the model cannot hold is refused, because the answer would be made from only the newest messages, and asking for both is refused as a contradiction.
  • A cache TTL a provider does not offer is dropped, since the request still works and only costs more.

The rule of thumb: refuse what changes the answer, drop what changes only the bill, and say which in a comment.

The providers themselves are the argument for keeping this table. Grok 4.5 takes xhigh and runs at high without saying so, and DeepSeek takes text.verbosity and does nothing with it. Both are worse than a 400, because the request looks answered. Muse is the same problem one level up: its tool_choice accepts only auto, so a request that says required is a different set of candidates rather than a preference to pass along and hope for.

Data policy and overwrites

Neither exists here yet, and both should. options.STT and options.Search carry a DataPolicy and an Overwrites map, and every STT model in router.yaml declares its data_handling; options.LLM carries neither and the llm: section declares none. The shape is the one the other two already use:

yaml
llm:
  providers: [openai, gemini]
  data_policy:
    allow_training: false
    retention: none
  overwrites:
    gemini:
      thinking_budget: 2048

It matters more here than it does for audio. Muse encodes the training decision in the model id, so muse-spark-1.3-contributor is a tenth of the price and a licence to train on both the prompts and the answers, one suffix away from the model that is not. And a model name is not a contract: the DeepSeek weights this deployment routes to are served by Baseten under Baseten's terms, not the ones on DeepSeek's own platform, where the privacy policy claims training rights and names no retention window. That is why data_handling is declared per model in the router's config rather than per vendor in anybody's documentation.

Overwrites are where the leftovers go — Gemini's legacy thinkingBudget, Anthropic's thinking.type, Grok's search_parameters, Muse's search_context_size — with each provider parsing its own block into a typed struct so an unknown field is refused rather than dropped.

Adding a parameter

  1. A field on ResponseParams, and on options.LLM plus Merge if a config should be able to default it.
  2. The same field on LlmOptions, on its Go struct in internal/api. Then run go run ./cmd/openapi and regenerate all three clients.
  3. Send it in each provider that takes it, and add a Capabilities field plus a Validate case if the answer changes when it is ignored.
  4. A test in llmtest so every provider is held to the same behaviour.

Foire aux questions

À quoi sert la compétence IA Router Llm ?

What the LLM router can be asked for, what each provider calls it, and what it refuses to fake. Read before adding a response parameter or an LLM provider.

Pourquoi utiliser Router Llm sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Router Llm se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Router Llm dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/GetStream/Agents/tree/main/.claude/skills/router-llm. TypingMind lit le fichier SKILL.md et l’installe sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Router Llm ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Router Llm ?

Autant que vous le souhaitez. Vous pouvez utiliser Router Llm avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Router Llm est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par GetStream sous licence Apache-2.0. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇