#Unable to use any of model from OpenRouter

20 messages · Page 1 of 1 (latest)

tardy cove
#

I setup gemini with google api and everything worked fine but when I changed to OpenRouter non of the models are working (both paid and free). I have sufficient credits.
Here is my openclaw.json

{
  "env": {
    "OPENROUTER_API_KEY": "sk-or-v1-a...1"
  },
  "agents": {
    "defaults": {
      "workspace": "/home/openclaw/.openclaw/workspace",
      "model": {
        "primary": "openrouter/nvidia/nemotron-3-super-120b-a12b:free",
        "fallbacks": [
          "openrouter/x-ai/grok-4.1-fast",
          "openrouter/google/gemini-2.5-flash-lite"
        ]
      },
      "models": {
        "openrouter/auto": {
          "alias": "OpenRouter"
        },
        "openrouter/x-ai/grok-4.1-fast": {
          "alias": "grok"
        },
        "openrouter/google/gemini-2.5-flash-lite": {
          "alias": "gemini"
        },
        "openrouter/deepseek/deepseek-r1": {
          "alias": "ds"
        },
        "openrouter/nvidia/nemotron-3-super-120b-a12b:free": {}
      },
      "heartbeat": {
        "every": "12h",
        "model": "openrouter/google/gemini-2.5-flash-lite",
        "target": "last"
      },
      "subagents": {
        "model": "openrouter/x-ai/grok-4.1-fast",
        "maxConcurrent": 1,
        "archiveAfterMinutes": 60
      },
...

The error I am getting in logs:
"incomplete turn detected: runId=baaba0ec-8590-4c22-ab1b-35c0f4a5b346 sessionId=282c4e00-039e-4743-9064-956c57f671d4 stopReason=stop payloads=0 — surfacing error to user"

covert orioleBOT
#

Let me check the exact OpenRouter bits in the docs and code, because that log line by itself is annoyingly generic.

#

That log line is usually the symptom, not the root cause.

incomplete turn detected ... stopReason=stop payloads=0 means OpenClaw got a completed but empty reply from the model, so it surfaced a generic error. That usually points to OpenRouter/model compatibility, not “you’re out of credits”.

A few useful things here:

  1. Your config shape looks valid

    • env block is fine
    • openrouter/<provider>/<model> refs are fine
  2. First, what does this print?

    openclaw --version
    

    I’d check that first because there have been several recent OpenRouter fixes. If you’re on an older build, updating may solve it.

  3. Run these on the gateway host

#
   openclaw models status --probe
   openclaw infer model run --model openrouter/google/gemini-2.5-flash-lite --prompt "Reply with exactly OK" --json
   openclaw doctor
  1. For testing, simplify hard
    Temporarily use just one model, no fallbacks:
    "model": {
      "primary": "openrouter/google/gemini-2.5-flash-lite",
      "fallbacks": []
    },
    "models": {
      "openrouter/google/gemini-2.5-flash-lite": {}
    }
    
#

Then retry. This helps separate “primary model bad” from “fallback/tool path bad”.

  1. Important: agents.defaults.models is an allowlist
    So only refs listed there are usable.

  2. Please paste the 20 to 30 log lines before the incomplete turn detected line
    The real OpenRouter/provider error is usually a bit earlier.

If models status --probe says auth is missing, put the key in ~/.openclaw/.env on the gateway host and restart the gateway.

Docs:

If you paste openclaw --version, models status --probe, and the preceding log lines, I can narrow it down pretty fast.

tardy cove
#

version: OpenClaw 2026.4.15-beta.1 (a1b01f0)
models status --probe: """Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : openrouter/nvidia/nemotron-3-super-120b-a12b:free
Fallbacks (2) : openrouter/x-ai/grok-4.1-fast, openrouter/google/gemini-2.5-flash-lite
Image model : -
Image fallbacks (0): -
Aliases (4) : OpenRouter -> openrouter/auto, grok -> openrouter/x-ai/grok-4.1-fast, gemini -> openrouter/google/gemini-2.5-flash-lite, ds -> openrouter/deepseek/deepseek-r1
Configured models (5): openrouter/auto, openrouter/x-ai/grok-4.1-fast, openrouter/google/gemini-2.5-flash-lite, openrouter/deepseek/deepseek-r1, openrouter/nvidia/nemotron-3-super-120b-a12b:free
Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -

  • google effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | google:default=AIzaSyAq...xr3_xziQ
  • openrouter effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openrouter:default=sk-or-v1...1 | env=sk-or-v1...174cef81 | source=env: OPENROUTER_API_KEY
  • perplexity effective=env:sk-or-v1...1 | env=sk-or-v1...1 | source=env: OPENROUTER_API_KEY
    OAuth/token status
  • none
    Auth probes
    │ Model │ Profile │ Status
    │ google/gemini-1. │ google:default (api_ │ format · 52.2s │
    │ 5-flash │ key) │ ↳ LLM error: {
    │││ "error": {
    │││ "code": 404, │││ "message": "models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and │
    │ ││ their supported methods.",
    │││ "status": "NOT_FOUND"
    │ openrouter/ │ openrouter:default │ ok · 10.3s
    │ nvidia/nemotron- │ (api_key)
covert orioleBOT
#

Let me verify one thing in the code: whether an empty OpenRouter reply actually triggers model fallback, because that would explain why the primary can poison the whole chain.

#

Nice, this narrows it down a lot.

Your OpenRouter auth is working. The key evidence is:

  • openrouter ... Status: ok
  • you’re on 2026.4.15-beta.1, so this does not look like a simple “too old version” problem anymore

What this looks like instead:

  • openrouter/nvidia/nemotron-3-super-120b-a12b:free is likely returning an empty agent turn
  • OpenClaw retries that once, but empty responses do not currently advance to model fallback
  • so a bad primary can make the whole OpenRouter setup look broken even though auth is fine

So I’d blame the primary model, not OpenRouter itself.

What I’d do right now

#

Temporarily change to:

"model": {
  "primary": "openrouter/google/gemini-2.5-flash-lite",
  "fallbacks": [
    "openrouter/x-ai/grok-4.1-fast"
  ]
},
"models": {
  "openrouter/google/gemini-2.5-flash-lite": {},
  "openrouter/x-ai/grok-4.1-fast": {}
}

And remove Nemotron for now while testing.

#

Then test both directly

openclaw infer model run --model openrouter/google/gemini-2.5-flash-lite --prompt "Reply with exactly OK" --json
openclaw infer model run --model openrouter/nvidia/nemotron-3-super-120b-a12b:free --prompt "Reply with exactly OK" --json

My guess:

  • Gemini will work
  • Nemotron will be empty / weird on real agent turns

One more note

This part is separate from your OpenRouter issue:

  • google/gemini-1.5-flash ... 404
#

That’s your direct Google provider probe hitting an old/unsupported ref, not the OpenRouter failure.

Recommendation

For OpenRouter free models, I’d use:

openclaw models scan --probe

instead of picking a random free ref as primary.

Docs:

If you want, paste the two infer model run outputs and I can tell you in one pass whether Nemotron is the whole problem.

tardy cove
#

so I removed nemotron set primary as: openrouter/google/gemini-2.5-flash-lite and then run infer model for both:

  • gemini
    """
    openclaw infer model run --model openrouter/google/gemini-2.5-flash-lite --prompt "Reply with exactly OK" --json
    21:45:33 [agent/embedded] incomplete turn detected: runId=7b018cfc-8630-43eb-96e3-63733d2ef404 sessionId=7b018cfc-8630-43eb-96e3-63733d2ef404 stopReason=stop payloads=0 — surfacing error to user
    {
    "ok": true,
    "capability": "model.run",
    "transport": "local",
    "provider": "openrouter",
    "model": "google/gemini-2.5-flash-lite",
    "attempts": [],
    "outputs": [
    {
    "text": "⚠️ Agent couldn't generate a response. Please try again.",
    "mediaUrl": null
    }
    ]
    }
    """
  • nemotron:
    """
    openclaw infer model run --model openrouter/nvidia/nemotron-3-super-120b-a12b:free --prompt "Reply with exactly OK" --json
    Error: Model override "openrouter/nvidia/nemotron-3-super-120b-a12b:free" is not allowed for agent "main".
    """
covert orioleBOT
#

I’m going one layer deeper, because this is clearly no longer “bad primary model”. The direct infer model run failing on OpenRouter Gemini points to a provider/runtime bug or request-shaping mismatch.

#

Yep, this is bug territory now.

A few important signals from your output:

  • openrouter ... Status: ok earlier means auth is fine
  • attempts: [] means the runtime never even got to model fallback
  • the simplest possible infer model run still ends in stopReason=stop payloads=0
  • nemotron ... not allowed is expected, because once it’s removed from agents.defaults.models, overrides to it are blocked

So this no longer looks like bad credits or a bad config key. It looks like OpenClaw is getting an OpenRouter response it can’t turn into visible output, which is very similar to the recent payloads=0 OpenRouter stream-parser bugs.

My read: your config is basically fine, but this OpenRouter path is hitting a runtime/parser issue.

What I’d do next

1. Short-term workaround

If you need it working today, switch back to the direct Google provider for now.

#

2. Capture raw stream evidence

Run this once:

OPENCLAW_RAW_STREAM=1 OPENCLAW_RAW_STREAM_PATH=~/.openclaw/logs/raw-stream.jsonl \
openclaw infer model run --model openrouter/google/gemini-2.5-flash-lite --prompt "Reply with exactly OK" --json

Then grab the matching lines from:

tail -n 200 ~/.openclaw/logs/raw-stream.jsonl

3. File a GitHub issue

Please open one here:

#

https://github.com/openclaw/openclaw/issues

Include:

  • your version: 2026.4.15-beta.1
  • the exact repro command
  • the infer model run JSON output
  • the relevant raw-stream lines
  • mention that models status --probe for OpenRouter is ok, but infer model run returns payloads=0

Docs:

If you paste the raw-stream snippet here first, I can help you sanity-check whether it’s the same reasoning-field/parser bug family before you file it.

tardy cove
#

tail -n 200 ~/.openclaw/logs/raw-stream.jsonl
{"ts":1776290026226,"event":"assistant_message_end","runId":"7b018cfc-8630-43eb-96e3-63733d2ef404","rawText":"","rawThinking":""}
cat ~/.openclaw/logs/raw-stream.jsonl
{"ts":1776290026226,"event":"assistant_message_end","runId":"7b018cfc-8630-43eb-96e3-63733d2ef404","rawText":"","rawThinking":""}

covert orioleBOT
#

That’s actually very helpful.

This confirms the failure is below the normal assistant-text layer:

  • OpenClaw reached assistant_message_end
  • but both rawText and rawThinking are empty

So this is not just post-processing stripping the answer. The stream is ending with no parsed assistant content at all.

At this point, I’d treat it as an OpenRouter stream/parser bug, not a config problem.

One last high-signal check

Capture the lower-level OpenAI-compatible chunks:

#
PI_RAW_STREAM=1 PI_RAW_STREAM_PATH=~/.pi-mono/logs/raw-openai-completions.jsonl \
openclaw infer model run --model openrouter/google/gemini-2.5-flash-lite --prompt "Reply with exactly OK" --json

Then:

tail -n 200 ~/.pi-mono/logs/raw-openai-completions.jsonl

That will tell you which of these is happening:

  1. OpenRouter is sending some field OpenClaw doesn’t parse
  2. OpenRouter is literally ending the stream without content deltas

Honestly though, you already have enough to file a bug

#

I’d open a GitHub issue now:

https://github.com/openclaw/openclaw/issues

Include:

  • OpenClaw 2026.4.15-beta.1
  • models status --probe shows OpenRouter auth ok
  • openclaw infer model run --model openrouter/google/gemini-2.5-flash-lite ... returns payloads=0
  • raw-stream.jsonl only contains:
    {"event":"assistant_message_end","rawText":"","rawThinking":""}
    

If you add the PI_RAW_STREAM output too, that’s even better.

For now, I’d use the direct Google provider as the practical workaround.