Bug Description
Summary
The patch tool's conditionally required parameters (old_string/new_string for replace mode, patch for patch mode) are systematically omitted when the tool is called via the standard tool-calling mechanism. This results in schema validation errors regardless of model (tested on kimi-k2.6 and kimi-k2.5).
Environment
- Platform: Hermes Agent CLI
- Models tested: kimi-k2.6, kimi-k2.5
- Tool affected:
patch
Steps to Reproduce
- Attempt to call
patch in replace mode with old_string and new_string:
{
"mode": "replace",
"path": "/tmp/test.txt",
"old_string": "line2",
"new_string": "line2_modified"
}
Expected: Tool executes successfully.
Actual: Error "old_string and new_string required".
- Attempt to call
patch in patch mode with patch parameter:
{
"mode": "patch",
"path": "/tmp/test.txt",
"patch": "*** Begin Patch\n*** Update File: /tmp/test.txt\n@@ context @@\n-line2\n+line2_modified\n*** End Patch"
}
Expected: Tool executes successfully.
Actual: Error "patch content required".
Expected Behavior
Tool executes successfully.
Actual Behavior
Actual: Error "patch content required".
Affected Component
CLI (interactive chat)
Messaging Platform (if gateway-related)
No response
Debug Report
Report https://paste.rs/gUkOC
agent.log https://paste.rs/zsFxN
Operating System
Ubuntu 24.04
Python Version
No response
Hermes Version
No response
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
No response
Proposed Fix (optional)
No response
Are you willing to submit a PR for this?
Bug Description
Summary
The
patchtool's conditionally required parameters (old_string/new_stringforreplacemode,patchforpatchmode) are systematically omitted when the tool is called via the standard tool-calling mechanism. This results in schema validation errors regardless of model (tested on kimi-k2.6 and kimi-k2.5).Environment
patchSteps to Reproduce
patchinreplacemode withold_stringandnew_string:{ "mode": "replace", "path": "/tmp/test.txt", "old_string": "line2", "new_string": "line2_modified" }Expected: Tool executes successfully.
Actual: Error
"old_string and new_string required".patchinpatchmode withpatchparameter:{ "mode": "patch", "path": "/tmp/test.txt", "patch": "*** Begin Patch\n*** Update File: /tmp/test.txt\n@@ context @@\n-line2\n+line2_modified\n*** End Patch" }Expected: Tool executes successfully.
Actual: Error
"patch content required".Expected Behavior
Tool executes successfully.
Actual Behavior
Actual: Error
"patch content required".Affected Component
CLI (interactive chat)
Messaging Platform (if gateway-related)
No response
Debug Report
Operating System
Ubuntu 24.04
Python Version
No response
Hermes Version
No response
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
No response
Proposed Fix (optional)
No response
Are you willing to submit a PR for this?