copilot-sdk icon indicating copy to clipboard operation
copilot-sdk copied to clipboard

Temperature / Determinism control

Open georges-nasrallah opened this issue 5 months ago • 2 comments

I reviewed the documentation and been working with the copilot SDK for a while, their is no option to control the temperature, the only parameter that is kind of related to determinism on an inference level knob is the "reasoning_effort" but that has its advantages and disadvantages. I was wondering if someone has found a method or a solution to make the Agent deterministic, I may have missed a workaround or a parameter.

georges-nasrallah avatar Jun 03 '26 08:06 georges-nasrallah

The SDK generally exposes higher-level controls rather than low-level knobs that get sent directly to the actual inference backend. This especially makes sense since low-level options tend to differ across the various models, so an option that works on one model wouldn't work on another. A good example is temperature - Anthropic removed the ability to specify that in Opus 4.7 and later.

It's also worth noting that setting temperature to zero wouldn't necessarily make things 100% deterministic either, as there are other sources of non-determinism (e.g. parallel tool calls that don't return in a deterministic order).

roji avatar Jun 03 '26 20:06 roji

As explained above, the SDK intentionally doesn't expose temperature or other low-level sampling parameters: they differ across models (some newer models no longer accept a temperature at all), and even a temperature of 0 wouldn't make an agent run deterministic, since tool calls can complete in different orders and tool results vary. The supported model-level controls are the model choice and reasoningEffort on the session config. For more repeatable results, use precise instructions (system message or custom agents), limit the available tools, and constrain the output with responseSchema when you need structured data. Closing as answered — feel free to reopen if this doesn't cover your case.

Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.

patniko avatar Oct 26 '26 20:10 patniko