-
-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Description
Gemini models fail with 400 Bad Request when tool schemas contain JSON Schema validation keywords like exclusiveMinimum and exclusiveMaximum.
Error Message
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"exclusiveMinimum\" at 'request.tools[0].function_declarations[8].parameters.properties[2].value': Cannot find field.",
"status": "INVALID_ARGUMENT"
}
}Root Cause
In _clean_claude_schema() (src/rotator_library/providers/antigravity_provider.py), the validation_keywords_claude_only set contains these keywords, but the logic only strips them for Claude targets while preserving them for Gemini:
if key in validation_keywords_claude_only:
if for_gemini:
# Gemini accepts these - preserve them
cleaned[key] = value
# For Claude: skip - not supported
continueGemini's Proto-based API does NOT support these keywords and rejects them with "Unknown name" errors.
Affected Keywords
All keywords in validation_keywords_claude_only are affected:
exclusiveMinimum,exclusiveMaximumminimum,maximumminLength,maxLengthminItems,maxItemspattern,format- And others...
Suggested Fix
Strip these validation keywords for all targets (both Claude and Gemini), not just Claude.
Reference implementation: FammasMaz@3ad10fd
Metadata
Metadata
Assignees
Labels
No labels