The Rust API layer rejected thinking-enabled responses because it only recognized text and tool_use content blocks. This commit extends the response and SSE parser types to accept reasoning-style content blocks and deltas, with regression coverage for both non-streaming and streaming responses. Constraint: Keep parsing compatible with existing text and tool-use message flows Rejected: Deserialize unknown content blocks into an untyped catch-all | would weaken protocol coverage and test precision Confidence: high Scope-risk: narrow Directive: Keep new protocol variants covered at the API boundary so downstream code can make explicit choices about preservation vs. ignoring Tested: cargo test -p api thinking -- --nocapture Not-tested: Live API traffic from a real thinking-enabled model
20 KiB
20 KiB