{"record":{"id":"a829eedf5a819243","repo":"vllm-project/vllm","slug":"custom-ops-cannot-both-enable-and-disable-the-same","errorCode":null,"errorMessage":"custom_ops cannot both enable and disable the same operation(s): {', '.join(conflicting_ops)}. Remove either the '+' or '-' directive","messagePattern":"custom_ops cannot both enable and disable the same operation\\(s\\): (.+?)\\. Remove either the '\\+' or '-' directive","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/compilation.py","lineNumber":1016,"sourceCode":"        for op in self.custom_ops:\n            if op not in {\"all\", \"none\"} and (len(op) < 2 or op[0] not in {\"+\", \"-\"}):\n                raise ValueError(\n                    f\"Invalid syntax '{op}' for custom op, \"\n                    \"must be 'all', 'none', '+op' or '-op' \"\n                    \"(where 'op' is the registered op name)\"\n                )\n\n        base_modes = [op for op in self.custom_ops if op in {\"all\", \"none\"}]\n        if len(base_modes) > 1:\n            raise ValueError(\n                \"custom_ops can contain only one base mode: 'all' or 'none'\"\n            )\n\n        enabled_ops = {op[1:] for op in self.custom_ops if op.startswith(\"+\")}\n        disabled_ops = {op[1:] for op in self.custom_ops if op.startswith(\"-\")}\n        conflicting_ops = sorted(enabled_ops & disabled_ops)\n        if conflicting_ops:\n            raise ValueError(\n                \"custom_ops cannot both enable and disable the same operation(s): \"\n                f\"{', '.join(conflicting_ops)}. Remove either the '+' or '-' directive\"\n            )\n\n        # Currently only eager and inductor backend are supported.\n        # for piecewise compilation. Custom backends are not supported for\n        # piecewise compilation. Update when more backends are supported.\n        if self.mode == CompilationMode.VLLM_COMPILE and self.backend not in [\n            \"\",\n            \"eager\",\n            \"inductor\",\n        ]:\n            raise ValueError(\n                f\"Invalid backend for piecewise compilation: {self.backend}\"\n            )\n\n        # Validate encoder CUDA graph configuration\n        if (","sourceCodeStart":998,"sourceCodeEnd":1034,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/compilation.py#L998-L1034","documentation":"Error \"custom_ops cannot both enable and disable the same operation(s): {', '.join(conflicting_ops)}. Remove either the '+' or '-' directive\" thrown in vllm-project/vllm.","triggerScenarios":"Raised at vllm/config/compilation.py:1016 when validation fails: custom_ops cannot both enable and disable the same operation(s). 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/compilation.py:1016 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":["Remove either the '+op' or '-op' entry for each conflicting op so each op is enabled or disabled only once.","Inspect the conflicting op names listed in the error and deduplicate your custom_ops list."],"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-15T17:31:12.345Z"}