langflow-ai/langflow · error · HTTPException

Cannot use deployment_provider_id: the wxo_deployments featu

Error message

Cannot use deployment_provider_id: the wxo_deployments feature flag is disabled

What it means

400 from the flow version API's _ensure_deployments_enabled_for_provider_id guard: a request supplied deployment_provider_id but the FEATURE_FLAGS.wxo_deployments flag is disabled in the running server. The feature gate exists so the deployment-provider linkage can ship dark and be enabled per environment; any version request carrying the field while the flag is off is rejected before any DB work.

Source

Thrown at src/backend/base/langflow/api/v1/flow_version.py:103


def _translate_version_error(exc: FlowVersionError) -> HTTPException:
    """Translate a domain exception into an HTTPException."""
    if isinstance(exc, FlowVersionSerializationError):
        return HTTPException(status_code=422, detail=str(exc))
    if isinstance(exc, FlowVersionConflictError):
        return HTTPException(status_code=409, detail=str(exc))
    if isinstance(exc, FlowVersionDeployedError):
        return HTTPException(status_code=409, detail=str(exc))
    if isinstance(exc, FlowVersionNotFoundError):
        return HTTPException(status_code=404, detail=str(exc))
    return HTTPException(status_code=500, detail=str(exc))


def _ensure_deployments_enabled_for_provider_id(deployment_provider_id: UUID | None) -> None:
    if deployment_provider_id and not FEATURE_FLAGS.wxo_deployments:
        msg = "Cannot use deployment_provider_id: the wxo_deployments feature flag is disabled"
        raise HTTPException(status_code=400, detail=msg)


# NOTE: `response_model_exclude_none=True` is intentionally narrow here: we use
# it to omit `is_deployed` unless deployment status is explicitly requested.
# If future nullable fields must be returned as explicit null, prefer splitting
# response schemas/routes and disabling this global exclude-none behavior.
@router.get("/", response_model_exclude_none=True)
async def list_flow_versions(
    flow_id: UUID,
    current_user: CurrentActiveUser,
    session: DbSession,
    limit: Annotated[int, Query(ge=1, le=100)] = 50,
    offset: Annotated[int, Query(ge=0)] = 0,
    deployment_provider_id: Annotated[
        UUID | None,
        Query(description=("Optional provider account ID for provider account-scoped deployment status.")),
    ] = None,
) -> FlowVersionListResponse:

View on GitHub (pinned to 976ec789d2)

Solutions

  1. Enable the wxo_deployments feature flag in the server's feature-flag settings/environment and restart
  2. Or stop sending deployment_provider_id in the request body until the flag is enabled in that environment
  3. Check for typos in the flag's env/config key — a misspelled key silently leaves it disabled

Example fix

# before
curl -X POST .../flows/$FLOW_ID/versions -d '{"deployment_provider_id": "..."}'

# after: enable the flag, or omit the field
curl -X POST .../flows/$FLOW_ID/versions -d '{"description": "snapshot"}'
Defensive patterns

Strategy: validation

Validate before calling

const supportsWxo = await axios.get('/api/v1/config'); // or feature-flags endpoint
// gate the request field on the flag value before sending

Type guard

const versionPayload = (p: { deployment_provider_id?: string }) =>
  wxoDeploymentsEnabled ? p : (({ deployment_provider_id: _, ...rest }) => rest)(p);

Try / catch

catch (e) { if (e.response?.status === 400 && /wxo_deployments/.test(e.response.data?.detail)) resendWithoutProviderId(); else throw e; }

Prevention

When it happens

Trigger: POST/PATCH to /flows/{flow_id}/versions (or any version endpoint) with a non-null deployment_provider_id while LANGFLOW_WXO_DEPLOYMENTS (or the equivalent feature-flag setting) is false or unset.

Common situations: Newer frontend or API client sent to an older server without the flag enabled; flag enabled in staging but not prod; env var typo so the flag never turned on.

Related errors


AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14). Data as JSON: /api/errors/347c580c1853fe41. Report an issue: GitHub.