#4167 videotrans.configure._except.StopRetry: models/gemini-1.5-flash-latest is not found for API version v1beta, or is not su

2400:4050* Posted at: 1 hour ago 👁5

models/gemini-1.5-flash-latest is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.:Traceback (most recent call last):
File "videotrans\translator\_gemini.py", line 103, in _item_task
File "google\genai\models.py", line 5407, in generate_content_stream
File "google\genai\models.py", line 4101, in _generate_content_stream
File "google\genai\_api_client.py", line 1405, in request_streamed
File "google\genai\_api_client.py", line 1224, in _request
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 420, in exc_check
File "tenacity\__init__.py", line 187, in reraise
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 "google\genai\_api_client.py", line 1189, in _request_once
File "google\genai\errors.py", line 121, in raise_for_response
File "google\genai\errors.py", line 146, in raise_error
google.genai.errors.ClientError: 404 NOT_FOUND. {'error': {'code': 404, 'message': 'models/gemini-1.5-flash-latest is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}

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 996, in run
File "videotrans\translator\_base.py", line 97, in run
File "videotrans\translator\_base.py", line 161, 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\_gemini.py", line 123, in _item_task
videotrans.configure._except.StopRetry: models/gemini-1.5-flash-latest is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.


=
system:Windows-10-10.0.22631-SP0
version:v3.99
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v3.99-418

1 Replies

这是因为你配置的 Gemini 模型名称 gemini-1.5-flash-latest 在当前 API 版本下不存在或不被支持。

  1. 打开 pyVideoTrans 软件,点击顶部菜单栏的 翻译设置
  2. 在打开的设置窗口中,找到并点击 Gemini 标签页。
  3. 检查 模型 输入框中的内容。你需要将其修改为当前 Gemini API 支持的有效模型名称。

    • 推荐模型gemini-1.5-flashgemini-1.5-pro
    • 注意:请勿使用 gemini-1.5-flash-latestgemini-1.5-pro-latest 这类带 -latest 后缀的名称,它们可能不被 v1beta API 支持。
  4. 修改后,点击 保存 按钮,然后重试翻译任务。

请查阅相关文档:

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.

Related resource

Similar issues already exist