polydev-ai 1.6.0 → 1.6.1
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/lib/cliManager.js +3 -21
- package/package.json +1 -1
package/lib/cliManager.js
CHANGED
|
@@ -42,9 +42,6 @@ class CLIManager {
|
|
|
42
42
|
id: 'claude_code',
|
|
43
43
|
name: 'Claude Code',
|
|
44
44
|
command: process.env.CLAUDE_CODE_PATH || 'claude',
|
|
45
|
-
// Model configuration: use env var or default to 'haiku' for speed
|
|
46
|
-
// Options: haiku (fastest), sonnet (balanced), opus (most capable)
|
|
47
|
-
model: process.env.POLYDEV_CLAUDE_MODEL || 'haiku',
|
|
48
45
|
subcommands: {
|
|
49
46
|
chat: [],
|
|
50
47
|
version: ['--version'],
|
|
@@ -58,9 +55,6 @@ class CLIManager {
|
|
|
58
55
|
id: 'codex_cli',
|
|
59
56
|
name: 'Codex CLI',
|
|
60
57
|
command: process.env.CODEX_CLI_PATH || 'codex',
|
|
61
|
-
// Model configuration: use env var or default to 'gpt-4o-mini' for speed
|
|
62
|
-
// Options: gpt-4o-mini (fastest), gpt-4o, o3-mini, o1, etc.
|
|
63
|
-
model: process.env.POLYDEV_CODEX_MODEL || 'gpt-4o-mini',
|
|
64
58
|
subcommands: {
|
|
65
59
|
chat: ['chat'],
|
|
66
60
|
version: ['--version'],
|
|
@@ -78,8 +72,6 @@ class CLIManager {
|
|
|
78
72
|
id: 'gemini_cli',
|
|
79
73
|
name: 'Gemini CLI',
|
|
80
74
|
command: process.env.GEMINI_CLI_PATH || 'gemini',
|
|
81
|
-
// Model configuration for Gemini
|
|
82
|
-
model: process.env.POLYDEV_GEMINI_MODEL || 'gemini-2.0-flash',
|
|
83
75
|
subcommands: {
|
|
84
76
|
chat: ['chat'],
|
|
85
77
|
version: ['--version'],
|
|
@@ -445,15 +437,13 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
|
|
|
445
437
|
if (providerId === 'codex_cli') {
|
|
446
438
|
const execArgs = promptVariants.find(args => args.includes('exec')) || promptVariants[0];
|
|
447
439
|
try {
|
|
448
|
-
|
|
449
|
-
const content = await this.executeCodexExec(provider.command, execArgs, prompt, timeoutMs, provider.model);
|
|
440
|
+
const content = await this.executeCodexExec(provider.command, execArgs, prompt, timeoutMs);
|
|
450
441
|
return {
|
|
451
442
|
success: true,
|
|
452
443
|
content,
|
|
453
444
|
tokens_used: this.estimateTokens(prompt + content),
|
|
454
445
|
latency_ms: Date.now() - startTime,
|
|
455
446
|
provider: providerId,
|
|
456
|
-
model: provider.model,
|
|
457
447
|
mode: 'args',
|
|
458
448
|
timestamp: new Date()
|
|
459
449
|
};
|
|
@@ -463,7 +453,6 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
|
|
|
463
453
|
error: `CLI execution failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
464
454
|
latency_ms: Date.now() - startTime,
|
|
465
455
|
provider: providerId,
|
|
466
|
-
model: provider.model,
|
|
467
456
|
mode,
|
|
468
457
|
timestamp: new Date()
|
|
469
458
|
};
|
|
@@ -473,9 +462,7 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
|
|
|
473
462
|
let lastErrorMessage = null;
|
|
474
463
|
|
|
475
464
|
for (const promptArgs of promptVariants) {
|
|
476
|
-
|
|
477
|
-
const modelArgs = provider.model ? ['--model', provider.model] : [];
|
|
478
|
-
const args = Array.isArray(promptArgs) ? [...promptArgs, ...modelArgs, prompt] : [...modelArgs, prompt];
|
|
465
|
+
const args = Array.isArray(promptArgs) ? [...promptArgs, prompt] : [prompt];
|
|
479
466
|
try {
|
|
480
467
|
const result = await this.executeCliCommand(
|
|
481
468
|
provider.command,
|
|
@@ -493,7 +480,6 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
|
|
|
493
480
|
tokens_used: this.estimateTokens(prompt + content),
|
|
494
481
|
latency_ms: Date.now() - startTime,
|
|
495
482
|
provider: providerId,
|
|
496
|
-
model: provider.model,
|
|
497
483
|
mode: 'args',
|
|
498
484
|
timestamp: new Date()
|
|
499
485
|
};
|
|
@@ -623,7 +609,7 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
|
|
|
623
609
|
});
|
|
624
610
|
}
|
|
625
611
|
|
|
626
|
-
async executeCodexExec(executable, commandArgs, prompt, timeoutMs
|
|
612
|
+
async executeCodexExec(executable, commandArgs, prompt, timeoutMs) {
|
|
627
613
|
if (!executable) {
|
|
628
614
|
throw new Error('Missing Codex executable');
|
|
629
615
|
}
|
|
@@ -633,12 +619,8 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
|
|
|
633
619
|
}
|
|
634
620
|
|
|
635
621
|
const workingDir = process.cwd();
|
|
636
|
-
|
|
637
|
-
// Build args with model configuration if specified
|
|
638
|
-
const modelArgs = model ? ['-c', `model="${model}"`] : [];
|
|
639
622
|
const args = [
|
|
640
623
|
...commandArgs,
|
|
641
|
-
...modelArgs,
|
|
642
624
|
'--sandbox',
|
|
643
625
|
'workspace-write',
|
|
644
626
|
'--skip-git-repo-check',
|
package/package.json
CHANGED