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
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 but explicit request_protocol differsReturn a configuration error instead of falling through
Selected provider protocol differs from inbound protocolUse the explicit translation pair if supported; otherwise fail explicitly