#4856 openai.BadRequestError: Error code: 400 - {'error': {'message':

2401:e180* Posted at: 2 hours ago

Unsupported value: 'reasoning_effort' does not support null with this model. Supported values are: 'none', 'low', 'medium', 'high', and 'xhigh'.:Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 858, in run
File "videotrans\translator\_base.py", line 72, in run
File "videotrans\translator\_base.py", line 142, 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 400, in
File "concurrent\futures\_base.py", line 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 73, in _item_task
File "openai\_utils\_utils.py", line 298, in wrapper
File "openai\resources\chat\completions\completions.py", line 1215, in create
File "openai\_base_client.py", line 1332, in post
File "openai\_base_client.py", line 1105, in request
openai.BadRequestError: Error code: 400 - {'error': {'message': "Unsupported value: 'reasoning_effort' does not support null with this model. Supported values are: 'none', 'low', 'medium', 'high', and 'xhigh'.", 'type': 'invalid_request_error', 'param': 'reasoning_effort', 'code': 'unsupported_value'}}


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

1 Replies

该错误是因为向 AI 翻译模型发送了值为 nullreasoning_effort 参数,但当前模型不接收该值。支持的值为 'none', 'low', 'medium', 'high', 'xhigh'

解决方案

  1. 打开菜单栏 翻译设置,进入你正在使用的 AI 翻译渠道(如 OpenAI ChatGPT、DeepSeek、兼容 AI/本地模型等)的设置面板。
  2. 查找与 reasoning_effort 相关的选项,将其值改为 'none' 或留空。若界面无此选项,请手动编辑软件根目录下的 videotrans/params.json 文件:

    • 找到 "reasoning_effort" 字段,将其值从 null 修改为 "none",或直接删除该行。
    • 保存文件后重启软件。
  3. 若问题依旧,可在该渠道的模型名称处选择一个支持 reasoning_effort 参数的模型(如 gpt-4o 等),并确保 reasoning_effort 设为 'none'

请查阅相关文档:

Post Your Reply