Compare commits

...

1 Commits

Author SHA1 Message Date
openhands 40b586c74c Add enable_bash configuration option to AgentConfig
- Rename enable_cmd to enable_bash in AgentConfig for better naming consistency
- Follow existing pattern of enable_browsing and enable_jupyter
- When set to false, disables the bash tool for the LLM
- Update config template to use new field name
- Maintain backward compatibility through field renaming
2025-06-20 18:20:03 +00:00
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -228,8 +228,8 @@ enable_editor = true
# Whether the IPython tool is enabled
enable_jupyter = true
# Whether the command tool is enabled
enable_cmd = true
# Whether the bash tool is enabled
enable_bash = true
# Whether the think tool is enabled
enable_think = true
@@ -112,7 +112,7 @@ class CodeActAgent(Agent):
)
tools = []
if self.config.enable_cmd:
if self.config.enable_bash:
tools.append(create_cmd_run_tool(use_short_description=use_short_tool_desc))
if self.config.enable_think:
tools.append(ThinkTool)
+1 -1
View File
@@ -22,7 +22,7 @@ class AgentConfig(BaseModel):
enable_jupyter: bool = Field(default=True)
"""Whether to enable Jupyter tool.
Note: If using CLIRuntime, Jupyter use is not implemented and should be disabled."""
enable_cmd: bool = Field(default=True)
enable_bash: bool = Field(default=True)
"""Whether to enable bash tool"""
enable_think: bool = Field(default=True)
"""Whether to enable think tool"""