#1578 videotrans.configure._except.StopRetry: Budget 0 is invalid. This model only works in thinking mode.

119.122* Posted at: 1 day ago 👁15

Budget 0 is invalid. This model only works in thinking mode. :Traceback (most recent call last):
File "videotrans\translator\_gemini.py", line 132, in _item_task
File "google\genai\models.py", line 5783, in generate_content_stream
File "google\genai\models.py", line 4666, in _generate_content_stream
File "google\genai\_api_client.py", line 774, in request_streamed
File "google\genai\_api_client.py", line 672, in _request
File "google\genai\errors.py", line 101, in raise_for_response
google.genai.errors.ClientError: 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Budget 0 is invalid. This model only works in thinking mode.', 'status': 'INVALID_ARGUMENT'}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 928, in run
File "videotrans\translator\_base.py", line 77, 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\_gemini.py", line 152, in _item_task
videotrans.configure._except.StopRetry: Budget 0 is invalid. This model only works in thinking mode.


=
system:Windows-10-10.0.26200-SP0
version:v3.85
frozen:True
language:zh
root_dir:B:/win-videotrans

1 Replies

这个错误是因为 Gemini 模型需要在思考模式下运行,但预算设置为 0 导致的。请按以下步骤解决:

  1. 检查 Gemini API Key:确保在设置中填写的 Gemini API Key 是有效的。
  2. 更换 Gemini 模型

    • 在翻译设置中,尝试更换为其他 Gemini 模型,比如 gemini-1.5-flashgemini-1.5-pro
  3. 如果问题依旧

    • 暂时更换为其他翻译渠道,如 Google、DeepSeek 或 OpenAI。
    • 或者等待 Gemini 服务恢复正常。

这个错误通常与 Gemini API 的服务配置有关,而不是软件本身的问题。

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

Trending Questions