Skip to content

[Bug]: LLM Error switching default agent from Gemini #43930

@riyubolted900-cyber

Description

@riyubolted900-cyber

Bug type

Regression (worked before, now fails)

Summary

LLM Error occurring when switched from Gemini to Grok and back during mid session. Resetting session also not resolving the issues. Ended up using Grok in the meanwhile. This seems to be not the case before Version: 2026.3.11

“Start a Discord thread session”
“Switch model gemini-flash-latest → Grok4 → gemini-flash-latest mid-session”
“Next message fails with INVALID_ARGUMENT / function_response.name empty”

Error:

LLM error: {
  "error": {
    "code": 400,
    "message": "* GenerateContentRequest.contents[31].parts[0].function_response.name: Name cannot be empty.\n* GenerateContentRequest.contents[33].parts[0].function_response.name: Name cannot be empty.\n* GenerateContentRequest.contents[37].parts[0].function_response.name: Name cannot be empty.\n",
    "status": "INVALID_ARGUMENT"
  }
}

Steps to reproduce

  1. Configure Gemini Latest Flash
  2. Change default to Grok or other model (during mid session maybe)
  3. Configure default to Gemini Latest Flash
  4. Gateway Restart

Expected behavior

Post Gateway restart, default should switch to Gemini from Grok.

Actual behavior

Errored out

OpenClaw version

Version: 2026.3.11

Operating system

macOS 15.4

Install method

now

Model

Gemini Flash latest

Provider / routing chain

gemini flash latest

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions