Skip to content

Route Matching

Route matching selects a provider for one inbound request. Provider protocol then decides the outbound wire behavior.

FieldRole
nameOptional stable identifier used by --route-override
request_protocolOptional inbound protocol guard: openai_responses, openai_chat_completions, or anthropic_messages
match_kindexact, glob, regex, or auto; use an explicit kind when pattern syntax is ambiguous
model_patternLogical model selector matched against the inbound model
providerProvider name selected when the route matches
upstream_modelOptional model rewrite applied before the provider request is serialized
ConditionOutcome
Model does not match any explicit routeUse routing.default_provider_names.<inbound_protocol>
Model matches and request_protocol is omittedRoute can match the detected inbound protocol
Model matches and explicit request_protocol equals detected protocolUse the route provider
Model matches an explicit request_protocol that differsContinue scanning for a later model match with a compatible protocol; if none exists, return a configuration error instead of using the default provider
Selected provider protocol differs from inbound protocolUse the explicit translation pair if supported; otherwise fail explicitly