mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-11-28 21:03:34 +08:00
- Derive a per-attempt cancellable context in executeStreamWithModelPool so failed, refreshed, or empty stream attempts are canceled before draining chunks. - Preserve the caller context across retries and pass attempt cancellation ownership into wrapStreamResultWithCancel for clean shutdown on completion, error, or cancellation. - Add regression tests covering model failover, credential failover, 401 refresh retries, empty streams, and post-handoff cancellation paths. Closes: #7745