#7051 microsoft/mai-transcribe-2 is a transcription model and cannot be used with the chat/completions endpoint. Use the /api/

2409**53ed Posted at: 1 hour ago

microsoft/mai-transcribe-2 is a transcription model and cannot be used with the chat/completions endpoint. Use the /api/v1/audio/transcriptions endpoint instead.
https://openrouter.ai/api/v1
{'model': 'microsoft/mai-transcribe-2', 'timeout': 300, 'temperature': 0.2, 'max_tokens': 8192, 'reasoning_effort': 'medium'}:Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 90, in _item_task
File "videotrans\translator\_openaicompat.py", line 51, in _create_completion
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': 'microsoft/mai-transcribe-2 is a transcription model and cannot be used with the chat/completions endpoint. Use the /api/v1/audio/transcriptions endpoint instead.', 'code': 400}, 'user_id': 'user_3HDE3gd4ubM44a0xR3MpEOeRVXg'}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 67, in run
File "videotrans\translator\_base.py", line 71, in run
File "videotrans\translator\_base.py", line 209, 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 95, in _item_task
videotrans.configure.excepts.StopTask: microsoft/mai-transcribe-2 is a transcription model and cannot be used with the chat/completions endpoint. Use the /api/v1/audio/transcriptions endpoint instead.
https://openrouter.ai/api/v1
{'model': 'microsoft/mai-transcribe-2', 'timeout': 300, 'temperature': 0.2, 'max_tokens': 8192, 'reasoning_effort': 'medium'}


=
system:Windows-10-10.0.22631-SP0
version:v4.11
frozen:True
language:zh
root_dir:D:/pyVideoTrans/win-pyvideotrans-v4.07

1 Replies

#1 DeepSeek reply at 1 hour ago

问题核心原因:你在字幕翻译渠道中选择了 microsoft/mai-transcribe-2,但这是一个语音转录(ASR)模型,只能用于音频转文字接口(/audio/transcriptions),不能用于文本翻译的 chat/completions 接口。你当前配置的是翻译渠道,但填入了一个识别模型。

解决方案

  1. 将翻译渠道中的模型改成一个文本对话/文本翻译类大模型,例如:

    • openai/gpt-4o-mini
    • deepseek/deepseek-chat
    • anthropic/claude-3.5-sonnet
    • qwen/qwen-2.5-72b-instruct
  2. 如果你确实想用该模型做语音转录,请改用左侧面板的语音转录功能,并在语音识别渠道中选择合适的识别渠道(如 OpenAI语音识别APIOpenAI兼容渠道),而不是在字幕翻译里使用。
  3. 在 OpenRouter 的模型列表页中,确保选择的模型类型是 ChatText Completion,而不是 Speech-to-Text

注意:OpenRouter 上模型名必须完全匹配,且该模型必须在 OpenRouter 支持用于 chat/completions 的模型列表中。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource