Move language model stream mapping to background executors (#63241)
Language model event mappers run as part of lazy completion streams.
Because these streams are polled on the main thread, repairing and
parsing large streamed tool inputs can freeze the UI.
This moves completion stream mapping to background executors. A bounded
channel preserves event order and backpressure, while dropping the
stream cancels its background task. The change covers all providers that
perform this work.
Release Notes:
- Fixed UI hangs when language model providers stream large tool inputs.
5ed5bf95e5Bennet Bo Fenner committed on 8/26/2026, 5:36:06 PM· committed by GitHubparent7ecab31