{"id":7479,"date":"2026-08-19T19:10:08","date_gmt":"2026-08-19T19:10:08","guid":{"rendered":"https:\/\/www.wiven.ai\/wiven-llm\/docs\/administration\/routeur\/"},"modified":"2026-08-19T19:10:08","modified_gmt":"2026-08-19T19:10:08","slug":"routeur","status":"publish","type":"wvn_doc","link":"https:\/\/www.wiven.ai\/en\/wiven-llm\/docs\/administration\/routeur\/","title":{"rendered":"Model router"},"content":{"rendered":"<h1>Model router<\/h1>\n<p>A <strong>router<\/strong> automatically chooses, message by message, which model should<br \/>\nto answer. It allows for everyday use with a business model, while<br \/>\nreserving a more powerful model for cases that justify it.<\/p>\n<hr \/>\n<h2>What is it for?<\/h2>\n<ul>\n<li><strong>Controlling the cost<\/strong> \u2014 a small model deals with simple questions, a large one<br \/>\n  model complex analyses.<\/li>\n<li><strong>Preserve confidentiality<\/strong> \u2014 exchanges touching on sensitive subjects<br \/>\n  remain on a local model; the rest can go to an external supplier.<\/li>\n<li><strong>Managing capacities<\/strong> \u2014 Messages containing an image are directed to a template<br \/>\n  who knows how to treat them.<\/li>\n<li><strong>Adapt to the moment<\/strong> \u2014 a different model outside of working hours.<\/li>\n<\/ul>\n<hr \/>\n<h2>Functioning<\/h2>\n<p>A router consists of:<\/p>\n<ul>\n<li>a <strong>fallback destination<\/strong> \u2014 the model used when no rule<br \/>\n  applies; ;<\/li>\n<li>a list of <strong>rules<\/strong>, evaluated with each message; ;<\/li>\n<li>a <strong>adhesion duration<\/strong> \u2014 the period during which a conversation remains<br \/>\n  based on the chosen model.<\/li>\n<\/ul>\n<p>When a rule matches, its model takes precedence. Otherwise, the fallback applies.<\/p>\n<h3>Adhesion<\/h3>\n<p>Without it, a conversation would bounce from one model to another according to the<br \/>\nmessages, with breaks in style and coherence.<\/p>\n<p>Once a rule has directed a conversation to a pattern, the conversation there<br \/>\n<strong>stay<\/strong> during the configured duration, even if the following messages do not<br \/>\nno longer correspond to any rule. This is what makes routing usable in<br \/>\na real discussion.<\/p>\n<hr \/>\n<h2>The two types of rules<\/h2>\n<h3>Calculated rules<\/h3>\n<p>They rely on measurable criteria, evaluated without recourse to the model \u2014<br \/>\nTherefore, instantly and for free.<\/p>\n<table>\n<thead>\n<tr>\n<th>Criteria<\/th>\n<th>Examples of use<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Message content<\/strong><\/td>\n<td>Contains a given term, or corresponds to a pattern<\/td>\n<\/tr>\n<tr>\n<td><strong>Conversation size<\/strong><\/td>\n<td>Beyond a certain volume, switch to a model with a large context window.<\/td>\n<\/tr>\n<tr>\n<td><strong>Number of messages<\/strong><\/td>\n<td>After several exchanges, change the model<\/td>\n<\/tr>\n<tr>\n<td><strong>Current time<\/strong><\/td>\n<td>A different model at night or on weekends<\/td>\n<\/tr>\n<tr>\n<td><strong>Presence of an image<\/strong><\/td>\n<td>Moving towards a multimodal model<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Available comparators: contains, corresponds to, greater than, greater than or equal to,<br \/>\nless than, less than or equal to, equal to, different from, between. Several<br \/>\nconditions can be combined.<\/p>\n<h3>Rules by classification<\/h3>\n<p>You describe <strong>in natural language<\/strong> the type of message concerned, and a template<br \/>\nsubtly classifies each message.<\/p>\n<p><strong>Example description:<\/strong> \u00ab&quot;The message requires legal analysis&quot;<br \/>\nin-depth analysis, comparison of several contracts, or drafting of a<br \/>\nformal document.\u00bb<\/p>\n<p>More flexible than a calculated rule, but each classification has a cost.<br \/>\nThe result is therefore cached during the adhesion period, which prevents<br \/>\nreclassify each message within the same conversation.<\/p>\n<hr \/>\n<h2>Configure \u2014 <em>administrator<\/em><\/h2>\n<p><code>Settings \u2192 Template Routers<\/code>.<\/p>\n<ol>\n<li><strong>Create a router<\/strong> name, description, fallback destination, duration<br \/>\n   adhesion.<\/li>\n<li><strong>Add rules<\/strong>, each with its own type, conditions and its<br \/>\n   destination.<\/li>\n<li><strong>Assign the router<\/strong> to a workspace \u2014 which then no longer uses<br \/>\n   a fixed model, but the router.<\/li>\n<\/ol>\n<p>A router can also be designated as the instance&#039;s default router.<\/p>\n<hr \/>\n<h2>Configuration examples<\/h2>\n<h3>Save money without harming the environment<\/h3>\n<ul>\n<li><strong>Retreat:<\/strong> fast local model.<\/li>\n<li><strong>Rule by classification:<\/strong> \u00ab&quot;Complex analysis, multi-faceted reasoning&quot;<br \/>\n  steps, or long writing \u00bb \u2192 powerful model.<\/li>\n<li><strong>Calculated rule:<\/strong> conversation exceeding a significant volume \u2192 model to<br \/>\n  large context window.<\/li>\n<\/ul>\n<h3>Protecting the sensitive<\/h3>\n<ul>\n<li><strong>Retreat:<\/strong> high-performing external supplier.<\/li>\n<li><strong>Calculated rule:<\/strong> the message contains terms indicating confidentiality<br \/>\n  \u2192 local model.<\/li>\n<li><strong>Rule by classification:<\/strong> \u00ab&quot;The message concerns personal data,<br \/>\n  medical or financial nominative \u00bb \u2192 local model.<\/li>\n<\/ul>\n<h3>Manage images<\/h3>\n<ul>\n<li><strong>Retreat:<\/strong> text model.<\/li>\n<li><strong>Calculated rule:<\/strong> presence of an image attachment \u2192 multimodal model.<\/li>\n<\/ul>\n<hr \/>\n<h2>Points to consider<\/h2>\n<p><strong>A poorly written rule goes unnoticed.<\/strong> A router that never directs anything<br \/>\nbehaves like a unique model, without indicating it. Test each rule after<br \/>\ncreation.<\/p>\n<p><strong>Order matters.<\/strong> The rules are evaluated in order; the first one that<br \/>\nWhichever matches best? Place the most specific ones first.<\/p>\n<p><strong>Classification costs money.<\/strong> Each classification is an additional call.<br \/>\nOn a router containing only classification rules, the gain<br \/>\nThe economic cost can be offset by the cost of classification.<\/p>\n<p><strong>Adhesion is a compromise.<\/strong> Too short, the conversation changes pattern<br \/>\nalong the way; too long, a message that deserves the larger model remains<br \/>\non the small one. A few tens of seconds are sufficient in most cases.<\/p>\n<p><strong>Notify the users.<\/strong> An unevenly high-quality response to a message<br \/>\nThe other problem arises if one is unaware that a router is in place.<\/p>","protected":false},"parent":7451,"menu_order":504,"template":"","meta":[],"class_list":["post-7479","wvn_doc","type-wvn_doc","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Routeur de mod\u00e8les \u2014 Documentation WivenLLM<\/title>\n<meta name=\"description\" content=\"Diriger automatiquement chaque conversation vers le mod\u00e8le le plus adapt\u00e9, selon des r\u00e8gles que vous d\u00e9finissez.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wiven.ai\/en\/wiven-llm\/docs\/administration\/routeur\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Routeur de mod\u00e8les \u2014 Documentation WivenLLM\" \/>\n<meta property=\"og:description\" content=\"Diriger automatiquement chaque conversation vers le mod\u00e8le le plus adapt\u00e9, selon des r\u00e8gles que vous d\u00e9finissez.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wiven.ai\/en\/wiven-llm\/docs\/administration\/routeur\/\" \/>\n<meta property=\"og:site_name\" content=\"Wiven AI\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wiven.ai\\\/wiven-llm\\\/docs\\\/administration\\\/routeur\\\/\",\"url\":\"https:\\\/\\\/www.wiven.ai\\\/wiven-llm\\\/docs\\\/administration\\\/routeur\\\/\",\"name\":\"Routeur de mod\u00e8les \u2014 Documentation WivenLLM\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wiven.ai\\\/#website\"},\"datePublished\":\"2026-08-19T19:10:08+00:00\",\"description\":\"Diriger automatiquement chaque conversation vers le mod\u00e8le le plus adapt\u00e9, selon des r\u00e8gles que vous d\u00e9finissez.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.wiven.ai\\\/wiven-llm\\\/docs\\\/administration\\\/routeur\\\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wiven.ai\\\/wiven-llm\\\/docs\\\/administration\\\/routeur\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.wiven.ai\\\/wiven-llm\\\/docs\\\/administration\\\/routeur\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.wiven.ai\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\\\/\\\/www.wiven.ai\\\/wiven-llm\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Administration\",\"item\":\"https:\\\/\\\/www.wiven.ai\\\/wiven-llm\\\/docs\\\/administration\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Routeur de mod\u00e8les\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wiven.ai\\\/#website\",\"url\":\"https:\\\/\\\/www.wiven.ai\\\/\",\"name\":\"Wiven AI\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wiven.ai\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Model Router \u2014 WivenLLM Documentation","description":"Automatically direct each conversation to the most suitable template, according to rules you define.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wiven.ai\/en\/wiven-llm\/docs\/administration\/routeur\/","og_locale":"en_US","og_type":"article","og_title":"Routeur de mod\u00e8les \u2014 Documentation WivenLLM","og_description":"Diriger automatiquement chaque conversation vers le mod\u00e8le le plus adapt\u00e9, selon des r\u00e8gles que vous d\u00e9finissez.","og_url":"https:\/\/www.wiven.ai\/en\/wiven-llm\/docs\/administration\/routeur\/","og_site_name":"Wiven AI","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wiven.ai\/wiven-llm\/docs\/administration\/routeur\/","url":"https:\/\/www.wiven.ai\/wiven-llm\/docs\/administration\/routeur\/","name":"Model Router \u2014 WivenLLM Documentation","isPartOf":{"@id":"https:\/\/www.wiven.ai\/#website"},"datePublished":"2026-08-19T19:10:08+00:00","description":"Automatically direct each conversation to the most suitable template, according to rules you define.","breadcrumb":{"@id":"https:\/\/www.wiven.ai\/wiven-llm\/docs\/administration\/routeur\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wiven.ai\/wiven-llm\/docs\/administration\/routeur\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wiven.ai\/wiven-llm\/docs\/administration\/routeur\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.wiven.ai\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/www.wiven.ai\/wiven-llm\/docs\/"},{"@type":"ListItem","position":3,"name":"Administration","item":"https:\/\/www.wiven.ai\/wiven-llm\/docs\/administration\/"},{"@type":"ListItem","position":4,"name":"Routeur de mod\u00e8les"}]},{"@type":"WebSite","@id":"https:\/\/www.wiven.ai\/#website","url":"https:\/\/www.wiven.ai\/","name":"Wiven AI","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wiven.ai\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"}]}},"_links":{"self":[{"href":"https:\/\/www.wiven.ai\/en\/wp-json\/wp\/v2\/wvn_doc\/7479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wiven.ai\/en\/wp-json\/wp\/v2\/wvn_doc"}],"about":[{"href":"https:\/\/www.wiven.ai\/en\/wp-json\/wp\/v2\/types\/wvn_doc"}],"up":[{"embeddable":true,"href":"https:\/\/www.wiven.ai\/en\/wp-json\/wp\/v2\/wvn_doc\/7451"}],"wp:attachment":[{"href":"https:\/\/www.wiven.ai\/en\/wp-json\/wp\/v2\/media?parent=7479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}