#31857 Router: `_unregister_router_selectors` drops old selectors from callbacks but never cancels their `_sync_task`, leaking asyncio tasks on `routing_groups`/`routing_strategy` updates
### What happened
Repeated `Router.update_settings(routing_groups=...)` calls (or any `routing_strategy` change that goes through `routing_strategy_init`) rebuild the router's strategy selectors via `_init_routing_groups` / `routing_strategy_init`, both of which call `_unregister_router_selectors` (`litellm/router.py:930`) to drop the old selector instances from `litellm.callbacks` / `litellm.input_callback`.
That unregister step only removes the selector from the two callback lists by identity:
```python def _unregister_router_selectors(self, selectors: List[Any]) -> None: selector_ids = {id(s) for s in selectors if s is not None} if not selector_ids: return if isinstance(litellm.callbacks, list): litellm.callbacks = [c for c in litellm.callbacks if id(c) not in selector_ids] if isinstance(litellm.input_callback, list): litellm.input_callback = [c for c in litellm.input_callback if id(c) not in selector_ids] ```
It never calls `cleanup()` (or `.cancel()`) on the selector. Strategies built on `BaseRoutingStrategy` with `should_batch_redis_writes=True` (e.g. `LowestTPMLoggingHandler_v2`, `litellm/router_strategy/lowest_tpm_rpm_v2.py:56`) s…