feat(coding-agent): added CLI args and env vars for model role overrides

- Added --smol and --slow CLI args for ephemeral model role overrides
- Added PI_SMOL_MODEL and PI_SLOW_MODEL env var support
- Overrides are applied at runtime without persisting to settings.json
This commit is contained in:
can1357
2026-01-03 03:40:24 +01:00
parent 4b73cb6a54
commit 60f39f8382
3 changed files with 21 additions and 0 deletions
+8
View File
@@ -12,6 +12,8 @@ export type Mode = "text" | "json" | "rpc";
export interface Args {
provider?: string;
model?: string;
smol?: string;
slow?: string;
apiKey?: string;
systemPrompt?: string;
appendSystemPrompt?: string;
@@ -69,6 +71,10 @@ export function parseArgs(args: string[]): Args {
result.provider = args[++i];
} else if (arg === "--model" && i + 1 < args.length) {
result.model = args[++i];
} else if (arg === "--smol" && i + 1 < args.length) {
result.smol = args[++i];
} else if (arg === "--slow" && i + 1 < args.length) {
result.slow = args[++i];
} else if (arg === "--api-key" && i + 1 < args.length) {
result.apiKey = args[++i];
} else if (arg === "--system-prompt" && i + 1 < args.length) {
@@ -148,6 +154,8 @@ ${chalk.bold("Usage:")}
${chalk.bold("Options:")}
--provider <name> Provider name (default: google)
--model <id> Model ID (default: gemini-2.5-flash)
--smol <id> Small/fast model for lightweight tasks (or PI_SMOL_MODEL env)
--slow <id> Slow/reasoning model for thorough analysis (or PI_SLOW_MODEL env)
--api-key <key> API key (defaults to env vars)
--system-prompt <text> System prompt (default: coding assistant prompt)
--append-system-prompt <text> Append text or file contents to the system prompt