vllm-project/vllm · error · ValueError

Please specify ec_role when ec_connector is set, supported r

Error message

Please specify ec_role when ec_connector is set, supported roles are {get_args(ECRole)}

What it means

Error "Please specify ec_role when ec_connector is set, supported roles are {get_args(ECRole)}" thrown in vllm-project/vllm.

Source

Thrown at vllm/config/ec_transfer.py:89

        """
        # no factors to consider.
        # this config will not affect the computation graph.
        factors: list[Any] = []
        hash_str = hashlib.md5(str(factors).encode(), usedforsecurity=False).hexdigest()
        return hash_str

    def __post_init__(self) -> None:
        if self.engine_id is None:
            self.engine_id = str(uuid.uuid4())

        if self.ec_role is not None and self.ec_role not in get_args(ECRole):
            raise ValueError(
                f"Unsupported ec_role: {self.ec_role}. "
                f"Supported roles are {get_args(ECRole)}"
            )

        if self.ec_connector is not None and self.ec_role is None:
            raise ValueError(
                "Please specify ec_role when ec_connector "
                f"is set, supported roles are {get_args(ECRole)}"
            )

    @property
    def is_ec_transfer_instance(self) -> bool:
        return self.ec_connector is not None and self.ec_role in get_args(ECRole)

    @property
    def is_ec_producer(self) -> bool:
        return self.ec_connector is not None and self.ec_role in get_args(ECProducer)

    @property
    def is_ec_consumer(self) -> bool:
        return self.ec_connector is not None and self.ec_role in get_args(ECConsumer)

    @property
    def is_encode_only(self) -> bool:

View on GitHub (pinned to c794754062)

Solutions

  1. Specify ec_role alongside ec_connector, using one of the supported roles listed in the error.

When it happens

Trigger: Raised at vllm/config/ec_transfer.py:89 when validation fails: Please specify ec_role when ec_connector is set. Typically triggered by an incompatible or incomplete vLLM configuration, an unsupported platform/backend combination, or a runtime resource/dependency that is missing.

Common situations: Commonly encountered at vllm/config/ec_transfer.py:89 during vLLM startup/config validation or runtime setup when: (1) conflicting CLI flags or config fields are combined, (2) the current platform (CUDA/ROCm/CPU/XPU) or installed optional packages do not support the requested feature, or (3) a required value is absent or out of range. Resolve by correcting the configuration as described in the message, or by selecting a supported alternative.


AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14). Data as JSON: /api/errors/a3a8fdc8b0aed167. Report an issue: GitHub.