mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-28 00:06:50 +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:
@@ -504,7 +504,8 @@ pub async fn stream(
|
||||
) -> Result<(), String> {
|
||||
validate_config(&request.config)?;
|
||||
|
||||
let client = build_ai_http_client(&request.config, 120)?;
|
||||
let stream_timeout = if request.config.enable_thinking { 600 } else { 120 };
|
||||
let client = build_ai_http_client(&request.config, stream_timeout)?;
|
||||
|
||||
match request.config.provider {
|
||||
AiProvider::Claude => stream_claude(&client, session_id, request, cancelled, &on_chunk).await,
|
||||
|
||||
Reference in New Issue
Block a user