From e53140fa1d3bca66e793545c87205e1c06c8dc53 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 17 Jul 2026 03:07:23 +0000 Subject: [PATCH] feat(chat): add --temperature flag to opencli chat command `opencli run` accepted --temperature but `opencli chat` had no such flag, forcing interactive-session users to set temperature only via config file. This brings chat to parity with run. Part of #251 Co-Authored-By: Claude Sonnet 4.6 --- src/cli/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cli/index.ts b/src/cli/index.ts index aeba1de..e0cf31b 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -56,6 +56,7 @@ program .option("--sandbox ", "Sandbox mode for bash tool: auto | strict | off (default: auto)") .option("--provider ", "Override provider detection: gemini | anthropic | openai") .option("--base-url ", "Custom base URL for proxy or local inference (e.g. LiteLLM)") + .option("--temperature ", "LLM temperature (use 0 for determinism)", parseTemperature) .action(async (opts) => { const sessionId = opts.session ?? (opts.resume ? "latest" : undefined); await startChat( @@ -66,6 +67,7 @@ program opts.sandbox as string | undefined, opts.provider as string | undefined, opts.baseUrl as string | undefined, + opts.temperature as number | undefined, ); }); @@ -185,6 +187,7 @@ async function startChat( sandboxFlag?: string, providerOverride?: string, baseUrlOverride?: string, + temperature?: number, ): Promise { const { agent, skills, mcpManager, snapshotManager } = await createAgent( modelOverride, @@ -193,6 +196,7 @@ async function startChat( sandboxFlag, providerOverride, baseUrlOverride, + temperature, ); const cleanup = async () => {