Do not parse SSE events if not streaming
What does this MR do and why?
When response of Anthropic model includes data: and even if the request isn't streaming, parse_sse_events will still try to parse the response. It can fail since the format of the response is not really in the proper SSE format expected. We also don't need to parse SSE events if we're not streaming.
To fix that, we check if call for perform_completion_request and perform_messages_request have stream as true. If not, then we skip calling parse_sse_events.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #486900 (closed)