Bug Report
OpenClaw Version: 2026.3.8 (3caab92)
Severity: High — failover silently produces invalid API requests
What happens
When the primary Anthropic profile times out and OpenClaw fails over to a Google/Gemini profile, the Anthropic→Gemini message format conversion leaves function_response.name empty on every tool result in the conversation history.
Gemini requires function_response.name to match the original function_call.name. The converter is not populating this field.
Error
GenerateContentRequest.contents[2].parts[0].function_response.name: Name cannot be empty.
GenerateContentRequest.contents[4].parts[0].function_response.name: Name cannot be empty.
... (repeats for every tool result, up to contents[168])
Status: INVALID_ARGUMENT (400)
Reproduction
- Configure both
anthropic:* and google:* auth profiles
- Have a long conversation with many tool calls (50+)
- Cause Anthropic to timeout (e.g. during heavy load)
- Observe failover to Google profile
- Every
function_response in the converted history has an empty name
Root cause (suspected)
Anthropic format stores tool results as tool_result blocks with tool_use_id. The tool name lives on the original tool_use block in the assistant message. When converting to Gemini format, the converter needs to look up the matching tool_use block by ID to get the name. This lookup appears to be missing.
Additionally, LCM (lossless context management) summarization may be stripping or not preserving tool names in compacted summaries, making the lookup impossible for older messages.
Log evidence
[agent/embedded] Profile anthropic:manual timed out. Trying next account...
[agent/embedded] google turn ordering fixup: prepended user bootstrap
[agent/embedded] embedded run agent end: isError=true error=LLM error: INVALID_ARGUMENT
This occurred 5 times across cron jobs and interactive sessions.
Workaround
Remove google:default from auth.profiles to prevent Gemini failover.
Expected behavior
The converter should populate function_response.name for every tool result by matching tool_use_id back to the corresponding tool_use block's name.
Bug Report
OpenClaw Version: 2026.3.8 (3caab92)
Severity: High — failover silently produces invalid API requests
What happens
When the primary Anthropic profile times out and OpenClaw fails over to a Google/Gemini profile, the Anthropic→Gemini message format conversion leaves
function_response.nameempty on every tool result in the conversation history.Gemini requires
function_response.nameto match the originalfunction_call.name. The converter is not populating this field.Error
Status:
INVALID_ARGUMENT(400)Reproduction
anthropic:*andgoogle:*auth profilesfunction_responsein the converted history has an emptynameRoot cause (suspected)
Anthropic format stores tool results as
tool_resultblocks withtool_use_id. The tool name lives on the originaltool_useblock in the assistant message. When converting to Gemini format, the converter needs to look up the matchingtool_useblock by ID to get the name. This lookup appears to be missing.Additionally, LCM (lossless context management) summarization may be stripping or not preserving tool names in compacted summaries, making the lookup impossible for older messages.
Log evidence
This occurred 5 times across cron jobs and interactive sessions.
Workaround
Remove
google:defaultfromauth.profilesto prevent Gemini failover.Expected behavior
The converter should populate
function_response.namefor every tool result by matchingtool_use_idback to the correspondingtool_useblock's name.