Answers for LLM inference engineers

ImportError: cannot import name 'X' from 'vllm...' (GuidedDecodingParams, get_open_port, ChatCompletionRequest, ...): which vLLM releases have it

Most of these errors come from three vLLM releases. 0.12.0 (2025-12-03) removed GuidedDecodingParams (use StructuredOutputsParams, from 0.11.0) and split vllm.utils into submodules: get_open_port and get_ip are in vllm.utils.network_utils, FlexibleArgumentParser in vllm.utils.argparse_utils, get_tokenizer in vllm.tokenizers. 0.14.0 (2026-01-20) dropped the last deprecated alias, vllm.utils.get_open_port. 0.15.0 (2026-01-29) split vllm.entrypoints.openai.protocol by endpoint. The import is often not in your code but in TRL: TRL before 0.27.0 needs vLLM below 0.12.0, and trl vllm-serve before TRL 0.28.0 needs vLLM below 0.14.0. For any other name, in any module of vLLM, paste the error below.

Published 2026-11-25 · Data as of 2026-11-25 · vLLM 0.1.0 to 0.34.0, the first release of each of 34 minor versions · read from the source of each release tag, nothing was installed or run (how, limits)

Examples:

Runs in your browser on vllm.json (3,733 KB, about a fifth of that over the network); nothing you paste is sent anywhere. Covers 115 top-level names and 122,592 module-and-name pairs in 4,336 modules.

Which vLLM names moved, and where do I import them from now?

The imports other projects use most, and the release in which the old path stopped working. The lookup gives the same answer for every other name.

Old importFails fromImport from now
from vllm.utils import get_open_port0.14.0 (a deprecated alias in 0.12 and 0.13)vllm.utils.network_utils
from vllm.utils import get_ip0.12.0vllm.utils.network_utils
from vllm.utils import FlexibleArgumentParser0.12.0vllm.utils.argparse_utils
from vllm.utils import cdiv0.12.0vllm.utils.math_utils
from vllm.transformers_utils.tokenizer import get_tokenizer0.12.0vllm.tokenizers
from vllm.sampling_params import GuidedDecodingParams0.12.0vllm.sampling_params.StructuredOutputsParams (from 0.11.0)
from vllm.entrypoints.openai.protocol import ChatCompletionRequest0.15.0vllm.entrypoints.openai.chat_completion.protocol
from vllm.entrypoints.openai.protocol import CompletionRequest0.15.0vllm.entrypoints.openai.completion.protocol
from vllm.entrypoints.openai.protocol import ErrorResponse0.15.0vllm.entrypoints.serve.engine.protocol (from 0.29.0; entrypoints.openai.engine.protocol in 0.15 to 0.28)
from vllm.worker.worker import Worker0.11.0vllm.v1.worker.gpu_worker

Names that did not move: from vllm import LLM, SamplingParams (every release), vllm.distributed.utils.StatelessProcessGroup (from 0.7.0), vllm.distributed.parallel_state.get_world_group (from 0.6.0) and vllm.distributed.device_communicators.pynccl.PyNcclCommunicator (from 0.5.0) are importable in 0.34.0.

Which TRL works with which vLLM?

The TRL release decides which vLLM names are imported. These ranges come from TRL's source at every release from 0.14.0 to 1.18.2.

TRLWhat it imports from vLLMvLLM that imports
TRL 0.16.0 to 0.26.2GRPOTrainer, RLOOTrainer, OnlineDPOTrainer and trl vllm-serve import GuidedDecodingParams whenever vLLM is installedbelow 0.12.0
TRL 0.17.0 to 0.27.2trl vllm-serve imports get_open_port from vllm.utilsbelow 0.14.0
TRL 0.27.0 and laterchooses GuidedDecodingParams or StructuredOutputsParams by vLLM versionany, for this name
TRL 0.28.0 and laterchooses vllm.utils or vllm.utils.network_utils for get_open_portany, for this name

TRL's own vllm extra pins a narrower range (for example vllm==0.10.2 in 0.24 and 0.25, <0.12.0 in 0.26, <0.34.0 in 1.18). A vLLM installed separately, or a newer one in a container image, ignores that pin; then the import fails with the errors on this page.

Which vLLM modules disappeared?

973 of the 4,336 modules that have existed are gone from 0.34.0; most are model and kernel files. The modules other code imported most, by release (deeper model, layer and backend files are left out of this table but are in the lookup):

ReleaseDate (PyPI)Modules goneModules
0.11.02025-10-0488vllm.adapter_commons, vllm.adapter_commons.layers, vllm.adapter_commons.models, vllm.adapter_commons.request, vllm.adapter_commons.utils, vllm.adapter_commons.worker_manager, vllm.attention.ops.nki_flash_attn, vllm.compilation.base_piecewise_backend, vllm.compilation.multi_output_match, vllm.core, vllm.core.block, vllm.core.block.block_table, vllm.core.block.common, vllm.core.block.cpu_gpu_block_allocator, vllm.core.block.interfaces, vllm.core.block.naive_block, vllm.core.block.prefix_caching_block, vllm.core.block.utils, vllm.core.block_manager, vllm.core.evictor, vllm.core.interfaces, vllm.core.placeholder_block_space_manager, vllm.core.scheduler, vllm.distributed.device_communicators.custom_all_reduce_utils, vllm.distributed.device_communicators.neuron_communicator, vllm.distributed.kv_transfer.kv_connector_agent, vllm.engine.async_timeout, vllm.engine.multiprocessing, vllm.engine.multiprocessing.client, vllm.engine.multiprocessing.engine, vllm.engine.output_processor, vllm.engine.output_processor.interfaces, vllm.engine.output_processor.multi_step, vllm.engine.output_processor.single_step, vllm.engine.output_processor.stop_checker, vllm.engine.output_processor.util, vllm.executor.mp_distributed_executor, vllm.executor.multiproc_worker_utils, vllm.inputs.registry, vllm.jsontree ...
0.12.02025-12-0329vllm.attention.ops.rocm_aiter_mla, vllm.attention.ops.rocm_aiter_paged_attn, vllm.attention.ops.triton_flash_attention, vllm.compilation.cuda_piecewise_backend, vllm.engine.metrics, vllm.engine.metrics_types, vllm.entrypoints.openai.logits_processors, vllm.entrypoints.openai.serving_classification, vllm.entrypoints.openai.serving_embedding, vllm.entrypoints.openai.serving_pooling, vllm.entrypoints.openai.serving_score, vllm.executor, vllm.executor.executor_base, vllm.executor.msgspec_utils, vllm.executor.ray_distributed_executor, vllm.executor.ray_utils, vllm.executor.uniproc_executor, vllm.lora.layers.qkv_x_parallel_linear, vllm.model_executor.layers.shared_fused_moe, vllm.test_utils, vllm.transformers_utils.configs.deepseek_v3, vllm.transformers_utils.configs.nemotron_vl, vllm.transformers_utils.detokenizer_utils, vllm.transformers_utils.tokenizers, vllm.transformers_utils.tokenizers.mistral, vllm.v1.executor.utils, vllm.v1.worker.ubatch_splitting, vllm.worker, vllm.worker.worker_base
0.14.02026-01-2030vllm.attention.layers, vllm.attention.layers.chunked_local_attention, vllm.attention.layers.cross_attention, vllm.attention.layers.encoder_only_attention, vllm.attention.layers.mm_encoder_attention, vllm.attention.ops, vllm.attention.ops.chunked_prefill_paged_decode, vllm.attention.ops.common, vllm.attention.ops.flashmla, vllm.attention.ops.merge_attn_states, vllm.attention.ops.paged_attn, vllm.attention.ops.pallas_kv_cache_update, vllm.attention.ops.prefix_prefill, vllm.attention.ops.rocm_aiter_mla_sparse, vllm.attention.ops.triton_decode_attention, vllm.attention.ops.triton_merge_attn_states, vllm.attention.ops.triton_reshape_and_cache_flash, vllm.attention.ops.triton_unified_attention, vllm.attention.ops.vit_attn_wrappers, vllm.attention.selector, vllm.attention.utils.fa_utils, vllm.distributed.device_communicators.tpu_communicator, vllm.distributed.tpu_distributed_utils, vllm.entrypoints.openai.tool_parsers, vllm.lora.ops.xla_ops, vllm.lora.punica_wrapper.punica_tpu, vllm.model_executor.model_loader.tpu, vllm.transformers_utils.tokenizer_base, vllm.v1.engine.processor, vllm.v1.worker.tpu_model_runner
0.15.02026-01-2918vllm.entrypoints.anthropic.serving_messages, vllm.entrypoints.context, vllm.entrypoints.openai.protocol, vllm.entrypoints.openai.serving_chat, vllm.entrypoints.openai.serving_chat_stream_harmony, vllm.entrypoints.openai.serving_completion, vllm.entrypoints.openai.serving_engine, vllm.entrypoints.openai.serving_models, vllm.entrypoints.openai.serving_responses, vllm.entrypoints.openai.serving_transcription, vllm.entrypoints.responses_utils, vllm.entrypoints.score_utils, vllm.entrypoints.tool, vllm.entrypoints.tool_server, vllm.multimodal.base, vllm.multimodal.profiling, vllm.v1.sample.tpu, vllm.v1.worker.tpu_worker
0.22.02026-05-298vllm.beam_search, vllm.entrypoints.openai.realtime, vllm.entrypoints.openai.speech_to_text, vllm.model_executor.layers.deepseek_compressor, vllm.model_executor.layers.deepseek_v4_attention, vllm.model_executor.layers.kda, vllm.transformers_utils.tokenizer, vllm.v1.kv_offload.reuse_manager

How do I read the error?

How was this read, and how was it checked?

From the source of each release tag, with Python's ast module; no release was installed or imported. A module's names are everything it binds at module level, what from .x import * brings in, and the names a module-level __getattr__ serves from a table of strings (the lazy top level of vllm, the deprecated aliases of vllm.utils in 0.12 and 0.13, the lazy config and processor classes of vllm.transformers_utils). Code under if TYPE_CHECKING: is skipped. Dates come from PyPI. The TRL column was read from TRL's release tags the same way.

Checks: (1) each of the 115 top-level names is found as plain text in vllm/__init__.py in every release of its range (2,512 name-and-release pairs) and not on either side (30 edges). (2) A regular expression finds 206,105 definitions in 22,937 file versions; all are among the names read. (3) Against a different source, the wheels on PyPI (read by HTTP range requests), 18 release checks agree:

Name or moduleReleaseWheel and data
vllm.sampling_params.GuidedDecodingParams0.11.2has it
vllm.sampling_params.GuidedDecodingParams0.12.0does not
vllm.sampling_params.StructuredOutputsParams0.11.0has it
vllm.sampling_params.StructuredOutputsParams0.10.2does not
vllm.utils.get_open_port0.13.0has it
vllm.utils.get_open_port0.14.0does not
vllm.utils.network_utils.get_open_port0.12.0has it
vllm.utils.network_utils.get_open_port0.11.0does not
vllm.utils.FlexibleArgumentParser0.11.0has it
vllm.utils.FlexibleArgumentParser0.12.0does not
vllm.entrypoints.openai.protocol0.14.1has it
vllm.entrypoints.openai.protocol0.15.0does not
vllm.entrypoints.openai.chat_completion.protocol.ChatCompletionRequest0.15.0has it
vllm.entrypoints.openai.chat_completion.protocol.ChatCompletionRequest0.14.1does not
vllm.worker.worker0.10.2has it
vllm.worker.worker0.11.0does not
vllm.model_executor.guided_decoding0.10.0has it
vllm.model_executor.guided_decoding0.11.0does not

Limits

Questions

How do I fix "cannot import name 'GuidedDecodingParams' from 'vllm.sampling_params'"?

vLLM 0.12.0 (2025-12-03) removed GuidedDecodingParams; 0.11.2 is the last release with it. Its replacement, StructuredOutputsParams, exists from 0.11.0. If the import is in TRL (GRPOTrainer, RLOOTrainer, OnlineDPOTrainer or trl vllm-serve), upgrade TRL to 0.27.0 or later, which picks the class by vLLM version, or keep vLLM below 0.12.0.

How do I fix "cannot import name 'get_open_port' from 'vllm.utils'"?

Import it from vllm.utils.network_utils (from 0.12.0). vLLM 0.12 and 0.13 still served the old import with a DeprecationWarning; 0.14.0 (2026-01-20) removed it. trl vllm-serve before TRL 0.28.0 uses the old import, so upgrade TRL or keep vLLM below 0.14.0.

Where did vllm.entrypoints.openai.protocol go?

vLLM 0.15.0 (2026-01-29) split it by endpoint: ChatCompletionRequest is in vllm.entrypoints.openai.chat_completion.protocol, CompletionRequest in vllm.entrypoints.openai.completion.protocol, and ErrorResponse in vllm.entrypoints.serve.engine.protocol from 0.29.0. 0.14.1 is the last release with the old module.

Why do so many vllm.utils imports fail after upgrading to vLLM 0.12?

0.12.0 split vllm.utils into submodules (network_utils, argparse_utils, math_utils, torch_utils, mem_utils and others) and moved get_tokenizer to vllm.tokenizers. Only three names kept a deprecated alias. The lookup shows the new module for each name.

Does this page cover the model and layer modules too?

Yes: every module of vllm from 0.1.0 to 0.34.0, 122,592 module-and-name pairs in 4,336 modules, read at the first release of each minor version.

Sources

The same data as JSON: vllm.json, licensed CC BY 4.0.

Related: vllm serve "unrecognized arguments" · which PyTorch and CUDA each vLLM release needs · "cannot import name ... from 'trl'" · "... from 'transformers'".