eager-appointment-68614
11/19/2025, 9:00 PMopenhands.sdk.conversation.exceptions.ConversationRunError: Conversation run failed for id=12d337ed-ed3d-4603-932e-8f3e7181601e: litellm.APIError: APIError: OpenAIException - Payload Too Large
The context size I've set for the vllm server is 256k tokens, so I doubt the payload is actually too large. I think I'm misconfiguring something with the tool calling. I'm passing in the flag --tool-call-parser qwen3_coder . The qwen3coder_tool_parser.py is in the same directory as the safetensors. Unsure what I'm doing wrong.limited-student-10747
11/19/2025, 9:03 PMeager-appointment-68614
11/19/2025, 9:18 PMVLLM_CMD="vllm serve \"${MODEL}\" \
--served-model-name \"${MODEL_NAME_RESOLVED}\" \
--host 0.0.0.0 --port 8080 \
--tensor-parallel-size ${TENSOR_PARALLEL_SIZE:-8} \
--pipeline-parallel-size ${PIPELINE_PARALLEL_SIZE:-1} \
--max-model-len ${MAX_MODEL_LEN:-131072} \
--gpu-memory-utilization ${GPU_MEM_UTIL:-0.85} \
--enable-expert-parallel \
--enforce-eager \
--disable-log-requests \
--uvicorn-log-level warning"
# Add tool calling flags if enabled
if [ "${ENABLE_AUTO_TOOL_CHOICE:-false}" = "true" ]; then
VLLM_CMD="${VLLM_CMD} --enable-auto-tool-choice"
fi
if [ -n "${TOOL_CALL_PARSER:-}" ]; then
VLLM_CMD="${VLLM_CMD} --tool-call-parser ${TOOL_CALL_PARSER}"
fi
Environment:
MODEL_NAME: qwen3
HF_HUB_CACHE: /tmp
VLLM_LOGGING_LEVEL: WARNING
POD_IP: (v1:status.podIP)
POD_NAMESPACE: sunny (v1:metadata.namespace)
TENSOR_PARALLEL_SIZE: 8
PIPELINE_PARALLEL_SIZE: 1
MAX_MODEL_LEN: 262144
ENABLE_AUTO_TOOL_CHOICE: true
TOOL_CALL_PARSER: qwen3_coder
GPU_MEM_UTIL: 0.85
I have verified that all the environment variables are being passed in correctly.
Here is the chat in openhands:
Message from User ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Hello
Tokens: ↑ input 0 • cache hit N/A • ↓ output 0 • $ 0.00
Message from Agent ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Hello! How can I help you today?
Tokens: ↑ input 6.03K • cache hit 0.00% • ↓ output 10 • $ 0.00
> Can you read the README in the current directory?
Agent running... (Press Ctrl-P to pause)
Message from User ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Can you read the README in the current directory?
Tokens: ↑ input 6.03K • cache hit 0.00% • ↓ output 10 • $ 0.00
Agent Action ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Predicted Security Risk: LOW
Thought:
I'll help you read the README in the current directory. Let me check what files are available first.
Action: FileEditorAction
Arguments:
kind: "FileEditorAction"
command: "view"
path: "/Users/sunny/Documents/openhands_test"
Tokens: ↑ input 12.1K • cache hit 0.00% • ↓ output 80 • $ 0.00
🔍 Agent created 1 action(s) and is waiting for confirmation:
1. file_editor: kind='FileEditorAction' command='view' path='/Users/sunny/Documents/openhands_test' file_text=None old_str...
Choose an option:
> Yes, proceed
Reject
Always proceed (don't ask again)
Auto-confirm LOW/MEDIUM risk, ask for HIGH risk
Hitting yes on that command returns the payload too large error.limited-student-10747
11/20/2025, 2:31 AMDEBUG_LLM=true to try to see the payload that’s being sent to the LM. Maybe there’s something really large in there?
If you can’t find anything weird in the payload, maybe you could hit vllm directly (outside of openhands) and try to send the same prompt.
And if you want to open up an issue on the repo we’d also be happy to have it recorded as well.
1. Enable LLM Completions Logging (Recommended)
The OpenHands agent-sdk has built-in support for logging LLM completions to files. You can enable this by setting environment variables:
```# Enable completions logging
export LOG_COMPLETIONS=true
# Optional: Specify where to save the logs (default is ./logs/completions)
export LOG_COMPLETIONS_FOLDER=/path/to/your/log/folder
# Then run the CLI
openhands```
This will create JSON files for each LLM call containing:
• The full request and response
• Token usage
• Cost information
• Timestamp and latency
2. Enable Debug Mode for LiteLLM (Advanced - Use with Caution)
For more verbose debugging that shows every detail of LLM interactions:
```# WARNING: This will expose sensitive information like API keys
export DEBUG_LLM=true
# You will be prompted to confirm you understand the risks
openhands```
⚠️ Never use this in production as it logs API keys and sensitive data.
3. Enable General Debug Logging
For more general logging output from OpenHands:
```# Enable debug mode
export DEBUG=true
# Or set a specific log level
export LOG_LEVEL=DEBUG
# Optionally enable file logging
export LOG_TO_FILE=true
export LOG_DIR=./logs
openhands```
eager-appointment-68614
11/20/2025, 3:33 AMeager-appointment-68614
11/20/2025, 4:54 AMlimited-student-10747
11/20/2025, 6:20 PMeager-appointment-68614
11/20/2025, 9:18 PMuv tool install openhands and launching openhands cli with just openhands. Providing the base url to the api and traffic is getting routed to a vllm server running fp16 Qwen/Qwen3-Coder-480B-A35B-Instruct. Critical flags for the vllm server are --enable-auto-tool-choice , --trust-remote-code, and --tool-call-parser qwen3_coder.
I suspect the issue may be qwen3-coder-480B's chat_template.jinja https://huggingface.co/Qwen/Qwen3-Coder-480B-A35B-Instruct/blob/main/chat_template.jinja
I wonder if it is a matter of me simply trying to do something that openhands is not meant for? Seems that openhands is meant for either chatgpt/claude api, or local llms. Not for full sized self hosted models.limited-student-10747
11/20/2025, 9:28 PMlimited-student-10747
11/20/2025, 9:30 PMeager-appointment-68614
11/20/2025, 9:32 PMeager-appointment-68614
11/21/2025, 1:02 AMMessage from User ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Hello
Tokens: ↑ input 0 • cache hit N/A • ↓ output 0 • $ 0.00
Message from Agent ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Hello! How can I help you today?
Tokens: ↑ input 6.03K • cache hit 0.00% • ↓ output 10 • $ 0.00
> How are you doing?
Agent running... (Press Ctrl-P to pause)
Message from User ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
How are you doing?
Tokens: ↑ input 6.03K • cache hit 0.00% • ↓ output 10 • $ 0.00
Agent Action ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Thought:
I'm doing well, thank you for asking! I'm here and ready to help with whatever you'd like to work on. How can I assist you today?
🤔 Thinking: The user is just greeting me. This is a simple conversation starter. I should respond politely and be ready to help with whatever task the user wants to accomplish. There's nothing
specific to do here beyond the initial greeting.
Tokens: ↑ input 12.09K • cache hit 0.00% • ↓ output 107 • $ 0.00
Agent Action ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Predicted Security Risk: LOW
Thought:
I'm doing well, thank you for asking! I'm here and ready to help with whatever you'd like to work on. How can I assist you today?
👀 View Task List
Tokens: ↑ input 18.27K • cache hit 0.00% • ↓ output 175 • $ 0.00
The input on the first message is 6k tokens, second is 12k tokens, third is 18k tokens.
Tool calls result in the "payload too large" error.limited-student-10747
11/21/2025, 1:12 PMeager-appointment-68614
11/21/2025, 8:13 PM