Gemini 2.0 Flash: No Response / Fake Tools

Gemini 2.0 is fast and cheap, but it often "hallucinates" tool calls (pretending to run code without actually running it) or fails to respond due to API format mismatches.

The Symptoms

  • Bot stays silent after you send a message.
  • Logs show TOOL_CALL but nothing happens.
  • Error: 400 Bad Request or 429 Rate Limit.

Fix 1: Use the Correct Model Name

Google changes model names frequently. Using gemini-pro often defaults to an old, deprecated version.

Recommended Config:

agent: {
  model: "gemini-1.5-flash"  // or "gemini-2.0-flash-exp"
},
models: {
  provider: "google",
  baseUrl: "https://generativelanguage.googleapis.com/v1beta"
}

Fix 2: Use OpenRouter Wrapper

Direct Google API integration in Moltbot can be buggy. Using OpenRouter standardizes the request format, fixing most "silent bot" issues.

How to switch to OpenRouter

  1. Get a key from openrouter.ai.
  2. Use our Config Generator to generate this:
models: {
  provider: "openrouter",
  baseUrl: "https://openrouter.ai/api/v1"
},
agent: {
  model: "google/gemini-2.0-flash-001"
}

Fix 3: "Fake Tool Call" Loop

If the bot says "I have checked the weather" but never actually ran the tool, it's a hallucination.

Solution: Lower the temperature in your config to 0.0 or switch to gemini-1.5-pro which follows instructions better than Flash.