Context Budget
Before selecting a model, the router checks whether the conversation fits in the model’s context window. Models that can’t fit the conversation are automatically excluded.context_tokens is not provided, TokenSense estimates it from message content using a 4-chars-per-token approximation. Pass the exact count if you have it:
Per-Call Overrides
Override routing behaviour on a per-call basis.Routing Decision
router.route() always returns a RoutingDecision object.
CallEvent as routed_tier, so your output captures which tier was used for each call.
on_failure
Controls what happens when a model call fails.Routing Decision
router.route() always returns a RoutingDecision object.
CallEvent as routed_tier, so your output captures which tier was used for each call.
