reasonix.toml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. # Reasonix configuration.
  2. # Resolution order: flag > ./reasonix.toml > ~/AppData/Roaming/reasonix/config.toml > built-in defaults.
  3. # Secrets come from the environment via api_key_env; never put keys here.
  4. config_version = 2 # schema marker for diagnostics; old versions may ignore it
  5. default_model = "deepseek-flash"
  6. # language = "zh" # ui/model language; empty = auto-detect from $LANG / $REASONIX_LANG
  7. [agent]
  8. # system_prompt = """...""" # omit to use the built-in prompt for this version
  9. # system_prompt_file = "prompts/system.md" # overrides system_prompt when set
  10. # max_steps = 0 # executor tool-call rounds; 0 = no limit
  11. # planner_max_steps = 12 # planner read-only tool-call rounds; 0 = no limit
  12. temperature = 0.0
  13. auto_plan = "off" # off|on; off keeps plan mode manual
  14. # reasoning_language = "zh" # visible reasoning language: auto|zh|en
  15. # auto_plan_classifier = "deepseek-flash" # optional; only used for borderline tasks
  16. soft_compact_ratio = 0.5 # notice only; keeps cache-first prefix intact
  17. compact_ratio = 0.8 # try compacting when prompt reaches this fraction
  18. compact_force_ratio = 0.9 # force compacting at this high-water mark
  19. # keep = ["errors"] # compaction keep policy: errors, user_marked
  20. # recent_keep = 2 # minimum recent messages kept verbatim
  21. cold_resume_prune = true # elide stale tool results when reopening a session past the provider cache window
  22. # planner_model = "mimo" # optional: enable two-model collaboration
  23. # subagent_model = "deepseek-pro" # optional default for runAs=subagent skills
  24. # subagent_models = { review = "deepseek-pro", security_review = "deepseek-pro" } # per-skill overrides
  25. # subagent_effort = "high" # optional default effort for subagents
  26. # subagent_efforts = { review = "max", task = "high" } # per-tool/skill effort overrides
  27. # output_style = "explanatory" # explanatory | learning | concise | custom; empty = default
  28. [[providers]]
  29. name = "deepseek-flash"
  30. kind = "openai"
  31. base_url = "https://api.deepseek.com"
  32. model = "deepseek-v4-flash"
  33. api_key_env = "DEEPSEEK_API_KEY"
  34. balance_url = "https://api.deepseek.com/user/balance" # optional; wallet-balance endpoint shown in the status bar
  35. context_window = 1000000 # tokens; compaction triggers near this limit
  36. price = { cache_hit = 0.02, input = 1, output = 2, currency = "¥" } # provider-wide fallback, per 1M tokens
  37. prices = { "deepseek-v4-flash" = { cache_hit = 0.02, input = 1, output = 2, currency = "¥" } } # per-model prices, per 1M tokens
  38. [[providers]]
  39. name = "deepseek-pro"
  40. kind = "openai"
  41. base_url = "https://api.deepseek.com"
  42. model = "deepseek-v4-pro"
  43. api_key_env = "DEEPSEEK_API_KEY"
  44. balance_url = "https://api.deepseek.com/user/balance" # optional; wallet-balance endpoint shown in the status bar
  45. context_window = 1000000 # tokens; compaction triggers near this limit
  46. price = { cache_hit = 0.025, input = 3, output = 6, currency = "¥" } # provider-wide fallback, per 1M tokens
  47. prices = { "deepseek-v4-pro" = { cache_hit = 0.025, input = 3, output = 6, currency = "¥" } } # per-model prices, per 1M tokens
  48. [[providers]]
  49. name = "mimo-pro"
  50. kind = "openai"
  51. base_url = "https://token-plan-cn.xiaomimimo.com/v1"
  52. model = "mimo-v2.5-pro"
  53. api_key_env = "MIMO_API_KEY"
  54. context_window = 1000000 # tokens; compaction triggers near this limit
  55. price = { cache_hit = 0.025, input = 3, output = 6, currency = "¥" } # provider-wide fallback, per 1M tokens
  56. no_proxy = true # reach this base_url directly, never via the proxy
  57. [[providers]]
  58. name = "mimo-flash"
  59. kind = "openai"
  60. base_url = "https://token-plan-cn.xiaomimimo.com/v1"
  61. model = "mimo-v2.5"
  62. api_key_env = "MIMO_API_KEY"
  63. context_window = 1000000 # tokens; compaction triggers near this limit
  64. price = { cache_hit = 0.02, input = 1, output = 2, currency = "¥" } # provider-wide fallback, per 1M tokens
  65. no_proxy = true # reach this base_url directly, never via the proxy
  66. [tools]
  67. enabled = [] # empty = all built-in tools
  68. bash_timeout_seconds = 120 # foreground safety cap; set 0 for no tool-local cap
  69. [tools.background_jobs]
  70. stalled_warning_seconds = 900 # warn once per background job after this many quiet seconds; 0 disables
  71. [lsp]
  72. enabled = true # language server tools; servers launch lazily when used
  73. # [lsp.servers.go]
  74. # command = "gopls"
  75. # args = []
  76. # extensions = [".go"]
  77. [skills]
  78. # paths = ["~/my-skills", "../shared/skills"] # extra custom skill roots
  79. # excluded_paths = ["~/.agents/skills"] # hide convention roots without deleting folders
  80. # max_depth = 3 # nested scan depth; set 1 for legacy root-only discovery
  81. # disabled_skills = ["review"] # hide noisy or unwanted skills
  82. [permissions]
  83. # Per-call gating. mode = writer fallback when no rule matches: ask|allow|deny.
  84. # Readers always default to allow. Precedence: deny > ask > allow > fallback.
  85. # Rules are "Tool" or "Tool(specifier)"; e.g. Bash(go test:*), Edit(src/**).
  86. mode = "ask"
  87. # deny = ["Bash(rm -rf*)", "Bash(git push*)"] # hard-blocked in every mode
  88. allow = ["task", "Edit", "Bash(cd /e/QMAI && git status && echo \"=== 当前分支 ===\" && git branch --show-current)"]
  89. # ask = ["Edit(src/**)"] # force a prompt even if otherwise allowed
  90. [sandbox]
  91. # Confine tool blast radius. File-writers (write_file/edit_file/multi_edit/move_file)
  92. # may only write under workspace_root (empty = current dir) and allow_write extras.
  93. # bash = "enforce" (default) jails each command in an OS sandbox (macOS now;
  94. # graceful fallback elsewhere); "off" disables it. network allows egress.
  95. # workspace_root = "" # default: current working directory
  96. # allow_write = ["/tmp"] # extra dirs writers may also modify
  97. bash = "enforce"
  98. network = true
  99. [statusline]
  100. # A custom status line: a command whose first stdout line replaces the built-in
  101. # data row. It receives {"model","contextUsed","contextWindow","cwd"} as JSON on stdin.
  102. # command = "my-statusline.sh"
  103. # External MCP servers. type: "stdio" (default, a subprocess) | "http" | "sse".
  104. # ${VAR} / ${VAR:-default} are expanded from the environment in command/args/env/url/headers.
  105. # [[plugins]]
  106. # name = "example"
  107. # command = "reasonix-plugin-example"
  108. # [[plugins]] # a remote server over Streamable HTTP
  109. # name = "stripe"
  110. # type = "http"
  111. # url = "https://mcp.stripe.com"
  112. # headers = { Authorization = "Bearer ${STRIPE_KEY}" }