#28530 [Bug]: Ollama Gemma 4 Infinite Tool Loop: Role mismatch ("tool" vs "tool_responses")
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
### Description When using **Gemma 4 (cloud)** model (gemma4:31b-cloud) via the **Ollama** provider in LiteLLM, the model enters an infinite tool-calling loop. Even after the tool result is provided in the conversation history, the model fails to recognize the result and repeatedly triggers the same tool call.
This occurs because Gemma 4 (via Ollama) expects the tool result role to be `tool_responses`, but LiteLLM standardizes it to the OpenAI-compatible `tool` role. Because of this mismatch, the model ignores the result and hallucinates that the tool was never executed.
### Root Cause & Evidence This is a known semantic mismatch in how Gemma 4 handles tool roles compared to the OpenAI standard. The model specifically looks for `tool_responses` to terminate the tool-use phase. When it receives the standardized `tool` role, it does not recognize the output as a valid result, leading it to believe the tool was never called.
**Reference:** This issue was identified and fixed in the Google ADK project here: [https://github.com/google/adk-pytho…