mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-17 12:56:41 +02:00
docs: document tool output truncation settings
This commit is contained in:
@@ -353,6 +353,27 @@ You can manage the tools an LLM can use through the `tools` option.
|
||||
|
||||
---
|
||||
|
||||
### Tool output
|
||||
|
||||
You can control when tool output is truncated using the `tool_output` option. When output exceeds either threshold, OpenCode saves the complete output to disk and returns a truncated preview with the saved file path.
|
||||
|
||||
```json title="opencode.json"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"tool_output": {
|
||||
"max_lines": 2000,
|
||||
"max_bytes": 51200
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `max_lines` - Maximum number of lines before output is truncated (default: `2000`).
|
||||
- `max_bytes` - Maximum size in bytes before output is truncated (default: `51200`).
|
||||
|
||||
These thresholds apply to output handled by OpenCode's shared truncation layer, including MCP and plugin tool output. Individual tools that page or cap their own results can have separate limits.
|
||||
|
||||
---
|
||||
|
||||
### Models
|
||||
|
||||
You can configure the providers and models you want to use in your OpenCode config through the `provider`, `model` and `small_model` options.
|
||||
|
||||
Reference in New Issue
Block a user