Routing Configuration¶
File: app/config/routing.py
Controls version resolution when a client omits "version" in the request body. If no rule exists for a model and the client omits version, the request fails with HTTP 400.
Strategies¶
static¶
Always routes to a fixed version.
canary¶
"my_model": {
"strategy": "canary",
"primary": "v1",
"canary": "v2",
"canary_percent": 10, # 10% to v2
}
Routes canary_percent% of traffic to the canary version using random.randint — not deterministic per request.
ab¶
Deterministic split based on SHA-256 hash of X-Request-ID. Same request ID always routes to the same version. Requires a non-null request ID.
Current defaults¶
ROUTES = {
"echo": {
"strategy": "canary",
"primary": "v1",
"canary": "v2",
"canary_percent": 50,
},
}
See Routing concept for implementation details.