Update configuration
Update OpenCode configuration settings and preferences.
Query parameters
Request body
JSON schema reference for configuration validation
Default shell to use for terminal and bash tool
Log level
Command configuration, see https://opencode.ai/docs/commands
Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.
Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
@deprecated Use 'share' field instead. Share newly created sessions automatically
Disable providers that are loaded automatically
When set, ONLY these providers will be enabled. All other providers will be ignored
Model to use in the format of provider/model, eg anthropic/claude-2
Small model to use for tasks like title generation in the format of provider/model
Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.
Custom username to display in conversations instead of system username
Custom provider configurations and model overrides
MCP (Model Context Protocol) server configurations
Additional instruction files or patterns to include
@deprecated Always uses stretch layout.
允许创建 artifact 的文件路径前缀白名单。路径将被 resolve 为绝对路径后进行前缀匹配。默认允许 /tmp 路径。
自定义 provider 允许加载的 npm 包白名单。
Response
Successfully updated config
JSON schema reference for configuration validation
Default shell to use for terminal and bash tool
Log level
Command configuration, see https://opencode.ai/docs/commands
Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.
Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
@deprecated Use 'share' field instead. Share newly created sessions automatically
Disable providers that are loaded automatically
When set, ONLY these providers will be enabled. All other providers will be ignored
Model to use in the format of provider/model, eg anthropic/claude-2
Small model to use for tasks like title generation in the format of provider/model
Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.
Custom username to display in conversations instead of system username
Custom provider configurations and model overrides
MCP (Model Context Protocol) server configurations
Additional instruction files or patterns to include
@deprecated Always uses stretch layout.
允许创建 artifact 的文件路径前缀白名单。路径将被 resolve 为绝对路径后进行前缀匹配。默认允许 /tmp 路径。
自定义 provider 允许加载的 npm 包白名单。