diff --git a/dashboard/server/jobs.js b/dashboard/server/jobs.js index bc1dd95..389025d 100644 --- a/dashboard/server/jobs.js +++ b/dashboard/server/jobs.js @@ -152,11 +152,12 @@ function docStamp(slug) { /** Runs on our own model server (Ollama etc.): every model slot points at the chosen model, and the Anthropic key stays home. */ function runEnv() { if (!process.env.ANTHROPIC_BASE_URL) return undefined; - // Summarise the conversation at ~16k tokens (half of a 32k window): local models get unreliable on longer requests. + // Summarise at ~23k tokens (35% of the 64k window set on the Ollama model): a laptop reads ~100–150 tokens/s and the + // agent gives up on a request after 5 minutes, while the spare window leaves room for big tool results. const env = { ...process.env, ANTHROPIC_AUTH_TOKEN: process.env.ANTHROPIC_AUTH_TOKEN || "ollama", CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1", - CLAUDE_CODE_AUTO_COMPACT_WINDOW: process.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW || "32768", - CLAUDE_AUTOCOMPACT_PCT_OVERRIDE: process.env.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE || "50", + CLAUDE_CODE_AUTO_COMPACT_WINDOW: process.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW || "65536", + CLAUDE_AUTOCOMPACT_PCT_OVERRIDE: process.env.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE || "35", CLAUDE_CODE_MAX_OUTPUT_TOKENS: process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS || "8000", }; delete env.ANTHROPIC_API_KEY;