feat: add --model flag (#32)

This commit is contained in:
Devansh Jain
2025-10-30 16:07:21 -07:00
committed by GitHub
parent f71d2c9b66
commit 09e4f0b13a
14 changed files with 98 additions and 27 deletions

View File

@@ -15,7 +15,7 @@ import { drainStream } from "./cli/helpers/stream";
import { loadSettings, updateSettings } from "./settings";
import { checkToolPermission, executeTool } from "./tools/manager";
export async function handleHeadlessCommand(argv: string[]) {
export async function handleHeadlessCommand(argv: string[], model?: string) {
const settings = await loadSettings();
// Parse CLI args
@@ -70,7 +70,7 @@ export async function handleHeadlessCommand(argv: string[]) {
// Priority 2: Check if --new flag was passed (skip all resume logic)
if (!agent && forceNew) {
agent = await createAgent();
agent = await createAgent(undefined, model);
}
// Priority 3: Try to resume from project settings (.letta/settings.local.json)
@@ -101,7 +101,7 @@ export async function handleHeadlessCommand(argv: string[]) {
// Priority 5: Create a new agent
if (!agent) {
agent = await createAgent();
agent = await createAgent(undefined, model);
}
// Save agent ID to both project and global settings