Determinism and Reproducibility
How seed forwarding works across providers and what guarantees LatentKit returns.
Use seed when a request needs repeatable behavior for tests, evals, or debugging. LatentKit forwards the seed only to providers that support a seed-like parameter and reports the result in determinism.
{
"messages": [{ "role": "user", "content": "Return one JSON action." }],
"seed": 42
}Successful responses include:
{
"determinism": {
"seed_requested": 42,
"seed_honored": true,
"provider_supports_seed": true
}
}If a routed provider does not support seeds, LatentKit drops the parameter before the upstream call and returns:
{
"determinism": {
"seed_requested": 42,
"seed_honored": false,
"provider_supports_seed": false,
"dropped_reason": "provider_does_not_support_seed"
}
}Provider support
| Provider | Upstream parameter | seed_honored when seed is sent |
|---|---|---|
| OpenAI | seed | true |
| xAI | seed | true |
| OpenRouter | seed | true |
| Mistral | random_seed | true |
| Gemini | seed | true |
| Anthropic | Not supported | false |
Prefer deterministic routing
For evals and test harnesses, send one of these headers with a seeded request:
prefer_deterministic: trueX-LK-Prefer-Deterministic: trueWhen this hint is present, LatentKit keeps the published policy strategy but ranks seed-supporting routes ahead of non-seed routes inside that strategy.
Reproducibility limits
Even with seed, two different providers will produce different outputs. Pin the model with your routing policy when exact reproducibility matters. Also log response.provider, response.model, response.id, and response.policy_version_id so you can tell whether a replay used the same route.