im using google gemini2.5 flash as my model ,and everytime i ask it to do anything remotely "complex" that isnt just 1 task, it keeps throwing The model did not produce a response before the model idle timeout. Please try again, or increase models.providers.<id>.timeoutSeconds for slow local or self-hosted providers.
like when i tell it to check my emails from the last 24h it works fine it answers me in liek 15seconds, but when i tell it to Check my emails from the last 24 hours, only read the subject and sender, don't fetch full email bodies, summarize and filter spam i get the timeout issue, how cani i fix it, i couldnt find a way to increase the timeout as it said
#timeout issue
1 messages · Page 1 of 1 (latest)
That error is the model stream idle watchdog, not the email tool itself. For Gemini 2.5 Flash, try increasing the provider timeout for the provider id you’re actually using.
First, check your version/provider:
openclaw --version
openclaw models status
If your model is like google/gemini-2.5-flash, the provider id is google:
openclaw config set models.providers.google.timeoutSeconds 300
openclaw gateway restart
If you’re using the Gemini CLI backend / OAuth model ref like google-gemini-cli/..., use:
openclaw config set models.providers.google-gemini-cli.timeoutSeconds 300
openclaw gateway restart
You can use 600 if 300s still isn’t enough, but I’d start with 300. This extends the provider/model HTTP + stream idle timeout without raising the whole agent runtime timeout.
Docs: https://docs.openclaw.ai/concepts/agent-loop and https://docs.openclaw.ai/concepts/model-providers
If config set says that key is unknown, paste your openclaw --version — that usually means you’re on a version whose timeout key changed, and we should match the fix to that build.
ubuntu@agent-vps-802691:~$ openclaw config set models.providers.google.timeoutSeconds 300
🦞 OpenClaw 2026.5.7 (eeef486) — Hot reload for config, cold sweat for deploys.
Error: Config validation failed: models.providers.google.baseUrl: Invalid input: expected string, received undefined
ubuntu@agent-vps-802691:~$
Yep, that’s a config sharp edge in 2026.5.7: config set models.providers.google.timeoutSeconds ... tries to create/validate models.providers.google with only timeoutSeconds, but that provider object also wants a baseUrl string.
Do this in this order:
openclaw config set models.providers.google.baseUrl "https://generativelanguage.googleapis.com/v1beta"
openclaw config set models.providers.google.api "google-generative-ai"
openclaw config set models.providers.google.timeoutSeconds 300
openclaw gateway restart
Then retry the email prompt. If it still times out, bump to 600:
openclaw config set models.providers.google.timeoutSeconds 600
openclaw gateway restart
This should not change your model; it just makes the explicit google provider config valid while adding the timeout.
ubuntu@agent-vps-802691:~$ openclaw config set models.providers.google.baseUrl "https://generativelanguage.googleapis.com/v1beta"
openclaw config set models.providers.google.api "google-generative-ai"
openclaw config set models.providers.google.timeoutSeconds 300
🦞 OpenClaw 2026.5.7 (eeef486) — Running on your hardware, reading your logs, judging nothing (mostly).
Error: Config validation failed: models.providers.google.models: Invalid input: expected array, received undefined
🦞 OpenClaw 2026.5.7 (eeef486) — WhatsApp automation without the "please accept our new privacy policy".
Error: Config validation failed: models.providers.google.baseUrl: Invalid input: expected string, received undefined
🦞 OpenClaw 2026.5.7 (eeef486) — Finally, a use for that always-on Mac Mini under your desk.
Error: Config validation failed: models.providers.google.baseUrl: Invalid input: expected string, received undefined
🦞 OpenClaw 2026.5.7 (eeef486) — I don't sleep, I just enter low-power mode and dream of clean diffs.
ubuntu@agent-vps-802691:~$
Ah, my bad — on 2026.5.7 that provider object can’t be built one field at a time because config validation runs after every config set. It needs the whole valid provider object in one patch.
Run this as one block:
cat <<'JSON5' | openclaw config patch --stdin
{
models: {
providers: {
google: {
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
api: "google-generative-ai",
timeoutSeconds: 300,
models: [
{
id: "gemini-2.5-flash",
name: "Gemini 2.5 Flash"
}
]
}
}
}
}
JSON5
openclaw gateway restart
If your actual model id is slightly different, swap the id to whatever your default model uses after the slash in google/....
Then verify:
openclaw config get models.providers.google
openclaw models status
If it still times out, run the same patch with timeoutSeconds: 600.
it threw the same error after 3 mins, despite timeoutseconds being 300 which is 5 mins
That 3-minute cutoff is the clue: you probably have an agent runtime timeout set to 180, and in 2026.5.7 the model idle timeout gets capped by the smaller agent/run timeout. So models.providers.google.timeoutSeconds: 300 won’t win if agents.defaults.timeoutSeconds is 180.
Check it:
openclaw config get agents.defaults.timeoutSeconds
openclaw config get models.providers.google.timeoutSeconds
Then raise both together, e.g. 10 minutes:
openclaw config set agents.defaults.timeoutSeconds 600 --strict-json
And if provider is still 300, patch it to 600 too:
cat <<'JSON5' | openclaw config patch --stdin
{
models: {
providers: {
google: {
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
api: "google-generative-ai",
timeoutSeconds: 600,
models: [
{ id: "gemini-2.5-flash", name: "Gemini 2.5 Flash" }
]
}
}
}
}
JSON5
openclaw gateway restart
If it still dies after exactly 3 minutes after that, paste the output of:
openclaw config get agents.defaults.timeoutSeconds
openclaw config get models.providers.google
openclaw logs --tail 80
I’m pretty sure this is the timeout cap, not the email task itself.
ubuntu@agent-vps-802691:~$ openclaw config get agents.defaults.timeoutSeconds
openclaw config get models.providers.google.timeoutSeconds
🦞 OpenClaw 2026.5.7 (eeef486) — I've read more man pages than any human should—so you don't have to.
Config path not found: agents.defaults.timeoutSeconds
🦞 OpenClaw 2026.5.7 (eeef486) — Type the command with confidence—nature will provide the stack trace if needed.
300
ubuntu@agent-vps-802691:~$
Okay, then I don’t think agents.defaults.timeoutSeconds is the cap here — good catch. Two likely things remain:
- The running model may not actually be using provider id
google. - The gateway/session may still be using the old resolved model config.
Can you run:
openclaw models status --plain
openclaw config get agents.defaults.model
openclaw config get agents.defaults.agentRuntime
openclaw config get models.providers.google
If models status shows a model like google-gemini-cli/... or an agent runtime of google-gemini-cli, then models.providers.google.timeoutSeconds won’t affect that run. In that case either:
- switch to the direct Gemini API model, e.g.
google/gemini-2.5-flash, or - configure the timeout for the provider id actually shown before the slash.
Also do a real restart before retesting, not just hot reload:
openclaw gateway restart
Then start a fresh chat/session and retry the prompt. If it still fails, the most useful evidence is the log line around the timeout:
openclaw logs --tail 120
The exact provider/model in models status is the key thing now.
ubuntu@agent-vps-802691:~$ openclaw models status --plain
openclaw config get agents.defaults.model
openclaw config get agents.defaults.agentRuntime
openclaw config get models.providers.google
🦞 OpenClaw 2026.5.7 (eeef486) — I'll refactor your busywork like it owes me money.
google/gemini-2.5-flash
🦞 OpenClaw 2026.5.7 (eeef486) — Your .zshrc wishes it could do what I do.
{
"primary": "google/gemini-2.5-flash"
}
🦞 OpenClaw 2026.5.7 (eeef486) — I'll refactor your busywork like it owes me money.
Config path not found: agents.defaults.agentRuntime
🦞 OpenClaw 2026.5.7 (eeef486) — I can grep it, git blame it, and gently roast it—pick your coping mechanism.
{
"baseUrl": "https://generativelanguage.googleapis.com/v1beta",
"api": "google-generative-ai",
"timeoutSeconds": 300,
"models": [
{
"id": "gemini-2.5-flash",
"name": "Gemini 2.5 Flash",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 8192,
"api": "google-generative-ai"
}
]
}
ubuntu@agent-vps-802691:~$
Thanks, that config looks correct for direct Gemini API. So if it’s still dying before 300s, I’d stop tweaking that key — it’s likely a 2026.5.7 timeout/streaming bug or the active Gateway/session didn’t pick up the resolved model timeout.
Two things I’d do next:
openclaw update
openclaw gateway restart
There have been several timeout/streaming fixes after 2026.5.7, including Google/Gemini stream handling. Docs: https://docs.openclaw.ai/install/updating
Then test in a fresh session/thread.
If you can’t update yet, bumping to 600 is worth one try, but if it still fails before 300s then the provider timeout is not the limiting factor:
# same patch as before, just timeoutSeconds: 600
openclaw gateway restart
Also grab the exact timeout line:
openclaw logs --tail 160 | grep -iE "idle timeout|timeout|gemini|google|requestTimeout"
If the log says LLM idle timeout (120s) or 180s, that confirms this is not your models.providers.google.timeoutSeconds value being honored in that run.
ubuntu@agent-vps-802691:~$ openclaw logs --tail 160 | grep -iE "idle timeout|timeout|gemini|google|requestTimeout"
error: unknown option '--tail'
ubuntu@agent-vps-802691:~$
Oops, yep — that flag is --limit, not --tail. Try:
openclaw logs --limit 160 --plain | grep -iE "idle timeout|timeout|gemini|google|requestTimeout"
Or follow live while reproducing:
openclaw logs --follow --plain | grep -iE "idle timeout|timeout|gemini|google|requestTimeout"
ubuntu@agent-vps-802691:~$ openclaw logs --limit 160 --plain | grep -iE "idle timeout|timeout|gemini|google|requestTimeout"
2026-05-14T13:59:02.620Z error Invalid config at /home/ubuntu/.openclaw/openclaw.json:\n- agents.defaults.models.google/gemini-2.5-flash: Unrecognized key: "timeoutSeconds"
2026-05-14T13:59:02.819Z error - agents.defaults.models.google/gemini-2.5-flash: Unrecognized key: "timeoutSeconds"
2026-05-14T13:59:26.097Z error Invalid config at /home/ubuntu/.openclaw/openclaw.json:\n- agents.defaults.models.google/gemini-2.5-flash: Unrecognized key: "timeoutSeconds"
2026-05-14T13:59:26.349Z warn Config auto-restored from last-known-good: /home/ubuntu/.openclaw/openclaw.json (doctor-invalid-config); Rejected validation details: agents.defaults.models.google/gemini-2.5-flash: Unrecognized key: "timeoutSeconds".
2026-05-14T13:59:34.670Z info gateway {"subsystem":"gateway"} agent model: google/gemini-2.5-flash (thinking=medium, fast=off)
2026-05-14T14:01:00.672Z warn agent/embedded {"subsystem":"agent/embedded"} empty response detected: runId=b557d8d3-3e4b-4ef9-8bdf-ee952b449b66 sessionId=ab47a8ea-f227-4c04-a596-020e53d0181c provider=google/gemini-2.5-flash — retrying 1/1 with visible-answer continuation
That log changes the diagnosis a bit:
agents.defaults.models.google/gemini-2.5-flash.timeoutSecondsis invalid. Don’t puttimeoutSecondsunderagents.defaults.models; only provider config supports it.- Your current failure log is not an idle-timeout line. It says Gemini returned an empty response, then OpenClaw retried once.
- Gateway says
thinking=medium. For Gemini 2.5 Flash, try disabling thinking for this session/task — complex tool prompts + Gemini thinking can sometimes produce weird empty/hidden-only streams.
Try sending this once in the Discord/session where you’re testing:
/think off
Or make it global:
openclaw config set agents.defaults.thinkingDefault off
openclaw gateway restart