[defaults]
model = "gpt-4o"
provider = "openai"
temperature = 0.2
max_tokens = 8192
language = "zh-CN"
[providers.openai]
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
context_window_tokens = 128000
compaction_threshold = 0.85
compaction_keep_messages = 12
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
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"