fix(translate): increase max_tokens 4096→8192 for DeepSeek multi-language output
finish_reason=length from DeepSeek v4 Flash — model runs out of output tokens due to reasoning_content (CoT) + multi-language (4 langs). 8192 tokens ensures complete JSON response for preview and execution.
This commit is contained in:
@@ -946,7 +946,7 @@ class TranslationExecutor:
|
||||
{"role": "user", "content": prompt},
|
||||
],
|
||||
"temperature": 0.1,
|
||||
"max_tokens": 4096,
|
||||
"max_tokens": 8192,
|
||||
}
|
||||
# Structured output (response_format) only for native OpenAI — upstream providers routed via
|
||||
# Kilo/OpenRouter may not support it (e.g. StepFun returns "structured_outputs is not supported")
|
||||
|
||||
@@ -952,7 +952,7 @@ class TranslationPreview:
|
||||
{"role": "user", "content": prompt},
|
||||
],
|
||||
"temperature": 0.1,
|
||||
"max_tokens": 4096,
|
||||
"max_tokens": 8192,
|
||||
}
|
||||
# Structured output (response_format) only for native OpenAI — upstream providers routed via
|
||||
# Kilo/OpenRouter may not support it (e.g. StepFun returns "structured_outputs is not supported")
|
||||
|
||||
Reference in New Issue
Block a user