Problem Statement
The cache_aware policy measures worker load with a gateway-local active request count. A short request and a very long prompt or reasoning decode each add one, even though their compute and KV-cache pressure differ by orders of magnitude. Cache affinity can therefore route into a hot worker.
Proposed Solution
Feed existing WorkerLoadResponse snapshots into cache_aware routing and add request token-cost reservations. Prefer cache locality only when the cache candidate remains within configurable engine-pressure bounds. Support shadow decisions, telemetry freshness checks, and consistent fallback when engine load is unavailable.
Alternatives Considered
Using power_of_two discards cache affinity. Using only token_usage reacts after engine polling and does not protect against bursts between polls. Moving routing into the caller duplicates gateway behavior.
Feature Area
Routing & Load Balancing
Affected Components
model-gateway, protocols, python-bindings
Use Case
Shared inference replicas receive heterogeneous prompt and output lengths. Routing must account for projected KV occupancy and observed queue or scheduler pressure while retaining prefix-cache benefits when safe.
Priority to You
Critical / Blocking
Contribution
Acceptance Criteria
Problem Statement
The cache_aware policy measures worker load with a gateway-local active request count. A short request and a very long prompt or reasoning decode each add one, even though their compute and KV-cache pressure differ by orders of magnitude. Cache affinity can therefore route into a hot worker.
Proposed Solution
Feed existing WorkerLoadResponse snapshots into cache_aware routing and add request token-cost reservations. Prefer cache locality only when the cache candidate remains within configurable engine-pressure bounds. Support shadow decisions, telemetry freshness checks, and consistent fallback when engine load is unavailable.
Alternatives Considered
Using power_of_two discards cache affinity. Using only token_usage reacts after engine polling and does not protect against bursts between polls. Moving routing into the caller duplicates gateway behavior.
Feature Area
Routing & Load Balancing
Affected Components
model-gateway, protocols, python-bindings
Use Case
Shared inference replicas receive heterogeneous prompt and output lengths. Routing must account for projected KV occupancy and observed queue or scheduler pressure while retaining prefix-cache benefits when safe.
Priority to You
Critical / Blocking
Contribution
Acceptance Criteria