Quota is decreasing even if model keeps return nothing

The quota is decreasing, but I am getting no responses from any models: Gemini 2.5 pro, Gemini 2.5 flash, Gemini 2.5 flash lite. Here is how it looks like:

"[SYSTEM] Step [cognitive] on model [gemini-2.5-flash] returned an empty response (Attempt 18/50). Retrying in 3s..." 
Warning
 "[SYSTEM] Step [cognitive] on model [gemini-2.5-flash] returned an empty response (Attempt 19/50). Retrying in 3s..." 
Warning
 "[SYSTEM] Step [cognitive] on model [gemini-2.5-flash] returned an empty response (Attempt 20/50). Retrying in 3s..." 
Warning
 "[SYSTEM] Step [cognitive] on model [gemini-2.5-flash] returned an empty response (Attempt 21/50). Retrying in 3s..." 
Warning
 "[SYSTEM] Step [cognitive] on model [gemini-2.5-flash] returned an empty response (Attempt 22/50). Retrying in 3s..." 
Warning
 "[SYSTEM] Step [cognitive] on model [gemini-2.5-flash] returned an empty response (Attempt 23/50). Retrying in 3s..." 
Error
 "[SYSTEM] Step [cognitive] on model [gemini-2.5-flash] failed on attempt 24/50:"  "{\"error\":{\"code\":429,\"message\":\"You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits.\",\"status\":\"RESOURCE_EXHAUSTED\"}}" 
Error
 "[SYSTEM] Step [cognitive] on model [gemini-2.5-flash] failed on attempt 25/50:"  "{\"error\":{\"code\":429,\"message\":\"You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits.\",\"status\":\"RESOURCE_EXHAUSTED\"}}"

Here is another try:

Error
 "[gemini-2.5-pro] Model failed:"  "Received empty response from the model." 
Warning
 "[SYSTEM] Model gemini-2.5-pro failed. Marking as dead and trying next." 
Error
 "[gemini-2.5-flash] Model failed:"  "Received empty response from the model." 
Warning
 "[SYSTEM] Model gemini-2.5-flash failed. Marking as dead and trying next." 
Error
 "[FATAL] All models failed after exhausting fallbacks." 
Error
 "Polling error:"  "All available models are failing." 
Error
 "Polling error:"  "Bad Request: message is not modified: specified new message content and reply markup are exactly the same as a current content and reply markup of the message" 
Error
 "Polling error:"  "Bad Request: message is not modified: specified new message content and reply markup are exactly the same as a current content and reply markup of the message" 
Error
 "Polling error:"  "Bad Request: query is too old and response timeout expired or query ID is invalid" 
Error
 "Polling error:"  "Bad Request: query is too old and response timeout expired or query ID is invalid" 
Error
 "Polling error:"  "Bad Request: query is too old and response timeout expired or query ID is invalid" 
Error
 "Polling error:"  "Bad Request: query is too old and response timeout expired or query ID is invalid"

Hi @user2739 ,

Could you please provide the minimum reproducible code so we can test it on our end?

⚙️
API Call Failed [PHYSICS] (gemini-2.5-flash-lite) (Length: 1 578)
09:18:56
Error
All 50 attempts failed for step [physics]. Last error: Received empty response from the model on attempt 50.
Request Prompt

### CURRENT WORLD STATE ###
{
  "player_status": {
    "injuries": [],
    "clothing": {
      "name": "Деловой костюм с галстуком",
      "properties": []
    },
    "location": "Неизвестно",
    "poseState": {
      "primary": "standing",
      "description": "стоит"
    }
  },
  "partner_status": {
    "injuries": [],
    "clothing": {
      "name": "Неизвестно",
      "properties": []
    },
    "location": "Неизвестно",
    "poseState": {
      "primary": "standing",
      "description": "стоит"
    },
    "resonance": 0
  },
  "world_objects": [],
  "known_locations": [],
  "active_quests": []
}
###########################

### PLAYER ACTION ###
"Начать историю с Бантик"
###########################

### PARTNER'S INTENTION (from Cognitive Model) ###
Self-Reflection: Мы с Тоха здесь, и мне немножко не по себе от того, что я так голодна и испытываю жажду. И Тоха, наверное, тоже чувствует себя неважно. Куда мы попали? Надеюсь, скоро всё станет ясно.
Tactical Goals: Постараться понять, где мы находимся.; Найти что-то съестное или выпить, если Тоха тоже хочет.; Оставаться рядом с Тоха.
###########################

TASK: Based on the player's action and the partner's intention, determine the precise physical changes to the world state. 
You MUST update the poseState of ALL characters involved in an action, including the actor (player).
You MUST preserve existing constraints unless the action explicitly removes them.
Respond ONLY with a valid JSON array conforming to the state_updates schema. If there are no physical changes, return an empty array [].
Raw Response
[No Response Body]

Same prompt with Gemini 2.0-flash:

⚙️
API Call Succeeded [PHYSICS] (gemini-2.0-flash) (Length: 1 706)
12:22:19
Request Prompt

### CURRENT WORLD STATE ###
{
  "player_status": {
    "injuries": [],
    "clothing": {
      "name": "Деловой костюм с галстуком",
      "properties": []
    },
    "location": "Неизвестно",
    "poseState": {
      "primary": "standing",
      "description": "стоит"
    }
  },
  "partner_status": {
    "injuries": [],
    "clothing": {
      "name": "Неизвестно",
      "properties": []
    },
    "location": "Неизвестно",
    "poseState": {
      "primary": "standing",
      "description": "стоит"
    },
    "resonance": 0
  },
  "world_objects": [],
  "known_locations": [],
  "active_quests": []
}
###########################

### PLAYER ACTION ###
"Начать историю с Бантик"
###########################

### PARTNER'S INTENTION (from Cognitive Model) ###
Self-Reflection: Я стою и чувствую, как мои лапки слегка онемели от неизвестности. Внутри так пусто, и это неприятно. Мне хочется сжаться, но я стараюсь выглядеть спокойной, чтобы не показать свою слабость или неловкость Тоха. Я не знаю, что делать дальше, но нужно быть осторожной.
Tactical Goals: Наблюдать за Тоха и его действиями.; Постараться понять, что происходит вокруг и где мы находимся.; Искать безопасный способ облегчить свои нужды, если это возможно.
###########################

TASK: Based on the player's action and the partner's intention, determine the precise physical changes to the world state. 
You MUST update the poseState of ALL characters involved in an action, including the actor (player).
You MUST preserve existing constraints unless the action explicitly removes them.
Respond ONLY with a valid JSON array conforming to the state_updates schema. If there are no physical changes, return an empty array [].

Raw Response
[
  {
    "action": "SET_LOCATION",
    "payload": {
      "location": "Парк (Центральная аллея)"
    }
  },
  {
    "action": "SET_POSE_STATE",
    "payload": {
      "description": "стоит, оглядываясь по сторонам",
      "location": "Парк (Центральная аллея)",
      "name": "Тоха",
      "value": {
        "primary": "standing",
        "constraints": []
      }
    },
    "target": "player"
  },
  {
    "action": "SET_POSE_STATE",
    "payload": {
      "description": "стоит, робко переминаясь с лапки на лапку",
      "location": "Парк (Центральная аллея)",
      "name": "Бантик",
      "value": {
        "primary": "standing",
        "constraints": []
      }
    },
    "target": "partner"
  },
  {
    "action": "SET_CLOTHING",
    "payload": {
      "name": "Розовое платье по колени с пышными белыми рукавами и большим бантом на груди"
    },
    "target": "partner"
  }
]

Hi @user2739,

This issue mostly arises due to the model’s safety filters that flag something in your prompt, even if it doesn’t seem harmful.

Try modifying your API call to include the safety_settings parameter. Set the threshold for different categories to BLOCK_NONE or BLOCK_ONLY_HIGH. This tells the model to be less strict.