MiMo Code manages providers, models, server, tools, permissions, and other runtime parameters through JSON / JSONC config files. Multiple layers are merged on load, with the managed layer taking the highest precedence.
For load locations, merge rules, and scenario comparisons, see Config Overrides.
| Field | Type | Description |
|---|---|---|
$schema | string | JSON Schema URL, enables editor completion and validation |
model | string | Default primary model, in the form provider_id/model_id |
small_model | string | Model used for lightweight tasks (e.g. title generation) |
provider | object | Provider connection and runtime options |
disabled_providers | array | List of disabled provider IDs |
enabled_providers | array | Allowlist of enabled providers |
agent | object | Custom agent definitions |
default_agent | string | Default agent |
command | object | Custom command templates |
permission | object | string | Permission rules for tool actions |
tool | object | Tool invocation style |
mcp | object | MCP servers |
plugin | array | List of plugin specs (npm package name or local path) |
skills | object | Skill load sources |
lsp | object | LSP integration |
formatter | object | Code formatters |
instructions | array | Instruction file paths or globs |
share | string | "manual" / "auto" / "disabled" |
autoupdate | boolean | "notify" | Auto-update behavior |
compaction | object | Context compaction policy |
checkpoint | object | Checkpoint thresholds and quotas |
snapshot | boolean | Enable snapshots (default true) |
watcher | object | File watcher ignore patterns |
server | object | mimo serve / mimo web server settings |
enterprise | object | Enterprise-related config (url) |
username | string | Custom username |
logLevel | string | Log level |
experimental | object | Experimental features, unstable |
TUI-related options (
tui/theme/keybinds) go in~/.config/mimocode/tui.json, not in this file.
model /small_modelSet the default models. Format is provider_id/model_id. When small_model is unset, it falls back to the primary model or a cheaper model within the provider. See Models & Providers.
providerEach provider can be configured individually through options:
| Field | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | API key |
baseURL | string | — | Custom endpoint URL |
enterpriseUrl | string | — | Enterprise endpoint (e.g. GitHub Enterprise Copilot) |
timeout | number | false | 300000 | Request timeout (ms), false to disable |
chunkTimeout | number | false | — | Inter-chunk timeout for streaming (ms), false off |
setCacheKey | boolean | false | Always set a cache key for this provider |
options also passes through additional fields to the underlying SDK. For provider-specific fields (e.g. Bedrock's region / profile / endpoint), see Provider-specific options.
serverServer settings for mimo serve / mimo web:
| Field | Type | Default | Description |
|---|---|---|---|
port | number | — | Listen port |
hostname | string | — | Listen hostname; 0.0.0.0 when mdns is on and unset |
mdns | boolean | — | Enable mDNS service discovery |
mdnsDomain | string | opencode.local | Custom mDNS domain |
cors | array<string> | — | Allowed CORS origins |
See Server.
permissionControls whether tool actions run directly, prompt for approval, or are blocked. Can be set globally or per tool:
For the full rules, see Permissions.
compactionAutomatic context compaction policy:
| Field | Type | Default | Description |
|---|---|---|---|
auto | boolean | true | Compact automatically when context is full |
prune | boolean | true | Remove old tool outputs to save tokens |
tail_turns | number | 2 | Number of recent turns to keep on compaction |
preserve_recent_tokens | number | — | Recent tokens to force-keep on compaction |
reserved | number | — | Token buffer to avoid overflow during compaction |
watcheragent /default_agentagent defines dedicated agents:
default_agent must be a primary agent. An invalid value falls back to "build" with a warning, applied across all interfaces (TUI / mimo run / desktop / GitHub Action). Agents can also be defined with Markdown files; see Agents.
commandCommand templates for repetitive tasks. See Custom Commands:
share| Value | Behavior |
|---|---|
"manual" | Share manually via /share (default) |
"auto" | Auto-share new sessions |
"disabled" | Fully disabled |
autoupdate| Value | Behavior |
|---|---|
true | Auto-download new versions on startup |
false | Disable auto-update |
"notify" | Don't auto-update, only notify when a new version is available |
Auto-update is enabled when unset. This option has no effect when installed via a package manager (e.g. Homebrew).
formatterSee Formatters.
pluginAccepts npm package names or local paths:
See Plugins.
skillsSee Skills.
toolControls tool invocation style:
| Field | Type | Description |
|---|---|---|
invocation_style | string | Global invocation style (e.g. "json" / "xml") |
invocation_style_by_tool | object | Override per tool name |
toolis a different field from the deprecatedtools.toolshas been merged intopermission.
instructionsInject additional instruction files; accepts paths and globs:
See Rules.
disabled_providers /enabled_providers/connect, and its models won't appear in the selection list.enabled_providers is set, only providers in the list are enabled; all others are ignored.disabled_providers takes precedence over enabled_providers.mcp — MCP servers, see MCPlsp — LSP integration, see LSPenterprise — { "url": "https://enterprise.example.com" }checkpoint — checkpoint thresholds and quotas (thresholds / reserved / push_caps); refer to the schemaexperimental — experimental features that may change or be removed without noticeConfig values can reference environment variables and file contents:
{env:VAR} — replaced with an empty string when unset{file:path} — relative to the config file directory, or an absolute path starting with / or ~
Placeholders inside //single-line comments in JSONC are not substituted.
Config files follow code.xiaomimimo.com/config.json. Add "$schema" at the top of the file to enable editor completion and validation: