#6363 内容太长超出最大允许Token,请减小内容或增大max_token,或者降低每次发送字幕行数Could not parse response content as the length limit was reached - Complet

2409:**:1a Posted at: 2 hours ago

内容太长超出最大允许Token,请减小内容或增大max_token,或者降低每次发送字幕行数
Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=32768, prompt_tokens=3029, total_tokens=35797, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=None, reasoning_tokens=32768, rejected_prediction_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=1536), prompt_cache_hit_tokens=1536, prompt_cache_miss_tokens=1493)
Traceback (most recent call last):
File "videotrans\translator\_base.py", line 71, in run
File "videotrans\translator\_base.py", line 206, in _run_srt
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 73, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 63, in run
File "videotrans\translator\_base.py", line 74, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 92, in _item_task
openai.LengthFinishReasonError: Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=32768, prompt_tokens=3029, total_tokens=35797, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=None, reasoning_tokens=32768, rejected_prediction_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=1536), prompt_cache_hit_tokens=1536, prompt_cache_miss_tokens=1493)

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: C:/Users/Administrator/Desktop/START-540.mp4,
输出结果保存到文件夹: C:/Users/Administrator/Desktop/win-pyvideotrans-v4.07/START-540-mp4,
临时文件夹: C:/Users/Administrator/Desktop/win-pyvideotrans-v4.07/tmp/7404/fb6430647a
已选 清理已存在
已选 启用CUDA加速
未选 降噪
语音识别:parakeet日语(本地内置), model_name: , 发音语言: 日语, 断句方式:默认断句
翻译渠道:DeepSeek,原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
代理地址:


=
system:Windows-10-10.0.26200-SP0
version:v4.07
frozen:True
language:zh
root_dir:C:/Users/Administrator/Desktop/win-pyvideotrans-v4.07

1 Replies

这是 DeepSeek 渠道开启了“思考模式(Thinking)”导致的。日志中 reasoning_tokens=32768 表示全部输出 Token 均被思维链推理消耗完,没有剩余 Token 用于生成翻译文本,因此触发 LengthFinishReasonError

解决办法:

  1. 打开 菜单 -> 翻译设置 -> DeepSeek,取消选中 Thinking(思考模式)复选框,关闭思考模式。
  2. 在该设置面板中将 max_token 调大,建议设为 8000 或更大。
  3. 若仍想保留思考模式,请降低单次翻译量:进入 菜单 -> 工具/选项 -> 高级选项 -> 字幕翻译调整,将 AI翻译渠道每批字幕行数 调小(如 20~50),或在主界面取消勾选 发送完整字幕
  4. 你当前版本为 v4.07,建议升级到最新版 v4.08-0802 后重试。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Dondate via PayPal

Related resource