refactor(stream): harden forwarding and hook composition
shinmentakezo07+1: Claude Opus 4.6
76d784c
Refactor stream forwarding to centralize option resolution and terminal completion handling, preventing closed error channels from spinning while preserving terminal-error precedence. Add reusable pipeline hook composition/round-tripper adapters and improve Codex provider compatibility by forwarding Codex hint headers and normalizing the reasoning_effort alias.
- extracts stream forwarder helpers for keep-alive setup, terminal error draining, and finish behavior
- adds regression tests for terminal error precedence/cancel behavior and hook composition utilities
- forwards Codex hint headers and maps reasoning_effort to reasoning.effort for request normalization
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
refactor codex request normalization and stream event parsing