mirror of
https://github.com/t8y2/dbx.git
synced 2026-11-01 00:25:38 +00:00
fix(ai): extend timeout and token budget for thinking models
Thinking models like DeepSeek V4 Flash can exceed the 120s stream timeout during long reasoning, causing truncated output and missing answers. Increase stream timeout to 600s when thinking is enabled, raise max_tokens floor to 8192, and bump reasoning display max-height. Closes #326
This commit is contained in:
@@ -738,7 +738,7 @@ const messageRenderer = createAiMessageRenderer({ markdown: formatInlineText });
|
||||
<div
|
||||
class="overflow-hidden transition-all duration-200 ease-in-out"
|
||||
:style="{
|
||||
maxHeight: expandedReasoning.has(i) || msg.isThinking ? '2000px' : '0px',
|
||||
maxHeight: expandedReasoning.has(i) || msg.isThinking ? '20000px' : '0px',
|
||||
opacity: expandedReasoning.has(i) || msg.isThinking ? '1' : '0',
|
||||
}"
|
||||
>
|
||||
|
||||
@@ -94,6 +94,7 @@ export async function runAiStream(
|
||||
|
||||
const sid = sessionId || uuid();
|
||||
const params = actionParams(input.action);
|
||||
const maxTokens = input.config.enableThinking ? Math.max(params.maxTokens, 8192) : params.maxTokens;
|
||||
|
||||
await api.aiStream(
|
||||
sid,
|
||||
@@ -101,7 +102,7 @@ export async function runAiStream(
|
||||
config: input.config,
|
||||
systemPrompt,
|
||||
messages,
|
||||
maxTokens: params.maxTokens,
|
||||
maxTokens,
|
||||
temperature: params.temperature,
|
||||
},
|
||||
(chunk) => {
|
||||
|
||||
Reference in New Issue
Block a user