Gemini 2.5 flash 05-20 refusing to use certain tool calls

I have a payload that works fine on all Gemini APIs (2.5 pro exp, 2.0 flash, etc) but for some reason is not working in under 2.5 flash 05-20

{
  "generationConfig": {},
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "sam: make a simple hello world artifact"
        }
      ]
    }
  ],
  "systemInstruction": {
    "role": "system",
    "parts": [
      {
        "text": "You are a helpful bot"
      }
    ]
  },
  "tools": [
    {
      "function_declarations": [
        {
          "name": "create_artifact",
          "description": "Creates a web artifact based on a specification",
          "parameters": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "A name for the artifact"
              },
              "specification": {
                "type": "string",
                "description": "specifications"
              }
            },
            "required": []
          }
        }
      ]
    }
  ]
}

When i call it it simply returns:

data: {"promptFeedback": {"blockReason": "OTHER"},"usageMetadata": {"promptTokenCount": 78,"totalTokenCount": 78,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 78}]},"modelVersion": "models/gemini-2.5-flash-preview-05-20"}

I tested with a simple ā€œechoā€ tool call and it works, but this rather simple one fails.

Any ideas why this would be blocked on blockReason OTHER? Is a the latest Flash 2.5 being over protective.

I am facing the same issue with a simple get current day and get weather example tool:

class GetCurrentWeather(BaseM):
        """
        Gets the current weather
        """

        location: str = Field(..., description="The location of the weather")
        unit: str = Field(..., description="The unit of the temperature")

    class GetCurrentDay(BaseM):
        """
        Gets the current day
        """

        location: str = Field(..., description="The location of the day")

Without any tools it works. The same code works for gemini-2.5-flash-preview-04-17.

1 Like

Hi,

Thank you for bringing this to our attention, really appreciate flagging it. I have tested it on my end and confirmed that there is an issue with function calling in the newly updated gemini-2.5-flash-preview-05-20 model. I will escalated this issue to our product engineering team for a thorough investigation and resolution.

6 Likes

Hi @GUNAND_MAYANGLAMBAM ,
When can we expect feedback on this?
Thanks in advance

is this issue still exist? because i use 2.5 flash thinking if i use tools the same thing will happen too

I can confirm I’m having the same issue with gemini-2.5-flash-preview-native-audio-dialog. It’s calling functions inconsistently.

This is very consistent where it will attempt to just end the conversation with a missing reason when thinking is involved. Otherwise, when thinking is disabled, tool calling works better.

Are there any more updates?
I’m just using the built-in example tools and still can’t, and it says ā€˜Content Not Permitted’.
Even though the prompt wasn’t much, I was just asking how things are :3