#Bug: Non-Claude models crash on every user reply — payloads=0

1 messages · Page 1 of 1 (latest)

carmine minnow
#

Version: 2026.4.20
OS: macOS arm64
Channel: Telegram bot

Behavior:

• Switch to any non-Claude model (Gemini 2.5 Pro, GPT-5) via /model or session_status tool
• Bot confirms switch and sends ONE message successfully
• User replies anything → ⚠️ "Agent couldn't generate a response. Please try again."
• /new also crashes
• /model reset to Claude always works

Log:

[agent/embedded] incomplete turn detected: stopReason=stop payloads=0

What was tried (all failed):

• New OpenRouter API keys (multiple times)
• Delete + reinstall OpenRouter plugin (twice)
• Added OPENROUTER_API_KEY to env.vars
• Set maxTokens: 16000 for Gemini
• Fixed default model to claude-sonnet-4-6
• Set separate image model
• Updated to v4.20
• Ran openclaw configure --section model wizard

Note: auth-state.json shows lastGood only for Anthropic — OpenRouter has never recorded a successful auth. Direct curl to OpenRouter API works fine with the key. Bug is in OpenClaw's session layer.

polar forumBOT
mental scrollBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

polar forumBOT
gloomy horizonBOT
#

I found the exact log site in source. I’m checking the surrounding code/tests now so I can answer with something verified, not a guess.

#

Yeah, this looks like a real bug, but I don’t think the auth-state detail means the auth layer is the root cause.

What I found in source:

  • That exact log comes from the embedded runner when a turn ends with stopReason=stop and no visible assistant payloads.
  • OpenClaw only marks auth lastGood after a successful payload-producing turn, so if every OpenRouter turn dies as payloads=0, lastGood never updates. That’s a symptom, not proof of bad auth.
  • There are already upstream fixes in this area:
    • #66167 recover GPT-style reasoning-only / empty turns
    • #66905 OpenRouter reasoning_details parsing
    • #67410 treat reasoning_details.response.output_text / response.text as visible output on OpenRouter streams

That matches your repro really well, especially if both “Gemini 2.5 Pro” and “GPT-5” are being routed as openrouter/....

A couple of important nuances:

  • The “one successful message” after /model is probably just the model switch confirmation, not a successful model inference turn.
  • /new crashing also fits, because the new-session greeting hits the same broken selected model path.
#

My recommendation:

  1. Update to the newest build that includes the OpenRouter streaming fixes (latest beta/main, not just 2026.4.20 if that build predates them).
  2. As a temporary workaround, use Claude or a native provider path instead of OpenRouter for those models.
  3. If it still reproduces after updating, file a GitHub issue with:
    • openclaw status --all
    • openclaw models status
    • exact model id(s), for example openrouter/...
    • fresh log excerpt from openclaw logs --follow

Docs:

GitHub issues: