codei-config 0.0.13

终端优先的 AI 编程 Agent,用自然语言在本地仓库中读代码、改代码、跑命令、调试问题。
Documentation
# CodeI user configuration
# Docs: https://github.com/007gzs/codei

[defaults]
model = "gpt-4o"
provider = "openai"
temperature = 0.2
max_tokens = 8192
language = "zh-CN"

[providers.openai]
# api_key = "sk-..."  # optional; overrides api_key_env when set
api_key_env = "OPENAI_API_KEY"
base_url = "https://api.openai.com/v1"

[providers.anthropic]
api_key_env = "ANTHROPIC_API_KEY"

[providers.custom]
api_key_env = "CUSTOM_API_KEY"
base_url = "http://localhost:8080/v1"
api_style = "openai"
tool_format = "tools"

[agent]
max_turns = 50
max_tool_rounds_per_turn = 25
# Set to your model's context window (e.g. 128000); used for compaction and max_tokens capping.
context_window_tokens = 128000
# Auto-compact when estimated context tokens reach this fraction of context_window_tokens.
compaction_threshold = 0.85
# Recent messages kept in the session after auto-compaction.
compaction_keep_messages = 12
# Max tokens for the LLM summary produced during compaction.
compaction_summary_max_tokens = 2048

[tools.shell]
enabled = true
timeout_secs = 120
allowlist = []

[tools.write]
enabled = true

[tools.web_search]
enabled = false
provider = "duckduckgo"
timeout_secs = 30
max_results = 10
# searxng_url = "http://localhost:8080"
ssrf_protection = true

[tools.web_fetch]
enabled = true
timeout_secs = 30
max_bytes = 524288
ssrf_protection = true

[ui]
theme = "auto"
show_tool_output = true
confirm_destructive = true

[session]
storage = "sqlite"
dir = "~/.local/share/codei/sessions"