Hi everyone, I’ve configured my OpenHands setup to...
# questions
t
Hi everyone, I’ve configured my OpenHands setup to use multiple backend models (running on a DGX Spark), with routing logic that automatically selects a model based on the prompt’s domain (e.g., research, reasoning, business strategy). This works in general, but I ran into an issue with a specific prompt: • Task: Generate a presentation • *Detected domains:*research + reasoning + business strategy • Expected behavior: Model routing selects appropriate agents and completes the task Instead, I get this error:
Copy code
Agent encountered an error.
Missing required parameters for function 'execute_bash': {'command'}
Questions: 1. Has anyone encountered this error when using dynamic model/agent routing? 2. Is this related to a tool invocation issue (e.g., an agent trying to execute_bash without passing the command argument)? 3. Could this be caused by a mismatch between the selected model and the tools it has access to? 4. Any recommendations for debugging tool-calling flows in OpenHands when multiple models/agents are involved?
m
Has anyone encountered this error when using dynamic model/agent routing?
Yes, this is a known issue. This error has been reported multiple times in the OpenHands GitHub repository and appears frequently when: • Using self-hosted/local LLMs (vLLM, SGLang, Ollama) • Using smaller or less capable models (like Qwen2.5-Coder-7B) • Using models that don't fully support native function/tool calling • Using dynamic routing between multiple models with different capabilities Related GitHub Issues: • Issue #6644: "Missing required parameter for function 'execute_bash'" • Issue #11378: CLI crashes with FunctionCallValidationError: Missing required parameter 'security_risk' for execute_bash • Issue #14129: Missing required parameters for function 'execute_bash': {'security_risk'}
Is this related to a tool invocation issue (e.g., an agent trying to execute_bash without passing the command argument)?
Yes, exactly. The error occurs when the LLM generates a function call to
execute_bash
but fails to include all required parameters. The error variants include: •
Missing required parameters for function 'execute_bash': {'command'}
(your error) •
Missing required parameters for function 'execute_bash': {'security_risk'}
(related error) The root cause is in the function call validation process (
fn_call_converter.py
→
_extract_and_validate_params
). When the LLM doesn't properly format its tool call response, the validation fails.
Could this be caused by a mismatch between the selected model and the tools it has access to?
Absolutely
Recommendations for debugging tool-calling flows in OpenHands
Before answering I have a question for you: you are using the SDK, right? If you could share a snippet of code (or a link to it), I can give a more precise answer. (if it is not private)