huanbao commited on
Commit
b9c4570
·
verified ·
1 Parent(s): 8db91f8

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +5 -5
entrypoint.sh CHANGED
@@ -78,13 +78,13 @@ cat <<EOF > "$HOME/.claude/settings.json"
78
  }
79
  EOF
80
 
81
- # 4. 自动生成 Codex 配置(依据 readme.md 实测结论修复 bwrap 命名空间报错)
82
  # 修复要点:
83
- # a. 顶层键必须位于任何 [table] 段之前,否则键被归入 table 导致配置失效(实测注意点);
84
  # b. hfspace 容器 seccomp 拦截 CLONE_NEWUSER 且无 bwrap,沙箱双路径全阻断,
85
  # 必须 sandbox_mode="danger-full-access" + approval_policy="never" 让 Codex 完全跳过沙箱;
86
- # c. 通道用实测可用的中转网关:wire_api="chat"、env_key="OPENAI_API_KEY"(移除 requires_openai_auth);
87
- # d. 凭证解析:优先 CODEX_API_KEY 环境变量,其次 /data/.codex/gw_token(持久盘凭证文件)。
88
  CODEX_KEY_RESOLVED="${CODEX_API_KEY:-}"
89
  if [ -z "$CODEX_KEY_RESOLVED" ] && [ -f /data/.codex/gw_token ]; then
90
  CODEX_KEY_RESOLVED="$(head -n 1 /data/.codex/gw_token | tr -d '[:space:]')"
@@ -103,7 +103,7 @@ approval_policy = "never"
103
  [model_providers.custom]
104
  name = "Custom"
105
  base_url = "${CODEX_BASE_URL:-https://cpa.freecode.eu.cc/v1}"
106
- wire_api = "chat"
107
  env_key = "OPENAI_API_KEY"
108
  EOF
109
 
 
78
  }
79
  EOF
80
 
81
+ # 4. 自动生成 Codex 配置
82
  # 修复要点:
83
+ # a. 顶层键必须位于任何 [table] 段之前,否则键被归入 table 导致配置失效;
84
  # b. hfspace 容器 seccomp 拦截 CLONE_NEWUSER 且无 bwrap,沙箱双路径全阻断,
85
  # 必须 sandbox_mode="danger-full-access" + approval_policy="never" 让 Codex 完全跳过沙箱;
86
+ # c. 通道用实测可用的中转网关:wire_api="responses"、env_key="OPENAI_API_KEY";
87
+ # d. 凭证解析:优先 CODEX_API_KEY 环境变量,其次 /data/.codex/gw_token。
88
  CODEX_KEY_RESOLVED="${CODEX_API_KEY:-}"
89
  if [ -z "$CODEX_KEY_RESOLVED" ] && [ -f /data/.codex/gw_token ]; then
90
  CODEX_KEY_RESOLVED="$(head -n 1 /data/.codex/gw_token | tr -d '[:space:]')"
 
103
  [model_providers.custom]
104
  name = "Custom"
105
  base_url = "${CODEX_BASE_URL:-https://cpa.freecode.eu.cc/v1}"
106
+ wire_api = "responses"
107
  env_key = "OPENAI_API_KEY"
108
  EOF
109