fix(agents): harden Cloud Code Assist compatibility

- Expand schema scrubber to strip additional constraint keywords rejected
  by Cloud Code Assist (examples, minLength, maxLength, minimum, maximum,
  multipleOf, pattern, format, minItems, maxItems, uniqueItems,
  minProperties, maxProperties)
- Extend tool call ID sanitization to cover toolUse and toolCall block
  types (previously only functionCall was sanitized)
- Update pi-tools test to include 'examples' in unsupported keywords

Fixes 400 errors when using google-antigravity/claude-opus-4-5-thinking:
- tools.N.custom.input_schema: JSON schema is invalid
- messages.N.content.N.tool_use.id: String should match pattern
This commit is contained in:
Sebastian Barrios
2026-01-10 11:02:06 -05:00
committed by Peter Steinberger
parent ef08c3f038
commit 64babcac7a
3 changed files with 33 additions and 13 deletions

View File

@@ -384,6 +384,7 @@ describe("createClawdbotCodingTools", () => {
"$ref",
"$defs",
"definitions",
"examples",
]);
const findUnsupportedKeywords = (