-
-
Notifications
You must be signed in to change notification settings - Fork 68.9k
[Bug] Independent agents receive empty responses from OpenAI-compatible providers (yunwu-openai) — input_tokens: 0, content: [] #27509
Copy link
Copy link
Open
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Description
Independent agents (created via openclaw agents add) receive empty responses from OpenAI-compatible proxy providers (e.g., yunwu-openai), while the same provider/model works correctly via sessions_spawn from the main agent.
Environment
- OpenClaw version: 2026.2.25 (4b5d4a4)
- OS: macOS (Darwin 25.2.0 arm64)
- Node: v24.13.0
- Provider: yunwu-openai (OpenAI-compatible proxy for Gemini models)
- Models tested:
gemini-3.1-pro-preview,gemini-3-flash-preview-nothinking
Steps to Reproduce
- Create an independent agent:
openclaw agents add thoth --model "yunwu-openai/gemini-3.1-pro-preview" \ --workspace ~/.openclaw/agents/thoth/workspace \ --agent-dir ~/.openclaw/agents/thoth/agent --non-interactive
- Configure Feishu account for the agent, add binding with
match.accountId - Copy
models.jsonfrom main agent to thoth agent dir - Send a message to the agent via Feishu
Expected Behavior
Agent responds with model-generated content.
Actual Behavior
Agent runs successfully (isError=false) but produces replies=0. Session JSONL shows:
{
"role": "assistant",
"content": [],
"provider": "yunwu-openai",
"model": "gemini-3.1-pro-preview",
"usage": {
"input": 0,
"output": 0
},
"stopReason": "stop"
}Root Cause Analysis
Direct curl test to the same API returns valid content:
{
"choices": [{"message": {"role": "assistant", "content": "Hello! How can I help you today?"}}],
"usage": {
"prompt_tokens": 4,
"completion_tokens": 222,
"total_tokens": 226,
"input_tokens": 0,
"output_tokens": 0
}
}The provider returns two sets of token counts:
prompt_tokens/completion_tokens: correct values (4 / 222)input_tokens/output_tokens: always 0
OpenClaw appears to read input_tokens / output_tokens (both 0) and may interpret this as an empty/invalid response, discarding the actual content.
Key Observations
sessions_spawnwith the same model works — the main agent can successfully call yunwu-openai/gemini-3.1-pro-preview via subagentdeepseek/deepseek-chatworks for independent agents — switching the model to DeepSeek produces normal responses- All yunwu-openai models fail for independent agents (tested gemini-3.1-pro, gemini-3-flash)
- The API itself is functional (confirmed via curl)
Workaround
Use non-OpenAI-compatible providers (e.g., deepseek/deepseek-chat, zhihui/claude-opus-4-6) for independent agents.
Related Issues
- GLM-5 model switching fails for main agent (works for other agents) #15716 (GLM-5 model switching fails — "Only 5 tokens sent, suggests malformed/empty request")
- Agents silently mutate openclaw.json config (model/auth settings changed without user consent) #24237 (Agents silently mutate openclaw.json config)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.