{"record":{"id":"b4a2616c7a9e8e69","repo":"vllm-project/vllm","slug":"unsupported-kv-role-self-kv-role-supported-rol","errorCode":null,"errorMessage":"Unsupported kv_role: {self.kv_role}. Supported roles are {get_args(KVRole)}","messagePattern":"Unsupported kv_role: (.+?)\\. Supported roles are (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/kv_transfer.py","lineNumber":97,"sourceCode":"\n        Provide a hash that uniquely identifies all the configs\n        that affect the structure of the computation\n        graph from input ids/embeddings to the final hidden states,\n        excluding anything before input ids/embeddings and after\n        the final hidden states.\n        \"\"\"\n        # no factors to consider.\n        # this config will not affect the computation graph.\n        factors: list[Any] = []\n        hash_str = safe_hash(str(factors).encode(), usedforsecurity=False).hexdigest()\n        return hash_str\n\n    def __post_init__(self) -> None:\n        if self.engine_id is None:\n            self.engine_id = str(uuid.uuid4())\n\n        if self.kv_role is not None and self.kv_role not in get_args(KVRole):\n            raise ValueError(\n                f\"Unsupported kv_role: {self.kv_role}. \"\n                f\"Supported roles are {get_args(KVRole)}\"\n            )\n\n        if self.kv_connector is not None and self.kv_role is None:\n            raise ValueError(\n                \"Please specify kv_role when kv_connector \"\n                f\"is set, supported roles are {get_args(KVRole)}\"\n            )\n\n    @property\n    def is_kv_transfer_instance(self) -> bool:\n        return self.kv_connector is not None and self.kv_role in get_args(KVRole)\n\n    @property\n    def is_kv_producer(self) -> bool:\n        return self.kv_connector is not None and self.kv_role in get_args(KVProducer)\n","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/kv_transfer.py#L79-L115","documentation":"Error \"Unsupported kv_role: {self.kv_role}. Supported roles are {get_args(KVRole)}\" thrown in vllm-project/vllm.","triggerScenarios":"Raised at vllm/config/kv_transfer.py:97 when validation fails: Unsupported kv_role. Typically triggered by an incompatible or incomplete vLLM configuration, an unsupported platform/backend combination, or a runtime resource/dependency that is missing.","commonSituations":"Commonly encountered at vllm/config/kv_transfer.py:97 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.","solutions":["Set kv_role to one of the supported roles listed in the error (e.g. 'kv_producer', 'kv_consumer', or 'kv_both')."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}