The /compact command was failing with 'Proto field is not repeating, cannot start list' error for Claude models because tool schemas were sent with lowercase JSON Schema types (array, object, string) but Google's Cloud Code API expects uppercase protobuf types (ARRAY, OBJECT, STRING). Changes: - Add toGoogleType() function to convert JSON Schema types to Google format - Add Phase 5 to cleanSchemaForGemini() for type conversion - Apply cleanSchemaForGemini() for ALL models (not just Gemini) since all requests go through Cloud Code API which validates schema format - Add comprehensive test suite with 10 tests covering nested arrays, complex schemas, and real-world Claude Code tool scenarios Fixes #82
11 KiB
11 KiB