Across all future generations of models, the temperature, top_k, and top_p parameters will produce an error.
This warning now appears in the Gemini API documentation. For the time being, the API simply ignores these parameters.
Adjusting a model’s “temperature” makes it more or less deterministic by changing the probability gap between tokens.
The top_k and top_p parameters limit the choice of tokens to the most probable ones. In the first case, the number of tokens is fixed. In the second, it varies (dependent on reaching a given percentage of the total probability mass).
Managing determinism through prompting
To control determinism, Google now encourages defining explicit rules in the system prompt.
Anthropic does the same. It had initially blocked, with the Claude 4.1 family, the joint use of temperature and top_p. Beginning with Claude Opus 4.7 and Sonnet 5, it dropped them as well as top_k. Reason: these sampling parameters no longer align with the internal logic of the models’ reasoning.
Meanwhile, the combination “extended thinking + token budget + temperature” gave way to an “adaptive thinking,” with separate parameters to manage the level of reasoning and verbosity.
The sampling parameters, on the way out
OpenAI followed suit. With the o1 model and its successors, one can control the level of reasoning but cannot modify the sampling parameters. This includes presence_penalty and frequency_penalty. The former applies a fixed penalty to words that have already appeared in the generated text. The latter applies a proportional penalty based on the number of appearances.
The models in the GPT-5 family are treated in the same way. Probably for the same reason: tweaking the temperature would disrupt the generation process inherent to these reasoning models.
The speech-to-speech API is also affected. The underlying model “almost always performs better” with a fixed temperature value (0.8), according to OpenAI. It also advises, here as well, to play with prompting to influence the level of creativity.