summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-07-25 13:45:04 -0400
committerDax Raad <[email protected]>2025-07-25 13:45:04 -0400
commitc65e7aff86504a3386ed7ca137b8bc097439e2ce (patch)
treed227ed83725696c7ebeb1090ed8bce755d4067a3
parente97613ef9f30dc1328b0241ef0b929364dfd405e (diff)
downloadopencode-c65e7aff86504a3386ed7ca137b8bc097439e2ce.tar.gz
opencode-c65e7aff86504a3386ed7ca137b8bc097439e2ce.zip
docs: mode temperature
-rw-r--r--packages/web/src/content/docs/docs/modes.mdx45
1 files changed, 45 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/docs/modes.mdx b/packages/web/src/content/docs/docs/modes.mdx
index 97e9248ef..d5c5c0477 100644
--- a/packages/web/src/content/docs/docs/modes.mdx
+++ b/packages/web/src/content/docs/docs/modes.mdx
@@ -97,6 +97,51 @@ Use the `model` config to override the default model for this mode. Useful for u
---
+### Temperature
+
+Control the randomness and creativity of the AI's responses with the `temperature` config. Lower values make responses more focused and deterministic, while higher values increase creativity and variability.
+
+```json title="opencode.json"
+{
+ "mode": {
+ "plan": {
+ "temperature": 0.1
+ },
+ "creative": {
+ "temperature": 0.8
+ }
+ }
+}
+```
+
+Temperature values typically range from 0.0 to 1.0:
+
+- **0.0-0.2**: Very focused and deterministic responses, ideal for code analysis and planning
+- **0.3-0.5**: Balanced responses with some creativity, good for general development tasks
+- **0.6-1.0**: More creative and varied responses, useful for brainstorming and exploration
+
+```json title="opencode.json"
+{
+ "mode": {
+ "analyze": {
+ "temperature": 0.1,
+ "prompt": "{file:./prompts/analysis.txt}"
+ },
+ "build": {
+ "temperature": 0.3
+ },
+ "brainstorm": {
+ "temperature": 0.7,
+ "prompt": "{file:./prompts/creative.txt}"
+ }
+ }
+}
+```
+
+If no temperature is specified, opencode uses model-specific defaults (typically 0 for most models, 0.55 for Qwen models).
+
+---
+
### Prompt
Specify a custom system prompt file for this mode with the `prompt` config. The prompt file should contain instructions specific to the mode's purpose.