style(sse): condense flag-removal NOTE comment (review feedback)

Compresses the explanatory NOTE in claudeCodeToolRemapper.ts from 6 lines
to 4 while keeping the actionable why: the flag has no readers, would
leak into the Anthropic request body causing HTTP 400 (Extra inputs are
not permitted), and the response-side remap is unconditional.

Addresses gemini-code-assist review feedback on PR #2290.
This commit is contained in:
Mrinal Joshi
2026-05-16 00:31:03 +01:00
parent fa1d1fe7eb
commit 07f3b71fc9

View File

@@ -88,12 +88,10 @@ export function remapToolNamesInRequest(body: Record<string, unknown>): boolean
}
}
// NOTE: previously set body._claudeCodeRequiresLowercaseToolNames = true here.
// Removed: the flag had no readers in the codebase and leaked into the
// outgoing Anthropic request body, causing HTTP 400
// "_claudeCodeRequiresLowercaseToolNames: Extra inputs are not permitted".
// The response-side lowercase remap is unconditional anyway via
// remapToolNamesInResponse(text, forceLowercase=true).
// NOTE: do not set body._claudeCodeRequiresLowercaseToolNames here.
// The flag has no readers and would leak into the outgoing Anthropic
// request body, causing HTTP 400 (Extra inputs are not permitted).
// The response-side remap is unconditional via remapToolNamesInResponse.
return hasLowercase && !hasTitleCase;
}