The open source coding agent.
TypeScript
docs: mode temperature
Dax Raadc65e7aff8650
diff --git a/packages/web/src/content/docs/docs/modes.mdx b/packages/web/src/content/docs/docs/modes.mdxindex 97e9248ef7f..d5c5c04773d 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).++---+### PromptSpecify a custom system prompt file for this mode with the `prompt` config. The prompt file should contain instructions specific to the mode's purpose.