feat: add per-session model selection

This commit is contained in:
Peter Steinberger
2025-12-23 23:45:20 +00:00
parent b6bfd8e34f
commit 364a6a9444
34 changed files with 729 additions and 300 deletions

View File

@@ -52,9 +52,12 @@ async function writeSessionStore(home: string) {
function makeCfg(home: string, storePath: string): ClawdisConfig {
return {
inbound: {
agent: {
provider: "anthropic",
model: "claude-opus-4-5",
workspace: path.join(home, "clawd"),
agent: { provider: "anthropic", model: "claude-opus-4-5" },
},
inbound: {
session: { store: storePath, mainKey: "main" },
},
} as ClawdisConfig;

View File

@@ -145,10 +145,10 @@ export async function runCronIsolatedAgentTurn(params: {
sessionKey: string;
lane?: string;
}): Promise<RunCronAgentTurnResult> {
const agentCfg = params.cfg.inbound?.agent;
const agentCfg = params.cfg.agent;
void params.lane;
const workspaceDirRaw =
params.cfg.inbound?.workspace ?? DEFAULT_AGENT_WORKSPACE_DIR;
params.cfg.agent?.workspace ?? DEFAULT_AGENT_WORKSPACE_DIR;
const workspace = await ensureAgentWorkspace({
dir: workspaceDirRaw,
ensureBootstrapFiles: true,