Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ program
.option("--model <model>", "Set the default model")
.option("--provider <provider>", "Set the default provider: gemini | anthropic | openai")
.option("--base-url <url>", "Set a custom base URL for proxy or local inference")
.option("--temperature <float>", "Set default LLM temperature (0–2)", parseTemperature)
.action(async (opts) => {
if (opts.geminiApiKey) {
await saveConfig({ geminiApiKey: opts.geminiApiKey });
Expand All @@ -146,13 +147,18 @@ program
await saveConfig({ baseUrl: opts.baseUrl });
printInfo(`Base URL set to ${opts.baseUrl}.`);
}
if (opts.temperature !== undefined) {
await saveConfig({ temperature: opts.temperature as number });
printInfo(`Default temperature set to ${opts.temperature}.`);
}
if (
!opts.geminiApiKey &&
!opts.anthropicApiKey &&
!opts.openaiApiKey &&
!opts.model &&
!opts.provider &&
!opts.baseUrl
!opts.baseUrl &&
opts.temperature === undefined
) {
const config = await loadConfig();
console.log(
Expand Down Expand Up @@ -333,7 +339,7 @@ async function createAgent(
maxTokens: config.maxTokens,
provider,
baseUrl,
temperature,
temperature: temperature ?? config.temperature,
});
const tools = createDefaultRegistry(model, runner);

Expand Down