@simonyea/holysheep-cli 1.7.124 → 1.7.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tools/codex.js +2 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simonyea/holysheep-cli",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.126",
|
|
4
4
|
"description": "Claude Code/Cursor/Cline API relay for China — ¥1=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openai-china",
|
package/src/tools/codex.js
CHANGED
|
@@ -162,18 +162,8 @@ function writeJsonConfigIfNeeded(apiKey, baseUrlOpenAI, model) {
|
|
|
162
162
|
* Codex RS bug: auth_mode=chatgpt 时 OAuth token 会覆盖自定义 provider 的 api_key
|
|
163
163
|
*/
|
|
164
164
|
function neutralizeAuthJson() {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const auth = JSON.parse(fs.readFileSync(AUTH_FILE, 'utf8'))
|
|
169
|
-
|
|
170
|
-
// 清除所有可能干扰 holysheep provider 的认证信息
|
|
171
|
-
auth.auth_mode = 'api-key'
|
|
172
|
-
auth.OPENAI_API_KEY = null
|
|
173
|
-
delete auth.tokens
|
|
174
|
-
|
|
175
|
-
fs.writeFileSync(AUTH_FILE, JSON.stringify(auth, null, 2), 'utf8')
|
|
176
|
-
} catch {}
|
|
165
|
+
// 直接删除 auth.json,避免干扰 config.toml 的 http_headers 认证
|
|
166
|
+
try { fs.unlinkSync(AUTH_FILE) } catch {}
|
|
177
167
|
}
|
|
178
168
|
|
|
179
169
|
module.exports = {
|