Temperature controls the randomness of AI model outputs. Adjusting this setting optimizes results for different tasks - from precise code generation to creative brainstorming. Temperature is one of the most powerful parameters for controlling AI behavior. A well-tuned temperature setting can dramatically improve the quality and appropriateness of responses for specific tasks.

Temperature is a setting (usually between 0.0 and 2.0) that controls how random or predictable the AI's output is. Finding the right balance is key: lower values make the output more focused and consistent, while higher values encourage more creativity and variation. For many coding tasks, a moderate temperature (around 0.3 to 0.7) often works well, but the best setting depends on what you're trying to achieve.
:::info Temperature and Code: Common Misconceptions Temperature controls output randomness, not code quality or accuracy directly. Key points:
Kilo Code uses a default temperature of 0.0 for most models, optimizing for maximum determinism and precision in code generation. This applies to OpenAI models, Anthropic models (non-thinking variants), LM Studio models, and most other providers.
Some models use higher default temperatures - DeepSeek R1 models and certain reasoning-focused models default to 0.6, providing a balance between determinism and creative exploration.
Models with thinking capabilities (where the AI shows its reasoning process) require a fixed temperature of 1.0 which cannot be changed, as this setting ensures optimal performance of the thinking mechanism. This applies to any model with the ":thinking" flag enabled.
Some specialized models don't support temperature adjustments at all, in which case Kilo Code respects these limitations automatically.
Here are some examples of temperature settings that might work well for different tasks:
These are starting points – it's important to experiment with different settings to find what works best for your specific needs and preferences.
Set Your Value: Adjust the slider to your preferred value
Temperature slider in Kilo Code settings panel
Create multiple API configuration profiles with different temperature settings:
How to set up task-specific temperature profiles:
This approach optimizes model behavior for specific tasks without manual adjustments.
Kilo Code implements temperature handling with these considerations:
Experimenting with different temperature settings is the most effective way to discover what works best for your specific needs:
Remember that different models may respond differently to the same temperature values, and thinking-enabled models always use a fixed temperature of 1.0 regardless of your settings.