◈ Gemini API/2026-06-27Advanced
Your Gemini Structured Output Keys Keep Reordering — Pin Them With propertyOrdering
You constrained the shape with responseSchema, yet the JSON key order shifts between calls and your snapshot tests go red for no reason. Here is why field order is not guaranteed by default, how propertyOrdering fixes it, how Pydantic sets it for you, and how to align few-shot examples — all with working code.
◈ Gemini API/2026-05-03Intermediate
Snapshot Testing Gemini API Responses with pytest and syrupy
A practical guide to stabilizing Gemini API tests using pytest snapshot testing with syrupy — covering structure validation, temperature=0 limitations, and API call caching strategies.