Skip to content

Fix empty tool calls (missing parameters) - #650

Merged
dwash96 merged 1 commit into
cecli-dev:v1.2.3from
ekr1:pr-fix-missing-tool-call-parameters
Aug 19, 2026
Merged

dwash96 merged 1 commit into
cecli-dev:v1.2.3from
ekr1:pr-fix-missing-tool-call-parameters

Conversation

@ekr1

@ekr1 ekr1 commented Aug 18, 2026

Copy link
Copy Markdown

I often had this issue:

    Tool Call: Local • EditFile

    Error in EditFile: Missing required parameters for EditFile: edits
    NoneType: None

    Tool Call: Local • ReadFile

    range_1:  •  • 

    Error in ReadFile: Missing required parameters for ReadFile: read
    NoneType: None

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 it
under the tool's single required array parameter (EditFile's edits, ReadFile's read). This was silently
collapsed to {}, producing Error in EditFile: Missing required parameters for EditFile: edits.

Fix: parse_tool_arguments now preserves a bare top-level array instead of dropping it, and
BaseTool/ToolValidations auto-wrap it under the tool's required array param (also handling the case where a single
array 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) by
removing a premature list short-circuit that bypassed merge_glued_json_objects.

@dwash96
dwash96 changed the base branch from main to v1.2.3 August 18, 2026 12:15
@ekr1

ekr1 commented Aug 18, 2026 •

Copy link
Copy Markdown
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:

Tool Call: Local • ReadFile

range_1:  •  • 

Errors encountered for 1 operation(s)

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...

@dwash96
dwash96 merged commit 6fbc4f1 into cecli-dev:v1.2.3 Aug 19, 2026
12 checks passed
@dwash96 dwash96 mentioned this pull request Aug 19, 2026
JessicaMulein pushed a commit to Digital-Defiance/cecli that referenced this pull request Sep 23, 2026
…arameters

Fix empty tool calls (missing parameters)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants