From 1c3b22058f3407c0bf517ef05b72d03a192974b3 Mon Sep 17 00:00:00 2001 From: kourosh hakhamaneshi <31483498+kouroshHakha@users.noreply.github.com> Date: Fri, 6 Feb 2026 19:01:41 -0800 Subject: [PATCH] [Misc] Add backward-compatible import aliases for renamed translations module (#34015) Signed-off-by: Kourosh Hakhamaneshi Co-authored-by: Cursor --- vllm/entrypoints/openai/translations/__init__.py | 12 ++++++++++++ .../entrypoints/openai/translations/api_router.py | 14 ++++++++++++++ vllm/entrypoints/openai/translations/protocol.py | 14 ++++++++++++++ vllm/entrypoints/openai/translations/serving.py | 14 ++++++++++++++ .../openai/translations/speech_to_text.py | 15 +++++++++++++++ 5 files changed, 69 insertions(+) create mode 100644 vllm/entrypoints/openai/translations/__init__.py create mode 100644 vllm/entrypoints/openai/translations/api_router.py create mode 100644 vllm/entrypoints/openai/translations/protocol.py create mode 100644 vllm/entrypoints/openai/translations/serving.py create mode 100644 vllm/entrypoints/openai/translations/speech_to_text.py diff --git a/vllm/entrypoints/openai/translations/__init__.py b/vllm/entrypoints/openai/translations/__init__.py new file mode 100644 index 0000000000..cf210d5057 --- /dev/null +++ b/vllm/entrypoints/openai/translations/__init__.py @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project + +import warnings + +warnings.warn( + "The 'vllm.entrypoints.openai.translations' module has been renamed to " + "'vllm.entrypoints.openai.speech_to_text'. Please update your imports. " + "This backward-compatible alias will be removed in version 0.17+.", + DeprecationWarning, + stacklevel=2, +) diff --git a/vllm/entrypoints/openai/translations/api_router.py b/vllm/entrypoints/openai/translations/api_router.py new file mode 100644 index 0000000000..4a43bf8b9c --- /dev/null +++ b/vllm/entrypoints/openai/translations/api_router.py @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project + +import warnings + +warnings.warn( + "'vllm.entrypoints.openai.translations.api_router' has been moved to " + "'vllm.entrypoints.openai.speech_to_text.api_router'. Please update your " + "imports. This backward-compatible alias will be removed in version 0.17+.", + DeprecationWarning, + stacklevel=2, +) + +from vllm.entrypoints.openai.speech_to_text.api_router import * # noqa: F401,F403,E402 diff --git a/vllm/entrypoints/openai/translations/protocol.py b/vllm/entrypoints/openai/translations/protocol.py new file mode 100644 index 0000000000..c8ec156d94 --- /dev/null +++ b/vllm/entrypoints/openai/translations/protocol.py @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project + +import warnings + +warnings.warn( + "'vllm.entrypoints.openai.translations.protocol' has been moved to " + "'vllm.entrypoints.openai.speech_to_text.protocol'. Please update your " + "imports. This backward-compatible alias will be removed in version 0.17+.", + DeprecationWarning, + stacklevel=2, +) + +from vllm.entrypoints.openai.speech_to_text.protocol import * # noqa: F401,F403,E402 diff --git a/vllm/entrypoints/openai/translations/serving.py b/vllm/entrypoints/openai/translations/serving.py new file mode 100644 index 0000000000..1749d6155a --- /dev/null +++ b/vllm/entrypoints/openai/translations/serving.py @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project + +import warnings + +warnings.warn( + "'vllm.entrypoints.openai.translations.serving' has been moved to " + "'vllm.entrypoints.openai.speech_to_text.serving'. Please update your " + "imports. This backward-compatible alias will be removed in version 0.17+.", + DeprecationWarning, + stacklevel=2, +) + +from vllm.entrypoints.openai.speech_to_text.serving import * # noqa: F401,F403,E402 diff --git a/vllm/entrypoints/openai/translations/speech_to_text.py b/vllm/entrypoints/openai/translations/speech_to_text.py new file mode 100644 index 0000000000..eb26c6a830 --- /dev/null +++ b/vllm/entrypoints/openai/translations/speech_to_text.py @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project + +import warnings + +warnings.warn( + "'vllm.entrypoints.openai.translations.speech_to_text' has been moved to " + "'vllm.entrypoints.openai.speech_to_text.speech_to_text'. Please update " + "your imports. This backward-compatible alias will be removed in version " + "0.17+.", + DeprecationWarning, + stacklevel=2, +) + +from vllm.entrypoints.openai.speech_to_text.speech_to_text import * # noqa: F401,F403,E402