Model Route Management
GPUStack provides model route management capabilities. Through model routes, you can implement model aliases, traffic distribution, disaster recovery, and unified entry for both public and private models.
Create Route
- Go to
Routespage. - Click
Add Route. - Fill the route
Nameas the serving model name. - Select one or more
Route Targets. - Click the
Savebutton.
Manage Route Targets
- Go to
Routespage. - Unfold the model route you want to manage targets for.
- Click the
Deletebutton inOperationscolumn for the target you don't want to keep. - Click the
Editbutton in theOperationscolumn. On the edit route page, add or remove targets for the model route, or adjust the traffic weight for the targets. - On the edit route page, select or clear the fallback route target for this route.
Load Balancing
When a model route has multiple targets, GPUStack's gateway-side LB plugin decides which target serves each request. The routing behavior is derived from the route's configuration: the target weights and the enabled policy plugins (Session Affinity, Least Inflight Request, Decision Service Routing) together determine the Route By mode shown on the route.
Route By
The Route By column on the route list shows how requests are distributed across the route's targets. It is derived from the configuration — the target weights and the enabled policy plugins — computed by GPUStack on every route change, never client input.
| Route By | Configuration shape | Routing behavior |
|---|---|---|
Target Weight | Every target has a weight greater than 0 | Split traffic across targets by weight; every target must have a weight greater than 0 |
Policy | No weights, at least one policy plugin (Session Affinity, Least Inflight Request, Decision Service Routing) enabled on the route | Targets are picked by the enabled policy plugins |
| (round-robin) | No target has a weight and no policy enabled | Round-robin across targets |
Notes:
- Weights and policies are mutually exclusive: every target must carry a weight, or none of them may. A mixed configuration makes the route unavailable — set every target weight to greater than 0, or all to 0.
- Fallback targets never count as candidates; their weight is ignored by the mode derivation.
- The mode describes the configuration's shape, not live instance health — an all-weighted route stays
Target Weightwhile its instances are down.
Policy Plugins
Policy plugins participate in Policy routing: each one returns a score for every target, and the gateway picks the target with the best weighted sum. Each plugin's Weight (a positive number, fractional allowed) dials how much it counts in the sum; leaving it unset uses the plugin's built-in default.
Session Affinity
Route requests of the same session to the same target, keeping prompt caches warm. Sessions are identified by an ordered key chain.
Session Keys (Ordered, First Match Wins)— ordered chain of key sources; the first one that yields a value wins. Each entry is either a requestHeader(e.g.session-id) or aBody Key(e.g.prompt_cache_key). At least one session key is required when session affinity is enabled.
Least Inflight Request
Score targets by their number of inflight requests and prefer routing requests to the target with the fewest inflight requests.
When Session Affinity and Least Inflight Request are both enabled, session affinity rewards the sticky owner while least inflight request rewards the idle target. A session migrates away from its owner only when the least inflight request plugin's vote gap exceeds affinity's — at the default weights this happens easily on 2–3 target routes and never on routes with 5 or more targets. Tune the plugins' Weight to shift that balance; see Routing with LB Policies for the numbers and worked examples.
Decision Service Routing
Score targets by task difficulty: each request is sent (truncated) with a model-selection question to a Jev-compatible decision service — a TypeSafe Decision Service (Jev) provider on the Model - Provider page — whose answer becomes a weighted vote. Decision failures, timeouts, or non-2xx responses fall back silently to the other plugins.
Settings:
Decision Service— the decision service provider (required).Decision Model— route-level decision model, required when this policy is enabled. Options are read from the engines cached in the selected provider; if unset or invalid, decision routing is skipped and requests fall back to the other plugins.Instructions— extra guidance for the model-selection question sent to the decision service.Model Criteria— model name → capability description: the basis the decision service uses to pick a model. At least one criterion is required; entries can be generated from the route's targets.Weight— contribution weight in the weighted sum when combined with other policies; unset uses the built-in default (10).
See Routing with LB Policies for an end-to-end example routing between a small and a large model.
Fallback targets (fallback_status_codes) are handled by the separate fallback plugin and do not participate in LB candidate selection. A route can combine LB candidate splitting with fallback targets for disaster recovery.
Authorize Route Access
- Go to
Routespage. - Find the route for which you want to change the authorization setting.
- Click the
Access Settingsbutton in theOperationscolumn. - Change the
Access Scopeas needed. - For the
Allowed Usersscope, select the users you want to authorize for this route and click>to confirm. - Click the
Savebutton.
Edit Route
- Go to
Routespage. - Find the route you want to edit.
- Click the
Editbutton in theOperationscolumn. - Modify name, model category, description and route targets as needed.
- Click the
Savebutton.
Delete Route
- Go to
Routespage. - Find the route you want to delete.
- Click the
Deletebutton in theOperationscolumn. - Confirm the deletion.