Change the CLAUDE_CODE_MAX_OUTPUT_TOKENS (#5142)
* Change the CLAUDE_CODE_MAX_OUTPUT_TOKENS * Add changeset * Add comment and variable to explain the changes
This commit is contained in:
1 parent
3abdc9ad0f
commit
af7e3a4d20
2 files changed
+9
-2
No files matched your search
@@ -182,6 +182,9 @@ const CLAUDE_CODE_TIMEOUT = 600000 // 10 minutes
|
||||
// https://github.com/sindresorhus/execa/blob/main/docs/api.md#optionsmaxbuffer
|
||||
const BUFFER_SIZE = 20_000_000 // 20 MB
|
||||
|
||||
// This is the limit imposed by the CLI
|
||||
const CLAUDE_CODE_MAX_OUTPUT_TOKENS = "32000"
|
||||
|
||||
function runProcess(
|
||||
{ systemPrompt, messages, path, modelId, thinkingBudgetTokens, shouldUseFile }: ClaudeCodeOptions,
|
||||
cwd: string,
|
||||
@@ -210,8 +213,7 @@ function runProcess(
|
||||
const env: NodeJS.ProcessEnv = {
|
||||
...process.env,
|
||||
// Respect the user's environment variables but set defaults.
|
||||
// The default is 32000. However, I've gotten larger responses.
|
||||
CLAUDE_CODE_MAX_OUTPUT_TOKENS: process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS || "64000",
|
||||
CLAUDE_CODE_MAX_OUTPUT_TOKENS: process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS || CLAUDE_CODE_MAX_OUTPUT_TOKENS,
|
||||
// Disable telemetry, auto-updater and error reporting.
|
||||
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC || "1",
|
||||
DISABLE_NON_ESSENTIAL_MODEL_CALLS: process.env.DISABLE_NON_ESSENTIAL_MODEL_CALLS || "1",
|
||||
|
||||
Reference in new issue
Block a user