1- model = " glm-4.6"
1+ # 指定供应商
2+ # model_provider = ""
3+ # 指定默认模型,思考强度,审查模型默认和会话模型一样
4+ model = " gpt-5.4"
5+ model_reasoning_effort = " xhigh"
6+ personality = " friendly"
7+ # 手动覆盖模型上下文窗口:gpt-5.4推荐设1050000(1M),解决长对话丢上下文
8+ model_context_window = 1050000
9+ # 自动上下文压缩阈值:达到该token数触发历史压缩,建议低于上下文窗口5%-10%
10+ # 避免上下文溢出,同时保留核心信息,1M窗口推荐900000
11+ model_auto_compact_token_limit = 900000
12+ # 单次工具输出token上限:限制大文件/命令输出占用的上下文,推荐40000
13+ tool_output_token_limit = 40000
14+
15+ # 核心基础配置(full-auto模式默认等于 on-request + workspace-write
16+ # on-failure进一步开放权限,搭配网络权限开启,应该基本不用审批了
17+ approval_policy = " on-failure"
18+ sandbox_mode = " workspace-write"
19+ # sandbox_mode = "danger-full-access"
20+ [sandbox_workspace_write ]
21+ network_access = true
22+
23+
24+ # 2. 收紧环境变量白名单,避免敏感变量触发审批
25+ [shell_environment_policy ]
26+ include_only = [" PATH" , " HOME" ]
27+
28+ [mcp_servers .context7 ]
29+ command = " bun"
30+ args = [" x" , " @upstash/context7-mcp@latest" ]
31+ env = { DEFAULT_MINIMUM_TOKENS = " 10000" }
32+
33+ [mcp_servers .serena ]
34+ command = " uvx"
35+ args = [
36+ " --from" ,
37+ " git+https://github.com/oraios/serena" ,
38+ " serena" ,
39+ " start-mcp-server" ,
40+ " --context" ,
41+ " codex" ,
42+ ]
43+ startup_timeout_sec = 30
44+ enabled = false
45+
46+
47+ [tui ]
48+ status_line = [
49+ " model-with-reasoning" ,
50+ " context-remaining" ,
51+ " current-dir" ,
52+ " git-branch" ,
53+ " used-tokens" ,
54+ " codex-version" ,
55+ " context-window-size" ,
56+ ]
57+
58+ [windows ]
59+ sandbox = " elevated"
60+
61+ [features ]
62+ multi_agent = true
63+
64+ [agents ]
65+ max_threads = 12
66+ max_depth = 1
67+
268[model_providers .z_ai ]
369name = " z.ai - GLM Coding Plan"
470base_url = " https://open.bigmodel.cn/api/coding/paas/v4/"
571env_key = " Z_AI_API_KEY"
6-
7- [profiles .glm_4_6 ]
8- model = " glm-4.6"
9- model_provider = " z_ai"
0 commit comments