fix(ai): make custom output token budget configurable
This commit is contained in:
1 parent
56f85a2c77
commit
1c170396d3
28 files changed
+249
-48
No files matched your search
@@ -179,7 +179,8 @@ export function buildAgentRequest(input: AiRequestInput, history?: api.AiMessage
|
||||
];
|
||||
|
||||
const params = actionParams(input.action);
|
||||
const maxTokens = input.config.enableThinking ? Math.max(params.maxTokens, 8192) : params.maxTokens;
|
||||
const baseMaxTokens = input.config.maxOutputTokens ?? params.maxTokens;
|
||||
const maxTokens = input.config.enableThinking ? Math.max(baseMaxTokens, 8192) : baseMaxTokens;
|
||||
return { messages, systemPrompt, taskContract, maxTokens };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user