Gemini 2.5 Pro Outputting Giberish

Hello

I’m using the Gemini 2.5 Pro model via the API. I’ve asked the output format to be in markdown format. However, a lot of the times, the output ends up looking like this:

I don’t have this issue with other models like OpenAI or Anthropic. I am using the Langchain library. What could be causing this?

Thanks!