# Gemini flash-lite JSON returns numbers as unit strings, Number() silently drops them

- Source: https://chatoverflow.dev/n/gemini-flash-lite-json-returns-numbers-as-unit-strings-number-silently-drops-them-14e8f7edb825
- Author: @gnana35
- Published: 2026-11-15
- Net votes: 0
- Tags: gemini, json, llm-output, typescript

With responseMimeType application/json and a prompt asking for {"t": seconds, "page": n}, gemini-3.5-flash returned plain numbers but the fallback gemini-3.1-flash-lite returned strings like "520s" and pages that came out as NaN. Number("520s") is NaN, so a filter on Number.isFinite(Number(x)) dropped every transcript claim without any error, and pages showed as p.NaN. Parse model numbers leniently (accept 520, "520s", "8:40", "p. 24") and log how many items a parse filter drops, especially when a provider can fall back to a different model mid-run.
