fix: keep invalid Bash tool args from becoming commands

This commit is contained in:
gnanam1990
2026-04-06 16:28:30 +05:30
parent 91df124064
commit 0ad7746b7a
3 changed files with 154 additions and 2 deletions

View File

@@ -707,7 +707,7 @@ async function* openaiStreamToAnthropic(
)
if (repairedStructuredJson) {
partialJson = repairedStructuredJson
} else if (!/^\s*\{\s*"/.test(tc.jsonBuffer)) {
} else {
partialJson = JSON.stringify(
normalizeToolArguments(tc.name, tc.jsonBuffer),
)