langflow-ai/langflow · error · ValueError
Flow version ids cannot be present in both add/remove operat
Error message
Flow version ids cannot be present in both add/remove operations: {ids}. What it means
Error "Flow version ids cannot be present in both add/remove operations: {ids}." thrown in langflow-ai/langflow.
Source
Thrown at src/backend/base/langflow/api/v1/mappers/deployments/contracts.py:84
class FlowVersionPatch(BaseModel):
"""Normalized add/remove patch used by attachment reconciliation."""
add_flow_version_ids: list[UUID] = Field(default_factory=list)
remove_flow_version_ids: list[UUID] = Field(default_factory=list)
@field_validator("add_flow_version_ids", "remove_flow_version_ids")
@classmethod
def _dedupe_ids(cls, values: list[UUID]) -> list[UUID]:
return list(dict.fromkeys(values))
@model_validator(mode="after")
def _validate_no_overlap(self) -> FlowVersionPatch:
overlap = set(self.add_flow_version_ids).intersection(self.remove_flow_version_ids)
if overlap:
ids = ", ".join(sorted(str(value) for value in overlap))
msg = f"Flow version ids cannot be present in both add/remove operations: {ids}."
raise ValueError(msg)
return self
View on GitHub (pinned to 976ec789d2)
Solutions
- Remove the duplicated flow version ids from either the add or the remove list; an id cannot appear in both.
When it happens
Trigger: Occurs when the same flow version id appears in both the add and remove lists of a deployment update operation.
Common situations: See trigger scenarios.
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/f321234c0db87bcf.
Report an issue: GitHub.