Roo-Code/packages
Roo Code ce12e2f725 feat: add experimental malformed JSON repair for tool calls
This adds support for repairing malformed JSON in LLM tool call responses,
particularly useful for models like Grok that struggle with strict JSON formatting.

Changes:
- Add jsonrepair dependency for JSON repair functionality
- Create json-repair utility module with tryRepairJson, repairJson, parseWithRepair, isValidJson
- Integrate repair logic into NativeToolCallParser.parseToolCall()
- Add malformedJsonRepair experimental setting (disabled by default)
- Wire up experiment toggle in Task.ts

The feature is gated behind an experimental flag and only activates when:
1. The experiment is enabled in settings
2. Standard JSON.parse() fails on tool call arguments

This addresses issue #10481 regarding BAML for parsing LLM output, using
a simpler jsonrepair approach as an initial solution.
2026-01-06 13:39:21 +00:00
..
build Custom tool calling (#10083) 2025-12-21 12:43:06 -08:00
cloud ux: Provider-centric signup (#10306) 2025-12-23 14:59:29 -08:00
config-eslint Upgrade to ESLint 9 + share eslint config across workspaces (#3815) 2025-05-21 21:30:21 -07:00
config-typescript Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
core Add support for npm packages and .env files to custom tools (#10336) 2025-12-26 09:43:35 -08:00
evals Add an option to use our cli for evals (#10456) 2026-01-05 11:33:19 -08:00
ipc Better IPC error logging (#9727) 2025-12-01 15:02:34 -08:00
telemetry feat(telemetry): add PostHog exception tracking for consecutive mistake errors (#10193) 2025-12-18 12:59:37 -08:00
types feat: add experimental malformed JSON repair for tool calls 2026-01-06 13:39:21 +00:00
vscode-shim VSCode shim + basic cli (#10452) 2026-01-05 10:24:05 -08:00