{"record":{"id":"347c580c1853fe41","repo":"langflow-ai/langflow","slug":"cannot-use-deployment-provider-id-the-wxo-deploym","errorCode":null,"errorMessage":"Cannot use deployment_provider_id: the wxo_deployments feature flag is disabled","messagePattern":"Cannot use deployment_provider_id: the wxo_deployments feature flag is disabled","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"src/backend/base/langflow/api/v1/flow_version.py","lineNumber":103,"sourceCode":"\n\ndef _translate_version_error(exc: FlowVersionError) -> HTTPException:\n    \"\"\"Translate a domain exception into an HTTPException.\"\"\"\n    if isinstance(exc, FlowVersionSerializationError):\n        return HTTPException(status_code=422, detail=str(exc))\n    if isinstance(exc, FlowVersionConflictError):\n        return HTTPException(status_code=409, detail=str(exc))\n    if isinstance(exc, FlowVersionDeployedError):\n        return HTTPException(status_code=409, detail=str(exc))\n    if isinstance(exc, FlowVersionNotFoundError):\n        return HTTPException(status_code=404, detail=str(exc))\n    return HTTPException(status_code=500, detail=str(exc))\n\n\ndef _ensure_deployments_enabled_for_provider_id(deployment_provider_id: UUID | None) -> None:\n    if deployment_provider_id and not FEATURE_FLAGS.wxo_deployments:\n        msg = \"Cannot use deployment_provider_id: the wxo_deployments feature flag is disabled\"\n        raise HTTPException(status_code=400, detail=msg)\n\n\n# NOTE: `response_model_exclude_none=True` is intentionally narrow here: we use\n# it to omit `is_deployed` unless deployment status is explicitly requested.\n# If future nullable fields must be returned as explicit null, prefer splitting\n# response schemas/routes and disabling this global exclude-none behavior.\n@router.get(\"/\", response_model_exclude_none=True)\nasync def list_flow_versions(\n    flow_id: UUID,\n    current_user: CurrentActiveUser,\n    session: DbSession,\n    limit: Annotated[int, Query(ge=1, le=100)] = 50,\n    offset: Annotated[int, Query(ge=0)] = 0,\n    deployment_provider_id: Annotated[\n        UUID | None,\n        Query(description=(\"Optional provider account ID for provider account-scoped deployment status.\")),\n    ] = None,\n) -> FlowVersionListResponse:","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/flow_version.py#L85-L121","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Enable the wxo_deployments feature flag in the server's feature-flag settings/environment and restart","Or stop sending deployment_provider_id in the request body until the flag is enabled in that environment","Check for typos in the flag's env/config key — a misspelled key silently leaves it disabled"],"exampleFix":"# before\ncurl -X POST .../flows/$FLOW_ID/versions -d '{\"deployment_provider_id\": \"...\"}'\n\n# after: enable the flag, or omit the field\ncurl -X POST .../flows/$FLOW_ID/versions -d '{\"description\": \"snapshot\"}'","handlingStrategy":"validation","validationCode":"const supportsWxo = await axios.get('/api/v1/config'); // or feature-flags endpoint\n// gate the request field on the flag value before sending","typeGuard":"const versionPayload = (p: { deployment_provider_id?: string }) =>\n  wxoDeploymentsEnabled ? p : (({ deployment_provider_id: _, ...rest }) => rest)(p);","tryCatchPattern":"catch (e) { if (e.response?.status === 400 && /wxo_deployments/.test(e.response.data?.detail)) resendWithoutProviderId(); else throw e; }","preventionTips":["Read the server's feature flags at client startup and conditionally include deployment_provider_id","Keep feature-flag env vars in deployment checklists and verify them in smoke tests","Version-pin API clients and servers together when using gated fields"],"tags":["http-400","feature-flags","deployments","flow-versions","configuration"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}