SIGN IN SIGN UP
langflow-ai / langflow UNCLAIMED

Langflow is a powerful tool for building and deploying AI-powered agents and workflows.

146432 0 0 Python

feat: deployments api surface (#12041)

* deployment api schemas

* clean up deployments API surface

- Strip internal implementation details from public-facing Field
  descriptions and endpoint docstrings (adapter routing, provider
  snapshots, binding payloads, lazy sync)
- Rename flow_versions to flow_version_ids in DeploymentCreateRequest
  and DeploymentUpdateRequest for clarity
- Remove redundant match_limit query parameter from list_deployments;
  page size already caps results

* fix(api): decouple deployment API schemas from service-layer ID domains

The API schema file inherited from and directly embedded service-layer
types whose identifier fields use IdLike (UUID | str) for provider-owned
IDs. This conflated provider-owned opaque identifiers with Langflow
DB-managed UUIDs at the API boundary.

- Rewrite RedeployResponse as standalone BaseModel instead of inheriting
  from DeploymentOperationResult (which carried id: IdLike)

- Replace ConfigItem with API-local DeploymentConfigCreate
  (reference_id: str, explicitly provider-owned)

- Replace ConfigDeploymentBindingUpdate with API-local
  DeploymentConfigBindingUpdate (config_id: str, not IdLike union)

- Add module docstring documenting the two identifier domains
  (Langflow DB UUIDs vs provider-owned opaque strings)

- Annotate all id/provider_* fields with their ownership domain

- Keep BaseDeploymentData/BaseDeploymentDataUpdate imports
  (no ID fields, stable shapes)

* align naming with recent db work

* docs: clarify deployment ownership boundaries in v1 schemas

* Update deployment model hierarchy

_DeploymentResponseBase          → id, name, type, created_at, updated_at, provider_data
    ├─ DeploymentSummary           → + description
    │    ├─ DeploymentGetResponse
    │    └─ DeploymentDuplicateResponse
    ├─ DeploymentListItem          → + resource_key, attached_count
    ├─ DeploymentCreateResponse    → + description
    ├─ DeploymentUpdateResponse    → + description
    ├─ DeploymentStatusResponse
    └─ RedeployResponse

* move description to base class

* [autofix.ci] apply automated fixes

* Update naming to match persistence layer

* [autofix.ci] apply automated fixes

* Add API layer-specific strict wrapper forbid extra fields

* update docs

* language

* use annotation for non empty str

* Clarify shared object pattern in docs

* Add test validate api keys not in response

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

---------

Co-authored-by: Jordan Frazier <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <[email protected]>
H
Hamza Rashid committed
efb041ffd7ed9e90fa8088f0c585b363b589717b
Parent: 3d4be16
Committed by GitHub <[email protected]> on 3/9/2026, 2:05:30 PM