- NutritionParser now handles short key aliases (protein/carbs/fat instead of
proteinGrams/carbsGrams/fatGrams), string-typed numbers, surrounding prose,
and multi-line markdown fences reliably
- safeInt/safeDouble helpers check multiple key names in priority order and
handle Number, String, and missing values without throwing
- Nutrition prompt now includes an explicit JSON example so all models return
the expected format regardless of their default style
- Same fixes applied to web app parseEstimate (aliases + fence stripping)
- Extended NutritionParserTest to cover aliases, string numbers, surrounding text
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>