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

Still facing this issue

Hi @Usama_Jalal , the issue has been fixed. What error were you getting?

Could you share the sample code or something similar?

Thanks

Happens to me as well with the new flash 2.5, requests structure and content similar to what I’ve been running in last few months, suddenly getting non stop empty responses and block reason ā€œOtherā€

@GUNAND_MAYANGLAMBAM Any updates? this got worse over the last two days, almost every request I make either returns an empty structure or doesn’t follow my instructions at all.

Hey @Yovel_Cohen , Could you please share the sample code to reproduce the issue?

Thanks.

@GUNAND_MAYANGLAMBAM It doesn’t matter how I structure my requests, it seems like a request complexity issue, and just to mention the previous release of gemini 2.5 pro had the same issue.
once the prompt interleaves a lot of text, images and requests a structured output, the model seems to just ā€œgive upā€ and now I see the same with gemini 2.5 flash, on requests and data where it returned responses before the update.