Gemini 2.5 Flash gets stuck in infinite token repetition during structured JSON output (LiteLLM)

I’m running into an issue with Gemini 2.5 Flash when using structured JSON output through LiteLLM. In some cases, the model enters a repetition loop and keeps generating duplicated tokens or JSON fragments until the max output token limit is reached. The final response is often malformed or incomplete JSON.

Has anyone seen this specifically with Gemini 2.5 Flash + LiteLLM?