返回 DeepSeek-Reasonix
reasonix.example.toml
根目录 / reasonix.example.toml
1 # Reasonix configuration.
2 # Resolution order: flag > ./reasonix.toml > <Reasonix home>/config.toml > built-in defaults.
3 # Fields marked user/global only are not overridden by ./reasonix.toml.
4 # Provider entries name secrets via api_key_env; saved key values live in
5 # Reasonix's global <Reasonix home>/.env. Never put API key values here.
6
7 default_model = "deepseek" # a provider name (→ its default model) or "provider/model"
8 # language = "zh" # ui language; empty = auto-detect from $LANG / $REASONIX_LANG
9
10 [ui]
11 theme = "auto" # auto|dark|light; controls CLI colors only; REASONIX_THEME can override per run
12 # theme_style = "graphite" # graphite|aurora|slate|carbon|nocturne|amber and legacy aliases
13 # shortcut_layout = "desktop" # classic|desktop; compatibility setting; Shift+Tab cycles read-only/workspace/YOLO/plan; Ctrl+Y toggles YOLO
14 # cursor_shape = "bar" # block|underline|bar; text input cursor shape; slim default avoids covering CJK characters
15 show_turn_usage = true # CLI/TUI: show per-request token and cost receipts in transcript scrollback
16
17 [desktop]
18 # language = "auto" # auto|en|zh; auto follows the browser/OS locale
19 # currency = "auto" # legacy display currency; prefer [billing].display_currency
20 layout_style = "workbench" # workbench|creation; legacy classic migrates to workbench
21 # theme = "auto" # desktop only: auto|dark|light
22 # terminal_theme = "auto" # integrated terminal: auto|dark|light; auto follows the desktop app
23 # theme_style = "graphite" # graphite|aurora|slate|carbon|nocturne|amber and legacy aliases
24
25 [billing]
26 # display_currency = "auto" # auto|CNY|USD — display only; never rewrites provider list prices
27 # Provider list prices use each provider's billing_currency (frozen from the
28 # official table or custom price). Switching display currency only re-selects
29 # occurrence-time valuations already recorded in the cost ledger.
30
31 [notifications]
32 enabled = false # system notifications for CLI and desktop turns; default off
33 turn_done = true # notify when a turn finishes
34 approval_request = true # notify when a tool approval is waiting
35 ask_request = true # notify when a question is waiting
36
37 [agent]
38 # system_prompt = "You are ..." # custom persona/prompt; unset or empty = built-in default
39 # system_prompt_file = "prompts/system.md" # project paths stay in <workspace>; user paths may fall back to <reasonix home>
40 temperature = 0.0
41 # recovery_model = "" # optional reviewer for low-risk automatic recovery; empty leaves rule-only recovery
42 # reasoning_language = "auto" # visible reasoning text: auto|zh|en
43 # plan_mode_read_only_commands = ["gh issue view"] # legacy compatibility only; Plan bash uses Permissions
44 compact_ratio = 0.80 # sole auto trigger; presets 0.70 (active) / 0.80 (recommended default) / 0.85 (late)
45 # planner_model = "deepseek-pro" # optional: enable two-model collaboration
46 # subagent_model = "deepseek-pro" # optional default for runAs=subagent skills
47 # subagent_models = { review = "deepseek-pro", security_review = "deepseek-pro" } # per-skill overrides
48 # max_subagent_concurrency = 6 # session-wide sub-agent concurrency (task/fleet/skills)
49 # max_parallel_writers = 3 # concurrent writers with non-overlapping write_paths
50 # output_style = "explanatory" # persona/tone folded into the prompt: explanatory | learning | concise,
51 # or a custom .reasonix/output-styles/<name>.md ; empty = default
52
53 # A provider is a vendor endpoint (one base_url + key) that offers one or more
54 # models. Use `models = [...]` to expose several under a single entry — switching
55 # models reuses the same connection; no need to re-declare base_url/api_key.
56 # In the desktop app, Settings -> Model -> Access -> Add provider includes
57 # recommended editable presets for Kimi CN/Global, Kimi Coding Plan, MiMo API
58 # and Anthropic/token-plan regions, MiniMax CN/Global API and Anthropic routes,
59 # GLM/Z.AI CN/Global API and coding-plan routes, OpenCode Go/Zen, Qwen/DashScope
60 # CN/Global API and coding-plan routes, Token Rhythm (基元律动), StepFun,
61 # NovitaAI, GMI, Vercel AI Gateway, HuggingFace, ModelScope, NVIDIA, KiloCode, and Ollama Cloud.
62 [[providers]]
63 name = "deepseek"
64 kind = "openai"
65 base_url = "https://api.deepseek.com"
66 models = ["deepseek-v4-flash", "deepseek-v4-pro"]
67 default = "deepseek-v4-flash" # optional; defaults to the first of `models`
68 api_key_env = "DEEPSEEK_API_KEY"
69 context_window = 1000000
70 # Per-turn total output budget (does not change compact_ratio):
71 # max_output_tokens = 0 # recommended: automatic (DeepSeek default high → ~64K)
72 # max_output_tokens = 32768 # ordinary coding / cost control
73 # max_output_tokens = 65536 # heavy reasoning / long tool loops
74 # max_output_tokens = 131072 # only after repeated finish_reason=length
75 # Optional per-model budgets. Omitted models inherit context_window and
76 # max_output_tokens from the provider above.
77 # model_overrides = { "deepseek-v4-flash" = { context_window = 1000000, max_output_tokens = 32768 } }
78 # Official list prices are frozen per provider (billing_currency). Display
79 # currency ([billing].display_currency) never rewrites these tables.
80 # billing_currency = "USD" # frozen list-price currency: CNY|USD
81 # billing_mode = "payg" # payg | subscription_equivalent (e.g. MiMo Token Plan)
82 # Set prices explicitly only when you want to pin custom rates (always protected).
83 # The stored official anchors are peak prices; Reasonix applies the documented
84 # half-price off-peak windows automatically at occurrence time.
85 # prices = { "deepseek-v4-flash" = { cache_hit = 0.10, input = 3, output = 9, currency = "¥" }, "deepseek-v4-pro" = { cache_hit = 0.30, input = 9, output = 27, currency = "¥" } } # per 1M tokens
86 # DeepSeek thinking is on by default; effort: disabled | low | high | max. Omit for auto (provider default high).
87 effort = "high"
88
89 # A single-model provider still works (use `model = "..."`) — pick this form when
90 # a model needs its own base_url. Use model_overrides when models share an endpoint
91 # but need distinct context windows or capability settings.
92
93 # Custom /effort levels for a provider. When supported_efforts is set, the
94 # /effort command exposes these levels; default_effort is what "/effort auto"
95 # (or unset) resolves to. Leave both commented to keep the built-in defaults
96 # (DeepSeek models: low|high|max; Anthropic: low|medium|high|xhigh|max). DeepSeek
97 # models behind a proxy are detected by model name; set reasoning_protocol =
98 # "none" to disable that or "openai" to force ordinary reasoning_effort.
99 # Other OpenAI-compatible providers don't expose /effort unless you opt in here.
100 #
101 # [[providers]]
102 # name = "openai-compatible-custom"
103 # kind = "openai"
104 # base_url = "https://api.example.com/v1"
105 # model = "example-reasoning-model"
106 # api_key_env = "EXAMPLE_API_KEY"
107 # reasoning_protocol = "openai" # auto|deepseek|openai|none
108 # supported_efforts = ["low", "medium", "high"]
109 # default_effort = "high"
110
111 # Anthropic (Claude) — the "anthropic" kind speaks the Messages API directly (no
112 # OpenAI shim). base_url is optional (defaults to https://api.anthropic.com). Note:
113 # this provider does not enable extended thinking and does not send temperature —
114 # current Claude models reject sampling params (see internal/provider/anthropic).
115 # Some Anthropic-compatible gateways use Bearer auth instead of x-api-key; set
116 # auth_header = true for those (for example MiniMax Global or Vercel AI Gateway).
117 [[providers]]
118 name = "claude"
119 kind = "anthropic"
120 model = "claude-opus-4-8"
121 api_key_env = "ANTHROPIC_API_KEY"
122 context_window = 1000000
123 price = { cache_hit = 0.5, input = 5, output = 25, currency = "$" } # per 1M tokens
124 # Extended thinking (anthropic kind only; round-trips the signed reasoning block
125 # across tool calls). Omit to disable. effort: low | medium | high | xhigh | max.
126 thinking = "adaptive"
127 effort = "high"
128
129 [environment]
130 enabled = true # inject a stable startup summary of OS, shell, and common tools into the prompt
131 offline = false # set true when outbound network access is unavailable; prevents futile retries
132 # [environment.tools]
133 # go = "/opt/homebrew/bin/go" # optional trusted executable path; workspace-local paths are not auto-executed
134
135 [tools]
136 enabled = [] # empty = all built-in tools
137 bash_timeout_seconds = 120 # foreground safety cap; set 0 for no tool-local cap
138 mcp_startup_timeout_seconds = 30 # background initialize + tools/list safety cap; per-server overrides may raise it
139 mcp_call_timeout_seconds = 300 # default MCP call safety cap; per-plugin/tool overrides may raise it
140
141 [tools.background_jobs]
142 stalled_warning_seconds = 900 # heads-up once per background job after this many quiet seconds; a quiet job is not necessarily stuck; 0 disables
143
144 # Sandbox confinement bounds the blast radius of tool calls. Writers may only
145 # modify workspace_root (empty = current directory) plus allow_write. forbid_read
146 # hides sensitive directories from read/list/search tools and from sandboxed bash
147 # while OS-level sandboxing is active. Use absolute paths or ${HOME}; "~" is not
148 # expanded in config values.
149 # [sandbox]
150 # workspace_root = ""
151 # allow_write = ["/tmp"]
152 # forbid_read = ["${HOME}/.ssh"]
153 # bash = "enforce" # enforce (default on macOS/Linux) | off; Windows fixes this to off because it has no OS-level Bash sandbox
154 # network = true
155
156 # Skills are invokable playbooks (SKILL.md / <name>.md with frontmatter), found
157 # under .reasonix/skills, .agents/skills, .agent/skills, .claude/skills (project)
158 # and the same dirs under ~ (global). Built-ins (explore/research/review/security-review/test)
159 # ship out of the box. The model invokes them via run_skill / explore / …; you
160 # invoke them via /<name>. Manage with /skill (list, show, enable, disable, new, paths).
161 # [skills]
162 # paths = ["~/my-skills", "../shared/skills"] # extra "custom"-scope skill roots
163 # excluded_paths = ["~/.agents/skills"] # hide convention roots without deleting folders
164 # disable_implicit_invocation = true # keep /skill explicit; hide skill discovery and tools from the model
165 # disabled_skills = ["review"] # hide from prompt, slash invocation, and skill tools
166
167 # Hooks run shell commands around the loop (PreToolUse / PostToolUse /
168 # PermissionRequest / UserPromptSubmit / Stop). They are NOT configured here — put them in
169 # settings.json: <Reasonix home>/settings.json (global, always on) and
170 # <project>/.reasonix/settings.json (project, loaded automatically).
171 # Exit 0 = pass, exit 2 = block (PreToolUse / UserPromptSubmit only). Example
172 # <Reasonix home>/settings.json:
173 # { "hooks": {
174 # "PreToolUse": [ { "match": "bash", "command": "my-guard.sh" } ],
175 # "PermissionRequest": [ { "match": "bash", "command": "notify-send 'approval needed'" } ],
176 # "PostToolUse": [ { "match": ".*file", "command": "gofmt -w ." } ],
177 # "Stop": [ { "command": "notify-send 'turn done'" } ] } }
178
179 # A custom status line: a command whose first stdout line replaces the built-in
180 # data row. It receives {"model","contextUsed","contextWindow"} as JSON on stdin.
181 # [statusline]
182 # command = "my-statusline.sh"
183
184 # External stdio plugins (MCP-compatible); each is a standalone executable.
185 # [[plugins]]
186 # name = "example"
187 # command = "reasonix-plugin-example"
188 # # Startup may continue in the background after the first caller stops waiting.
189 # # startup_timeout_seconds = 60
190 # # Per-server MCP call timeout; 0 keeps the global/default cap.
191 # # call_timeout_seconds = 600
192 # # Raw MCP tool names with per-tool call timeouts.
193 # # tool_timeout_seconds = { "generate_video" = 1800 }
194 # # Enabled MCP servers connect automatically in the background after session
195 # # start. Use /mcp or the desktop MCP panel to refresh, reconnect, or disable.
196
197 # Bot gateway: multi-channel IM bot for QQ, Feishu, and WeChat.
198 # Start with `reasonix bot start --channels qq,feishu,weixin`.
199 # All secrets are read from environment variables; never put keys here.
200 # [bot]
201 # enabled = false
202 # model = "" # 用于 bot 的模型,空则用 default_model
203 # max_steps = 0 # 0 表示自动持续执行;正数为显式轮数上限
204 # debounce_ms = 1500 # 消息合并窗口(毫秒)
205 # queue_mode = "steer" # steer|followup|collect|interrupt
206 # queue_cap = 20 # 每个会话最多保留的排队消息数
207 # queue_drop = "summarize" # summarize|old|new
208 # ignore_self_messages = true # 忽略 bot 自己发出的回声消息
209 #
210 # [bot.self_user_ids]
211 # qq = [] # 可选:各平台 bot 自己的 user/open id
212 # feishu = []
213 # weixin = []
214 #
215 # [bot.control]
216 # enabled = false # 本机 loopback HTTP API:GET /status, GET /metrics, POST /send
217 # addr = "127.0.0.1:37913"
218 # token_env = "REASONIX_BOT_CONTROL_TOKEN"
219 #
220 # [[bot.routes]]
221 # connection_id = "feishu-lark" # 可选;空字段表示通配
222 # chat_type = "group"
223 # chat_id = "oc_xxx"
224 # workspace_root = "/path/to/project"
225 # model = "deepseek-pro"
226 # tool_approval_mode = "ask"
227 #
228 # [bot.pairing]
229 # enabled = true
230 # request_ttl_minutes = 60
231 # max_pending_per_platform = 3
232 #
233 # [bot.allowlist]
234 # enabled = true
235 # allow_all = false # true 会允许所有可触达用户远程触发 bot,仅限受控环境
236 # qq_users = []
237 # feishu_users = []
238 # weixin_users = []
239 # qq_approvers = [] # 为空时沿用 allowlist 用户可审批的兼容行为
240 # feishu_approvers = []
241 # weixin_approvers = []
242 # qq_admins = [] # 配置后 /yolo 和 /mode 仅限 admin
243 # feishu_admins = []
244 # weixin_admins = []
245 # qq_groups = []
246 # feishu_groups = []
247 # weixin_groups = []
248 #
249 # [bot.qq]
250 # enabled = false
251 # app_id = ""
252 # app_secret_env = "QQ_BOT_APP_SECRET"
253 # sandbox = false # true 使用 QQ 沙箱 API / gateway
254 #
255 # [bot.feishu]
256 # enabled = false
257 # app_id = ""
258 # app_secret_env = "FEISHU_BOT_APP_SECRET"
259 # verification_token = ""
260 # mode = "webhook" # webhook | websocket(websocket 需接官方 SDK 长连接)
261 # webhook_port = 8080
262 # require_mention = true
263 #
264 # [bot.weixin]
265 # enabled = false
266 # account_id = "default"
267 # token_env = "WEIXIN_BOT_TOKEN"
268 # api_base = "https://ilinkai.weixin.qq.com" # Tencent iLink Bot API base URL
269
270 # Rewind snapshot retention (see docs/CHECKPOINTS.md). Both are optional; omit
271 # or leave at 0 to keep the built-in defaults. A protected or current turn may
272 # temporarily exceed the byte budget.
273 # [checkpoints]
274 # retain_turns = 100 # turns of file payloads to keep
275 # blob_quota_bytes = 1073741824 # 1 GiB soft budget
276
277 [serve]
278 # Authentication for the HTTP serve frontend (reasonix serve).
279 # auth_mode = "none" # none | token | password
280 # token = "" # pre-shared token for auth_mode = "token" (auto-generated if empty)
281 # password_hash = "" # bcrypt hash for auth_mode = "password". Generate with: reasonix serve --hash-password <password>
282 # behind_proxy = false # set true when behind a trusted reverse proxy (nginx, Caddy, etc.) that sets X-Forwarded-* headers
283
283 lines TOML