Skip to content

Settings

Rusty stores its persistent configuration at ~/.rusty/settings.json. This file is created by the setup wizard on first run.

{
"api_key": "sk-...",
"api_base": "https://api.xiaomimimo.com/v1",
"default_model": "mimo-v2.5-pro",
"models": [],
"active_model": "mimo-v2.5-pro",
"api_keys": {},
"allowed_tools": [
"bash:git status",
"bash:cargo check"
],
"credential_store": "keyring",
"thinking_level": "normal",
"permission_mode": "default",
"permissions": {}
}
FieldTypeDescription
api_keystringAPI key for the LLM provider (stored if not using keyring)
api_basestringBase URL for the API endpoint
default_modelstringModel identifier to use by default
modelsarrayModel registry entries (see Model Registry below)
active_modelstringWhich model entry is currently active
api_keysobjectPer-model API keys (keyed by model ID)
allowed_toolsstring[]Permanently allowed tool invocations
credential_storeenum"keyring" or "settings_file"
thinking_levelenum"minimal", "normal", or "deep"
permission_modeenum"default", "accept-edits", "bypass", or "plan"
permissionsobjectPer-tool permission decisions

The models array defines available LLM models. Each entry has:

FieldTypeDescription
groupstringDisplay grouping (e.g. “Xiaomi”, “Anthropic”)
namestringHuman-readable name
providerenumOpenAI or Anthropic (determines wire format)
api_basestringAPI endpoint URL
modelstringModel ID sent to the API
available_modelsstring[]Models to offer in the picker
context_windownumberContext window size in tokens
thinking_budgetnumberToken budget for reasoning/thinking
max_tokensnumberMax output tokens
temperaturenumberSampling temperature
extra_headersobjectAdditional HTTP headers

The active_model field selects which model entry is used. The TUI /settings command provides a visual editor for the model registry.

The thinking_level field controls the token budget allocated to reasoning:

LevelToken BudgetUse Case
minimal1024Simple queries, quick responses
normal4096Standard multi-step tasks
deep16384Complex reasoning, architecture decisions

Dynamic adjustment: The agent automatically adjusts the thinking level based on context:

  • Multi-step tasks (2+ tool turns) are boosted from Minimal to Normal.
  • Context usage above 70% triggers a one-level step-down.
  • Context usage above 85% forces Minimal regardless of setting.

All settings can be overridden at runtime via CLI flags:

FlagDescription
--modelOverride the model
--api-keyOverride the API key
--api-baseOverride the API base URL
--presetUse a named preset (overrides api_base and model)
--permissionsSet permission mode: default, accept-edits, bypass, plan
--max-turnsMaximum agent loop iterations
--max-tokensMaximum tokens in the response
--temperatureSampling temperature
--thinking-budgetToken budget for reasoning/thinking content
--plan-with-tasksEnable structured task tracking in responses
--cwdSet the working directory
--promptRun in headless mode with a single prompt
--headlessRun in stdin REPL mode
--resumeResume a saved session by ID
--list-sessionsList all saved sessions
--verboseEnable verbose logging
--setupForce the setup wizard to run
--no-claude-mdDisable discovery of AGENTS.md/CLAUDE.md/RUSTY.md context files
--append-system-promptAppend additional text to the system prompt
VariablePurpose
OPENAI_API_KEYAPI key (lower priority than RUSTY_API_KEY)
RUSTY_API_KEYAPI key (higher priority)
OPENAI_BASE_URLAPI base URL
RUST_LOGLogging level (debug, info, warn)

Settings are resolved in this order (later wins):

  1. Preset defaults
  2. ~/.rusty/settings.json
  3. Environment variables
  4. CLI flags