orchestrix-yuri 4.6.2 → 4.6.3
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.
|
@@ -274,6 +274,21 @@ function clearSessionState() {
|
|
|
274
274
|
try { fs.unlinkSync(SESSION_FILE); } catch { /* ok */ }
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
+
/**
|
|
278
|
+
* Build a clean env for Claude CLI — remove third-party API overrides.
|
|
279
|
+
* Users may have ANTHROPIC_BASE_URL/AUTH_TOKEN/MODEL set for other tools
|
|
280
|
+
* (DeepSeek, Kimi, GLM, etc.) which would redirect Claude CLI to wrong API.
|
|
281
|
+
*/
|
|
282
|
+
function cleanEnv() {
|
|
283
|
+
const env = { ...process.env, CLAUDE_AUTOCOMPACT_PCT_OVERRIDE: '80' };
|
|
284
|
+
delete env.ANTHROPIC_API_KEY;
|
|
285
|
+
delete env.ANTHROPIC_AUTH_TOKEN;
|
|
286
|
+
delete env.ANTHROPIC_BASE_URL;
|
|
287
|
+
delete env.ANTHROPIC_MODEL;
|
|
288
|
+
delete env.ANTHROPIC_SMALL_FAST_MODEL;
|
|
289
|
+
return env;
|
|
290
|
+
}
|
|
291
|
+
|
|
277
292
|
// ── Core: Run Claude CLI ───────────────────────────────────────────────────────
|
|
278
293
|
|
|
279
294
|
/**
|
|
@@ -290,10 +305,7 @@ function runClaude(args, cwd, timeout) {
|
|
|
290
305
|
timeout: timeout || 300000,
|
|
291
306
|
maxBuffer: 10 * 1024 * 1024, // 10MB
|
|
292
307
|
encoding: 'utf8',
|
|
293
|
-
env:
|
|
294
|
-
...process.env,
|
|
295
|
-
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE: '80',
|
|
296
|
-
},
|
|
308
|
+
env: cleanEnv(),
|
|
297
309
|
}, (err, stdout, stderr) => {
|
|
298
310
|
if (err && err.killed) {
|
|
299
311
|
log.warn('Claude CLI timed out');
|