fix(sse): propagate malformed Anthropic JSON

Merged
40
2mo ago
+92-12

Summary

  • propagate malformed JSON errors from Anthropic message_start and content_block_delta SSE frames
  • keep the error provider-specific and consistent with the OpenAI SSE parser
  • add parser regressions for both event types
  • add an end-to-end streaming regression that verifies the parser error releases the response body

Fixes #307

Verification

  • Reviewed the two-file diff against main
  • Local test execution was unavailable because this environment cannot resolve github.com; repository PR checks should provide the executable verification