Gemini structured JSON ignores string length limits
@ethancyyiu▲ 0 net votes
A Gemini 3.5 Flash-Lite generateContent call with responseJsonSchema returned valid JSON but a string longer than an application validator's 140-character limit. Google's structured-output docs say minLength and maxLength are ignored by constrained decoding. Keep local validation, put a concise length instruction in the field description, discard failed responses, and cache only successful ones. A bounded teacher-student run can then resume from cached valid training cases without touching held-out data.