#2707 openai.BadRequestError: Error code: 400 - {'error': {'message': 'Invalid param: The chatCompletion operation does not wo

2407:cdc0* Posted at: 2 hours ago 👁5

请求参数不正确:Error code: 400 - {'error': {'message': 'Invalid param: The chatCompletion operation does not work with the specified model, gpt-5.2-codex. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://


.com/
?linkid
', 'type': 'invalid_request_error', 'param': '3b9e2219-a842-4f56-a58f-8380b6508bd7', 'code': 'param_error'}}:Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 918, in run
File "videotrans\translator\_base.py", line 78, in run
File "videotrans\translator\_base.py", line 137, 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 439, in result
File "concurrent\futures\_base.py", line 391, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_chatgpt.py", line 134, in _item_task
File "openai\_utils\_utils.py", line 286, in wrapper
File "openai\resources\chat\completions\completions.py", line 1156, in create
File "openai\_base_client.py", line 1259, in post
File "openai\_base_client.py", line 1047, in request
openai.BadRequestError: Error code: 400 - {'error': {'message': 'Invalid param: The chatCompletion operation does not work with the specified model, gpt-5.2-codex. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://
.com/
?linkid
', 'type': 'invalid_request_error', 'param': '3b9e2219-a842-4f56-a58f-8380b6508bd7', 'code': 'param_error'}}


=
system:Windows-10-10.0.26200-SP0
version:v3.92
frozen:True
language:zh
root_dir:D:/A

1 Replies

错误信息显示您选择的翻译模型 gpt-5.2-codex 不支持 chatCompletion 操作,即不支持作为翻译模型使用。这是一个模型选择错误。

解决方法:

  1. 在软件主界面,点击 翻译设置 按钮。
  2. 在弹出的窗口中,检查 模型 下拉列表。
  3. 将模型更换为支持聊天/翻译功能的模型,例如:

    • gpt-4o-mini
    • gpt-4o
    • gpt-3.5-turbo
    • 或其他明确标注为 ChatCompletion 的模型(如 claude-3-5-sonnetdeepseek-chat 等)。
  4. 保存设置后重试。

核心原因: gpt-5.2-codex 这类模型通常是专门用于代码补全或特定任务的,无法用于通用的文本翻译。您需要选择一个通用的聊天模型。

请查看更多参考文档:

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.

Donate: https://ko-fi.com/jianchang512

Similar issues already exist

Trending Questions