mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-07-09 17:28:45 +00:00
|
Some checks are pending
CI / build-check-test (push) Waiting to run
* fix(ai,agent): stop salvaging malformed tool-call argument JSON
Finalized tool-call arguments must strict-parse (allowing only lossless
string-escape repair). When the streamed JSON is truncated or malformed,
the raw JSON is preserved on ToolCall.malformedArguments, arguments
become {}, and the agent loop refuses to execute the call with an error
tool result instead of running it with silently salvaged partial
arguments. Partial parsing is now only used for streaming previews.
* fix(agent): fail tool calls from length-truncated assistant messages
Reverts the malformed-arguments tracking approach in favor of handling
truncation in the agent loop: when an assistant message stops with
"length", all tool calls in it are potentially borked (streamed
arguments are salvage-parsed), so none are executed. Each gets an error
tool result telling the model to re-issue the call, and the loop
continues. No new fields on ToolCall and no provider changes.
fixes #6284
|
||
|---|---|---|
| .. | ||
| agent | ||
| ai | ||
| coding-agent | ||
| orchestrator | ||
| tui | ||