You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Gemini rejects tool declarations with empty-string enum values (answer_commit) #1531
Every request to a Gemini model (google/* or google-vertex/*) that includes the analyst agent's answer_commit tool fails before the model runs:
APIError (status 400): * GenerateContentRequest.tools[0].function_declarations[44].parameters.properties[unresolved].any_of[1].enum[0]: cannot be empty
answer_commit wraps its optional fields in a union that accepts "" (strict-schema providers fill unused properties with empty strings). That z.literal("") is emitted as const: "" / enum: [""], and the Gemini API rejects empty-string enum values. The Gemini branch of ProviderTransform.schema stringifies enum values but does not drop empty ones.
Expected: the Gemini schema sanitizer removes empty-string enum/const values, so any tool whose schema contains them can be declared to Gemini. Runtime Zod validation of tool arguments is unchanged.
Activity
fix: drop empty-string enum values from Gemini tool schemas (#1532)
sahrizvi commentedon Oct 23, 2026
Resolved in v0.12.8.