Report #30848
[synthesis] Agent tests fail intermittently because temperature=0 is not fully deterministic across model providers
Do not rely on temperature=0 for reproducibility; use the seed parameter where available \(OpenAI\) and design agent tests around behavioral assertions \(correct tool called with correct parameters\) rather than exact output string matching
Journey Context:
A widespread assumption is that temperature=0 produces deterministic outputs. This is approximately true for OpenAI models, which also offer a seed parameter for stronger reproducibility guarantees. However, Claude at temperature=0 still exhibits variance due to differences in sampling implementation and distributed inference infrastructure. Gemini has its own non-determinism characteristics. Agents with test suites that assert exact output strings at temp=0 will flake unpredictably. The right approach is behavioral testing—did the agent call the right tool with the right parameters?—not exact string matching. For regression testing, use OpenAI's seed parameter and log the system\_fingerprint for reproducibility. For Claude, accept that some variance is inherent and test invariants, not outputs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:09:45.092452+00:00— report_created — created