Repository navigation
Fix empty tool calls (missing parameters) - #650
Merged
dwash96 merged 1 commit intoAug 19, 2026
Merged
Conversation
…ray param instead of dropping them
Author
|
Update: I did work a bit more with these changes active and still have some spurious issues with local command calls, more along the lines of these: I don't know if this is related to this PR. Generally cecli became a bit fickle for me in the recent days; it may be the skills/instructions I use (i.e. caveman) confusing it. Unless you think that the code in this PR is good and useful, best park it for now and I'll come back to it later with more debugging on my side. Also note that I am always working in dumb terminal mode, not TUI; may be different... |
Merged
JessicaMulein
pushed a commit
to Digital-Defiance/cecli
that referenced
this pull request
Sep 23, 2026
…arameters Fix empty tool calls (missing parameters)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I often had this issue:
This would go on and on until the LLM eventually gave up, or managed to provide the parameters correctly. Since working with this change, the issue seems to have gone away for me as far as I can tell.
Detailled (generated) explanation:
Local models sometimes emit tool-call arguments as a bare JSON array (e.g.
[{...}, {...}]) instead of wrapping itunder the tool's single required array parameter (
EditFile'sedits,ReadFile'sread). This was silentlycollapsed to
{}, producingError in EditFile: Missing required parameters for EditFile: edits.Fix:
parse_tool_argumentsnow preserves a bare top-level array instead of dropping it, andBaseTool/ToolValidationsauto-wrap it under the tool's required array param (also handling the case where a singlearray item is sent directly as a dict). Validation ordering changed so shape-correction runs before the missing-param
check.
Fixed a regression this introduced in the "glued JSON objects" merge path (
{"a":1}{}{"b":2}style fragments) byremoving a premature list short-circuit that bypassed
merge_glued_json_objects.