The request timeout is progress-based, so a stream that keeps sending
data can outlive the in-flight read window. It then drops out of the
shared count. The count can only be too low for such streams.
With sharedState on, breaker.failureThreshold counts failed refreshes
across all route instances and replicas. It no longer counts three in a
row on one instance. The README and the wiring comment now say so.
Each served request spawned a second async write for the calibrator
counters. They now ride the batch accountWith already sends, and only
when shared state is on and a store is configured.
With redis.sharedState on, each observed sample also adds to day counters of prompt bytes, prompt tokens and sample count per model. The router-learning loop reads the counters of the routers' target models and keeps one fleet ratio per model. The estimate prefers that ratio once the fleet has the same minimum sample count as the local calibrator. Dropped counter writes only blur the estimate. With the switch off, the calibrator runs its local code only and makes no store call.
The decision-model breaker now also reads and writes the fleet breaker when redis.sharedState is on. Routers that use the same decision provider share one key. A client cancel is still not a failure. With the switch off, the decider runs its local code only and makes no store call.
A provider whose discovery fails often enough now reads as unhealthy on every pod when redis.sharedState is on. The shared breaker uses the same threshold and open times as the local one. The discovered model sets stay local. With the switch off, the provider state runs its local code only and makes no store call.
In-flight counts and the learned limit now merge the fleet view when redis.sharedState is on. The load a pod reports to the router and the saturation downgrade is the larger of its own count and the fleet count. A 429 halves the fleet count, not only the local one. With the switch off, the learner runs its local code only and makes no store call.
The request breaker now also reads and writes the fleet breaker when redis.sharedState is on. A pod that sees enough failures opens the breaker for every pod after one refresh. A success on any pod closes it again. With the switch off, the tracker runs its local code only and makes no store call.