Commit Graph

17586 Commits

Author SHA1 Message Date
54ee94328f Merge remote-tracking branch 'origin/release-1.9.0' into feat/while-loop
# Conflicts:
#	src/frontend/src/utils/reactflowUtils.ts
#	src/lfx/src/lfx/_assets/component_index.json
2026-04-15 11:17:56 -03:00
14fe53e150 feat: add customOpenUrl utility for secure external link handling (#12705)
* feat: add customOpenUrl utility for secure external link handling

Extract window.open with noopener/noreferrer into a reusable customization
utility and use it in ProviderConfigurationForm. Also converts to type-only
imports where applicable.

* fix: use existing function

* fix: use custom open tab function
2026-04-14 22:07:49 +00:00
a47f2ad17e fix(frontend): add backdrop blur to test deployment modal (#12704)
Match the stepper modal's stronger backdrop overlay style.
2026-04-14 21:32:39 +00:00
38d142a723 fix: Upgrade cuga to 0.2.20 to resolve playwright dependency conflict (#12703)
* fix: upgrade playwright to 1.58.0 to address Chromium CVEs

- Add playwright>=1.58.0 to override-dependencies in pyproject.toml
- Update uv.lock: playwright 1.49.0 -> 1.58.0, pyee 12.0.0 -> 13.0.1
- Fixes CVE-2026-2313, CVE-2026-2314, CVE-2026-2315, CVE-2026-2319,
  CVE-2026-2321, CVE-2026-2441, CVE-2026-2648, CVE-2026-2649
- Ensures Docker builds download updated Chromium with security patches

* fix: update npm to latest version to address brace-expansion CVE-2026-33750

- Add npm update after Node.js installation in Dockerfile
- Fixes CVE-2026-33750 in system npm's brace-expansion dependency
- System npm had brace-expansion 2.0.2, update gets 5.0.5+
- Low risk change: npm is backward compatible, only affects CLI tool

* revert: remove npm update from Dockerfile

- npm update attempts were causing CI build failures
- Bundled npm has issues but updating it is proving problematic
- Focus on playwright CVE fix which is the primary concern
- brace-expansion CVE-2026-33750 is lower priority (DoS only)

* chore: sync uv.lock files

sync uv.lock files

* fix(mcp): dedupe edges in connect_components (#12701)

* fix(mcp): make add_connection idempotent to avoid duplicate edges

connect_components used to append a new edge unconditionally. Because
the edge id is deterministic from source/target/handles, calling it for
a pair the flow already had wired up (UI-then-MCP, batch retry, or just
a repeat call) produced a second edge with the same id, double-wiring
the flow at runtime.

Before appending, scan the existing edges for one with the same id and
return that instead. Different outputs/inputs between the same pair
still produce distinct ids and remain supported.

* test(mcp): cover dedupe against UI-saved edges, broaden match key

Older Langflow UIs saved edges with an `xy-edge__` id prefix instead of
the current `reactflow__edge-`, so an id-based dedup would miss the
UI-then-MCP case for any flow that came from an older version. Switch
the existence check to a structural one (source, target, sourceHandle
name, targetHandle fieldName) so the same logical connection dedupes
regardless of id format.

Add a fixture-driven test that loads MemoryChatbotNoLLM.json (an
xy-edge-prefixed flow) and replays each connection through
add_connection, asserting the edge count does not grow.

* fix(mcp): validate_flow fast-fails and reports partial errors (#12697)

* fix(mcp): validate_flow fast-fails and reports partial errors

validate_flow polled /monitor/builds for up to 30 seconds waiting for
every component to finish before reporting errors. When a component
fails early (for example a missing required field), downstream
components never run, so the loop waited out the full window and
returned just "Build timed out: N/M components completed" with no
actionable context.

- Short-circuit as soon as any completed build reports valid: false;
  return those errors immediately instead of polling on.
- On timeout, include the errors from the builds that did complete
  plus a component_count so the caller can see progress.
- Extract _collect_build_errors so the poll loop and timeout branch
  share the same error shape.

* fix(mcp): stream validate_flow build inline instead of polling

The previous implementation triggered an async build and polled
/monitor/builds, which depended on FastAPI BackgroundTasks firing the
log_vertex_build calls after the trigger request had returned. Under
ASGI test transport these tasks never run, so /monitor/builds stayed
empty and validate_flow timed out with component_count=0.

Switch to event_delivery=direct so the build streams its events back
inside the same request:

- Drive the build via client.stream_post and aggregate per-vertex
  results from end_vertex events.
- Fast-fail on the first vertex with valid=false, since downstream
  vertices depend on it and would not produce useful information.
- Surface top-level error events as a single flow-level error.
- Replace _collect_build_errors with _extract_vertex_error, which
  reads the structured error payload from the end_vertex outputs.

Update the lfx unit tests to use the streaming shape and tighten the
backend integration test to assert real success now that the build
actually runs end to end under ASGI.

* fix(graph): make end_all_traces_in_context Python 3.10 compatible

The implementation called asyncio.create_task(coro, context=context),
but the context= keyword was added to create_task in Python 3.11. On
3.10 it raised TypeError. The bug was latent because nothing in the
test suite previously consumed a streaming build response far enough
for Starlette to dispatch the post-response BackgroundTasks where this
code lives. The validate_flow streaming change exposes it.

On 3.10, route the create_task call through context.run so the new
Task copies the captured context as its current context, matching the
isolation the 3.11 path provides via the context= kwarg.

Add a regression test that asserts end_all_traces sees the value of a
contextvar set before the context was captured, even after the caller
mutates that var.

* fix: failing wxo list llm test (#12700)

patch service layer and update failing test

* [autofix.ci] apply automated fixes

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

* Try to fix the missing typer import

---------

Co-authored-by: Janardan S Kavia <janardanskavia@Janardans-MacBook-Pro.local>
Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@logspace.ai>
Co-authored-by: Hamza Rashid <74062092+HzaRashid@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2026-04-14 21:23:12 +00:00
07cb95a2c5 fix: add pydantic validation on component assistant (#12706) 2026-04-14 18:34:38 -03:00
449c26bb42 fix: failing wxo list llm test (#12700)
patch service layer and update failing test
2026-04-14 20:20:57 +00:00
0b58f1e532 fix(mcp): validate_flow fast-fails and reports partial errors (#12697)
* fix(mcp): validate_flow fast-fails and reports partial errors

validate_flow polled /monitor/builds for up to 30 seconds waiting for
every component to finish before reporting errors. When a component
fails early (for example a missing required field), downstream
components never run, so the loop waited out the full window and
returned just "Build timed out: N/M components completed" with no
actionable context.

- Short-circuit as soon as any completed build reports valid: false;
  return those errors immediately instead of polling on.
- On timeout, include the errors from the builds that did complete
  plus a component_count so the caller can see progress.
- Extract _collect_build_errors so the poll loop and timeout branch
  share the same error shape.

* fix(mcp): stream validate_flow build inline instead of polling

The previous implementation triggered an async build and polled
/monitor/builds, which depended on FastAPI BackgroundTasks firing the
log_vertex_build calls after the trigger request had returned. Under
ASGI test transport these tasks never run, so /monitor/builds stayed
empty and validate_flow timed out with component_count=0.

Switch to event_delivery=direct so the build streams its events back
inside the same request:

- Drive the build via client.stream_post and aggregate per-vertex
  results from end_vertex events.
- Fast-fail on the first vertex with valid=false, since downstream
  vertices depend on it and would not produce useful information.
- Surface top-level error events as a single flow-level error.
- Replace _collect_build_errors with _extract_vertex_error, which
  reads the structured error payload from the end_vertex outputs.

Update the lfx unit tests to use the streaming shape and tighten the
backend integration test to assert real success now that the build
actually runs end to end under ASGI.

* fix(graph): make end_all_traces_in_context Python 3.10 compatible

The implementation called asyncio.create_task(coro, context=context),
but the context= keyword was added to create_task in Python 3.11. On
3.10 it raised TypeError. The bug was latent because nothing in the
test suite previously consumed a streaming build response far enough
for Starlette to dispatch the post-response BackgroundTasks where this
code lives. The validate_flow streaming change exposes it.

On 3.10, route the create_task call through context.run so the new
Task copies the captured context as its current context, matching the
isolation the 3.11 path provides via the context= kwarg.

Add a regression test that asserts end_all_traces sees the value of a
contextvar set before the context was captured, even after the caller
mutates that var.
2026-04-14 19:52:34 +00:00
9a198b6953 fix(mcp): dedupe edges in connect_components (#12701)
* fix(mcp): make add_connection idempotent to avoid duplicate edges

connect_components used to append a new edge unconditionally. Because
the edge id is deterministic from source/target/handles, calling it for
a pair the flow already had wired up (UI-then-MCP, batch retry, or just
a repeat call) produced a second edge with the same id, double-wiring
the flow at runtime.

Before appending, scan the existing edges for one with the same id and
return that instead. Different outputs/inputs between the same pair
still produce distinct ids and remain supported.

* test(mcp): cover dedupe against UI-saved edges, broaden match key

Older Langflow UIs saved edges with an `xy-edge__` id prefix instead of
the current `reactflow__edge-`, so an id-based dedup would miss the
UI-then-MCP case for any flow that came from an older version. Switch
the existence check to a structural one (source, target, sourceHandle
name, targetHandle fieldName) so the same logical connection dedupes
regardless of id format.

Add a fixture-driven test that loads MemoryChatbotNoLLM.json (an
xy-edge-prefixed flow) and replays each connection through
add_connection, asserting the edge count does not grow.
2026-04-14 19:48:58 +00:00
67981c6e14 fix: retry on flow execution failure and surface friendly message for weak models (#12699)
* fix assistant retry

* agent suggestions fix
2026-04-14 19:33:23 +00:00
9f1402ed99 fix: remove fictional gpt-5.3 ids and surface helpful message on model_not_found (#12693)
* fix 5.3 model not working

* [autofix.ci] apply automated fixes

* fix ruff style and checker

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 19:29:39 +00:00
cecc4a6c28 fix(mcp): expose layout tool as layout_flow to match batch dispatch (#12698)
The Python function layout_flow_tool was advertised to MCP clients
under its raw function name (layout_flow_tool) while the batch tool
map dispatched it under layout_flow. A caller copying tool names from
the MCP tool list could not drive batch without translating the name.

Pass name="layout_flow" to the decorator so the external MCP name
matches the batch dispatch key. The Python symbol stays layout_flow_tool
to avoid a clash with the layout_flow helper imported from
lfx.graph.flow_builder.layout.

Added a test that asserts every batch tool_map key is an actual MCP
tool name, so future drift between the two surfaces gets caught.
2026-04-14 19:20:05 +00:00
9539996a81 feat(deployments): verify wxO credentials against instance API (#12449)
* feat(deployments): verify wxO credentials against instance API

- Probe GET /v1/orchestrate/models after IAM token to validate URL+key
- Add POST /deployments/providers/verify-credentials for connection tests
- Extend unit tests for models probe and WxO client stub

* fix(api): rename verify endpoint and redact 422 request input
Rename the deployment provider credential verification route to /deployments/providers/verify and sanitize RequestValidationError responses so raw request payloads are not echoed back in 422 errors. Update route/tests accordingly, including regression coverage for input redaction.

* revert(api): remove verification endpoint follow-up changes

Keep this PR focused on wxO adapter tenant validation via model-list fetch and drop API-layer validation endpoint and request-redaction changes.

* fix(wxo): resolve list_llms rebase conflict with adapter seam

Keep release default-model merge behavior while preserving fetch_models_adapter usage, and update list_llms expectations in tests.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Hamza Rashid <hzarashid@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Hamza Rashid <74062092+HzaRashid@users.noreply.github.com>
2026-04-14 19:11:00 +00:00
b96b17e1d0 fix(frontend): improve deployment stepper visibility in light mode (#12696)
* fix(frontend): improve deployment stepper visibility in light mode

Step labels were using text-muted-foreground which is nearly invisible
in light mode. Changed to text-foreground with font-medium for active
steps. Also added overlayClassName prop to DialogContent to allow
per-dialog backdrop customization, used to lighten the deployment
modal backdrop in light mode.

* fix(frontend): add backdrop blur to deployment stepper modal

---------

Co-authored-by: Hamza Rashid <74062092+HzaRashid@users.noreply.github.com>
2026-04-14 19:10:15 +00:00
b65515f351 fix: add uv sync step to SDK version determination job (#12695)
The determine-sdk-version job was missing the 'uv sync' step that creates
the cache, causing the 'Post Setup Environment' step to fail with:
'cache path does not exist on disk'

This matches the pattern used in determine-lfx-version job (line 247) and
the nightly build workflow (line 104-105).

Fixes the SDK build failure in release workflow dry run.
2026-04-14 18:14:51 +00:00
d93892a214 fix(mcp): preserve category when loading component registry (#12694)
load_registry iterated data.values(), discarding the category
group keys from /api/v1/all. Every component ended up with
category: "", which made the components(category=...) MCP tool
filter return empty results for every category.

Iterate data.items() instead and inject the category name onto
each component's entry so search_registry's category filter works.
2026-04-14 18:13:12 +00:00
acbeaf35ad feat: rename deployment /executions endpoint to /runs (#12685)
* refactor: rename deployment executions to runs at the API boundary
Rename the deployment sub-resource from "executions" to "runs" across
the API layer, frontend hooks, and tests. Internal adapter/service code
retains its own execution terminology — only the public-facing surface
changes.
- URL paths: /{deployment_id}/executions -> /{deployment_id}/runs
- Path param: execution_id -> run_id
- Route functions: create_deployment_execution -> create_deployment_run,
  get_deployment_execution -> get_deployment_run
- Schema classes: ExecutionCreateRequest -> RunCreateRequest,
  ExecutionCreateResponse -> RunCreateResponse,
  ExecutionStatusResponse -> RunStatusResponse
- provider_data field: execution_id -> id
- Frontend hooks: usePostDeploymentExecution -> usePostDeploymentRun,
  useGetDeploymentExecution -> useGetDeploymentRun
- Frontend types: DeploymentExecutionRequest -> DeploymentRunRequest,
  DeploymentExecutionResponse -> DeploymentRunResponse

* fix: rename remaining execution references to runs in FE and schema docs
Complete the executions→runs rename at the API layer by updating
local variables, user-facing error strings, test mock names, and
schema docstrings that still referenced "execution".

* make schema for runs to wxo

* harden validation

* clean up stale refs to old /executions endpoint
2026-04-14 17:53:09 +00:00
5486c9a160 chore: add default models to llm list result from wxo adapter (#12686)
* add default models to llm list response from adapter

* comment

* ensure can't duplicate hardcoded

* remove old commented call

---------

Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
2026-04-14 15:44:42 +00:00
7b856e7d22 fix(loop): iterate when only item is connected and render item as a table (#12669)
* fix(loop): drive iteration from item_output when done is not connected

Extract the loop body execution into an idempotent `_iterate` helper
that both `item_output` and `done_output` invoke. On release-1.9.0,
`_should_process_output` only runs outputs whose name is in the
vertex's outgoing edge source names, so `done_output` never ran when
nothing was connected to `done` and the subgraph iteration never
happened.

`_iterate` caches aggregated results and cached exceptions in ctx so
repeat calls (when both outputs are wired) run the subgraph exactly
once and surface the same failure on re-entry. `item_output` is now
async, calls `_iterate` before stopping the item branch, and returns
a Data payload listing the dispatched items so the inspector shows
real content instead of an empty string.

Add regression tests covering the item-only topology, the classic
both-outputs-connected topology, empty input, cached error re-raise,
and per-run ctx isolation.

* [autofix.ci] apply automated fixes

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

* fix(loop): emit item output as DataFrame so UI renders it as a table

Wrapping the iterated rows in a `Data` payload with `count` / `items`
keys caused the Item inspector to render as JSON instead of as a
tabular view. Return the rows as a DataFrame, mirroring the Mock Data
component pattern, so the inspector uses its table renderer.

* feat(loop): emit summary logs for each run

Add start, complete, skipped, and error log entries from `_iterate` so
the component's Logs tab shows a per-run summary with row counts and
total elapsed time. Failures include the elapsed duration and the
error message.

* [autofix.ci] apply automated fixes

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

* fix(loop): address review comments

- Refresh Research Translation Loop starter flow's saved item-output
  schema (JSON -> Table) to match item_output now returning a DataFrame.
- Clarify the test_ctx_isolation_across_runs docstring: production
  rebuilds the graph per request, so ctx is effectively per-run; reusing
  a single Graph instance across runs is intentionally not exercised.
- Update _iterate's docstring to describe the actual ctx scope rather
  than claiming graph-instance-level reset semantics that the framework
  does not provide.

* [autofix.ci] apply automated fixes

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

* fix(loop): stabilize chat output inspection test

* fix(loop): align starter project with item output contract

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 15:35:38 +00:00
9029c4b61e fix: Updates the CI workflow to handle known dependency conflicts. (#12691)
* fix: upgrade playwright to 1.58.0 to address Chromium CVEs

- Add playwright>=1.58.0 to override-dependencies in pyproject.toml
- Update uv.lock: playwright 1.49.0 -> 1.58.0, pyee 12.0.0 -> 13.0.1
- Fixes CVE-2026-2313, CVE-2026-2314, CVE-2026-2315, CVE-2026-2319,
  CVE-2026-2321, CVE-2026-2441, CVE-2026-2648, CVE-2026-2649
- Ensures Docker builds download updated Chromium with security patches

* fix: update npm to latest version to address brace-expansion CVE-2026-33750

- Add npm update after Node.js installation in Dockerfile
- Fixes CVE-2026-33750 in system npm's brace-expansion dependency
- System npm had brace-expansion 2.0.2, update gets 5.0.5+
- Low risk change: npm is backward compatible, only affects CLI tool

* revert: remove npm update from Dockerfile

- npm update attempts were causing CI build failures
- Bundled npm has issues but updating it is proving problematic
- Focus on playwright CVE fix which is the primary concern
- brace-expansion CVE-2026-33750 is lower priority (DoS only)

* CI: Filter cuga/playwright dependency conflict in release workflow

- Filter cuga/playwright conflict (we override playwright>=1.58.0 for CVE fixes)
- Still fails CI if other genuine dependency issues are detected
- Applied to both base and main package build steps

---------

Co-authored-by: Janardan S Kavia <janardanskavia@Janardans-MacBook-Pro.local>
2026-04-14 15:29:28 +00:00
68a8990a1a feat: validate duplicate tool names at deployment review step (#12675)
* feat: validate duplicate tool names at deployment review step

Add early detection of duplicate WXO tool names before deployment,
preventing users from hitting a 409 error only at deploy time.

- Add `GET /snapshots/check-names` endpoint using SDK's
  `get_drafts_by_names()` for fast server-side lookup
- Add `check_tool_names_exist()` to WXO service adapter
- Show inline validation error with alert banner on the review step
  card when a tool name already exists in the provider
- Block deploy button while duplicate names exist
- Also detect batch duplicates (same name on multiple flows)
- Use `keepPreviousData` to prevent error flicker on re-validation

* fix: update duplicate tool name error message

* refactor: use snapshot list endpoint with name filter instead of dedicated check-names endpoint

Replace the dedicated `/snapshots/check-names` endpoint with a
`provider_snapshot_names` query parameter on the existing
`GET /deployments/snapshots` endpoint. This keeps the API surface
smaller and follows the existing list-with-filter pattern.

* test: add tests for snapshot name filter and duplicate tool name validation

- Add validation on provider_snapshot_names: min_length=1 on Query param,
  strip whitespace and reject empty entries in SnapshotListParams
- Backend unit tests: 5 validation tests + 3 adapter list_snapshots
  name-filter tests + 1 route handler test
- Frontend unit tests: 4 tests for useCheckToolNames hook
- Frontend E2E tests: 3 Playwright tests for duplicate tool name
  detection, unique name acceptance, and error clearing on edit
- Fix step-review unit test mock to include new context fields

* feat: standardize snapshot name filtering to names query param
Rename deployment snapshot filtering from provider_snapshot_names to names across backend and frontend callers.
Add trimmed non-empty + dedup validation, enforce deployment_id/name-filter mutual exclusivity, and normalize WXO snapshot names with expanded unit coverage.

* chore: restore package-lock.json from release-1.9.0

* fix(frontend): limit deployment creation retry to 1

Reduce usePostDeployment mutation retry from default 3 to 1 to avoid
excessive 409 requests when deploying.

* feat(frontend): check duplicate tool names on deployment update

When editing a deployment, pre-existing flows with renamed tool names
are now validated against the provider for duplicates. Previously only
new flows were checked, allowing renamed tools to collide silently.

Expose initialToolNameByFlow from stepper context so step-review can
detect name changes and include them in the provider duplicate check.

* fix(frontend): replace nested button with div role=button in flow list

Outer button element contained inner detach/undo buttons, causing
"button cannot be a descendant of button" console error.

---------

Co-authored-by: Hamza Rashid <hzarashid@gmail.com>
2026-04-14 14:49:55 +00:00
4ddb55b7e4 refactor: design sweep for 1.9.0 release (#12684)
* fix: agent icon color adjustment

* only show environment selector when more that one, adjust spacing

* adjustments to spacing

* fixed context shift

* added space between connections and scrollbar

* content & small updates

* fix: update test for connection panel

* [autofix.ci] apply automated fixes

* conditional padding change

* fix how visibleDeployments is filtered

* updated test

* fix: update deployments content

* updated content

* queryKey matches the API params

* updated approach to avoid extra API calls

* [autofix.ci] apply automated fixes

* add a small space between available connections

* fix: improve memo deps, simplify empty state, harden formatDate, fix test assertions

- Use providers array instead of providers.length in useMemo dep
- Collapse duplicate DeploymentsEmptyState branches
- Add explicit locale and invalid date guard to formatDate
- Fix add-provider-modal test for split text elements
- Add test asserting providerIdsToQuery is decoupled from selection

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Viktor Avelino <viktor.avelino@gmail.com>
Co-authored-by: Viktor Avelino <64113566+viktoravelino@users.noreply.github.com>
2026-04-14 14:26:45 +00:00
d274b7b32a docs: release note typo (#12690)
release-note-typo
2026-04-14 13:59:22 +00:00
f594412171 fix(frontend): auto-populate global variable key-value pairs (#12687)
fix(frontend): auto-populate global variable key-value pairs when creating a connection
updateDetectedEnvVars expected objects with key/global_variable_name
fields, but the backend detection endpoint returns a flat string array
of variable names. Simplified the function to accept string[] directly,
using each name as both the env var key and the global variable binding.
2026-04-14 11:26:19 +00:00
33cb6643f4 feat: enforce unique snapshot to flow version relationship (#12680)
* Enforce unique tool to flow version relationship

* fix: harden deployment snapshot attachment conflict handling
- add typed attachment conflict exceptions in attachment CRUD and map only those conflicts to HTTP 409 in deployment create/update routes
- update snapshot patch flow to bulk-update all attachment rows by provider_snapshot_id, commit inside the guarded block, and keep compensating provider rollback on DB failure
- document race-condition caveats around app-level snapshot/flow-version guards and add targeted warning/info logs for conflict and post-provider DB anomalies
- add/expand unit tests for attachment bulk update behavior, typed conflict exceptions, and snapshot route commit-failure compensation path
- align watsonx conflict-detail wording and corresponding mapper tests for tool/connection/agent duplicate-resource messages

---------

Co-authored-by: Hamza Rashid <hzarashid@gmail.com>
2026-04-14 10:59:46 +00:00
71fbf5ff00 docs: cut version 1.9.0 (#12681)
* version-1.9.0-docs

* [autofix.ci] apply automated fixes

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

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 02:07:01 +00:00
2fa3d1c759 feat: add langflow-sdk support to release workflow (#12679)
* feat: add langflow-sdk build and publish support to release workflow

Add support for building and publishing the langflow-sdk package in the
release workflow, mirroring the nightly build support added in #12491.

Changes:
- Add `release_sdk` workflow input for controlling SDK release
- Add `determine-sdk-version` job with first-release PyPI handling
- Add `build-sdk` job with version verification and import testing
- Add `publish-sdk` job that publishes SDK to PyPI before LFX
- Update `build-lfx` to download SDK artifact and test both wheels together
- Update `build-base` and `build-main` to use SDK wheel as find-links
- Pass SDK artifact to cross-platform tests
- Add validation: releasing LFX requires releasing SDK
- Add pre-release version handling for SDK and LFX's SDK dependency

* Update release.yml

* Update release.yml

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-04-14 01:43:25 +00:00
389b11b884 docs: update wxo signup link (#12683)
Update wxo signup link:
2026-04-13 22:04:24 -04:00
40c5973292 fix: Allow >= specifications in dependencies (#12682)
* fix: Allow >= specifications in dependencies

* [autofix.ci] apply automated fixes

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

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-13 21:35:21 -04:00
19df4606ae chore: update deps (#12657)
* chore: update deps

update deps due to sec vuln

* chore: langchain-core>=1.2.28

langchain-core>=1.2.28

* chore: update pypdf

pypdf 6.10

* chore: pyarrow, openai, litellm, mem0ai, toolguard

picomatch, pyarrow, openai, litellm, mem0ai, toolguard

* chore: override litellm

* chore: match base uv.lock to root

* chore: update tool.uv position

update tool.uv position

* chore: langflow-base[complete]>=0.9.0

langflow-base[complete]>=0.9.0

* chore: revert pyarrow

revert pyarrow

* chore: revert "lfx~=0.4.0",

* chore: lfx white space

* chore: remove allow-direct-references = true

* chore: uv lock --upgrade after merge
2026-04-13 23:23:37 +00:00
26c415056c feat: add SHA-256 hash-based API key lookup (#12597)
* feat: add SHA-256 hash-based API key lookup

Replace the O(n) full table scan in check_key with an indexed
SHA-256 hash column for O(1) lookup. Legacy keys without a hash
fall back to decrypt-and-compare and get their hash backfilled
on first successful match.

- Add api_key_hash column to ApiKey model (nullable, indexed)
- Hash stored at key creation time
- Migration adds column and backfills hashes for existing keys
- Fail closed when multiple keys share the same hash
- Remove unused fernet_obj parameter from decrypt_api_key

* fix(migration): skip hashing duplicate-plaintext API keys

Two-pass backfill: decrypt all rows, group by plaintext, then hash only
unique-plaintext rows. Duplicate-plaintext groups are left with NULL
hash so the runtime fast-path lookup cannot return multiple matches and
fail closed. The runtime slow-path matches and backfills exactly one
row per group on first use; remaining NULL rows become harmless
orphans.

Logs counts only (no key IDs or plaintexts) to avoid leaking
operational info via deployment logs.

Extracts _backfill_hashes helper for testing; adds 9 unit tests.

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
2026-04-13 23:06:44 +00:00
83acc4143d docs: mcp client and other changes (#12627)
* tools-component

* tools-partial-and-release-notes

* mcp-astra-changes

* tutorial-changes

* client-page-and-release-notes

* langflow-mcp-client-for-coding-agents

* fix-links

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* include-explanation-for-step-4

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
2026-04-13 22:28:05 +00:00
a425540bdb docs: add flow versioning (#12634)
* add-flow-versioning-and-release-note

* add-flow-db-location
2026-04-13 22:20:05 +00:00
17ab88fca7 fix: fix base64 padding bug and empty Fernet error messages (#12595)
Extract shared `add_base64_padding` and `ensure_fernet_key` functions
to eliminate duplicated key derivation logic between AuthService and
auth/utils.py.

Fix `_add_padding` adding 4 `=` characters instead of 0 when key length
is a multiple of 4, which broke Fernet key derivation for 44-char keys.

Change `%s` to `%r` in decryption failure logs so InvalidToken exceptions
(which have no message string) render as `InvalidToken()` instead of
empty strings.
2026-04-13 21:18:29 +00:00
95d4c94ef9 fix: upgrade playwright to 1.58.0 to address Chromium CVEs (#12668)
* fix: upgrade playwright to 1.58.0 to address Chromium CVEs

- Add playwright>=1.58.0 to override-dependencies in pyproject.toml
- Update uv.lock: playwright 1.49.0 -> 1.58.0, pyee 12.0.0 -> 13.0.1
- Fixes CVE-2026-2313, CVE-2026-2314, CVE-2026-2315, CVE-2026-2319,
  CVE-2026-2321, CVE-2026-2441, CVE-2026-2648, CVE-2026-2649
- Ensures Docker builds download updated Chromium with security patches

* fix: update npm to latest version to address brace-expansion CVE-2026-33750

- Add npm update after Node.js installation in Dockerfile
- Fixes CVE-2026-33750 in system npm's brace-expansion dependency
- System npm had brace-expansion 2.0.2, update gets 5.0.5+
- Low risk change: npm is backward compatible, only affects CLI tool

* revert: remove npm update from Dockerfile

- npm update attempts were causing CI build failures
- Bundled npm has issues but updating it is proving problematic
- Focus on playwright CVE fix which is the primary concern
- brace-expansion CVE-2026-33750 is lower priority (DoS only)

---------

Co-authored-by: Janardan S Kavia <janardanskavia@Janardans-MacBook-Pro.local>
2026-04-13 21:04:34 +00:00
42e84d0fdf fix: resolve race condition in test_component_logging for Python 3.13 (#12676)
Replace queue.get_nowait() with asyncio.wait_for(queue.get(), timeout=5.0)
to properly wait for async events in the queue, preventing QueueEmpty errors
in Python 3.13.

Fixes flaky test failure in release workflow.
2026-04-13 18:28:04 -04:00
4be5f7f52f chore(i18n): disable automatic browser language detection (#12671)
* chore(i18n): disable automatic browser language detection, hardcode English

* chore(i18n): remove language selector from Settings page
2026-04-13 20:26:42 +00:00
2da54a50d1 fix(ui): show moved flow in destination project without page refresh (#12670)
* fix move flows folders

* fix folder spec

* fix folder spec test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-13 20:07:12 +00:00
953ccd05c1 fix: Build the correct oauth callback URL for MCP Composer (#12662)
* fix: Build the correct oauth callback URL for MCP Composer

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Clean up the normalization function

* Update service.py

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-04-13 20:06:04 +00:00
ac414d369a fix: Root path option in settings for reverse proxy (#12603)
* fix: Root path option in settings for reverse proxy

* Update test_security_cors.py

* fix: Better test for middleware

* Update test_security_cors.py

* Update src/lfx/src/lfx/services/settings/base.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/backend/tests/unit/api/v1/test_mcp_reverse_proxy.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* Ruff fixes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-13 19:23:39 +00:00
0982030961 fix: Resolve relative path issues in bundled environment (#12625)
fix assistant path lfx

Co-authored-by: Antônio Alexandre Borges Lima <104531655+AntonioABLima@users.noreply.github.com>
2026-04-13 19:18:07 +00:00
a216aa9060 fix(ui): refactor connection panel and fix search empty state (#12659)
* fix(ui): refactor connection panel and fix search empty state rendering

Extract connection state management into useConnectionPanelState hook
and search/list UI into ConnectionSearchList component. Fixes bug where
blank list items rendered before the empty state when search returned
no results.

* fix(ui): prevent modal jump when clicking connection items in Chrome

Chrome scrolls the nearest scrollable ancestor when focusing sr-only
inputs inside labels. Adding relative + overflow-hidden to the label
contains the scroll-into-view behavior within the label bounds.
2026-04-13 19:10:07 +00:00
73a48b5810 docs: generate and bump open API spec to 1.9.0 (#12638)
generate-and-bump-openapi-spec-to-1.9.0
2026-04-13 18:59:43 +00:00
d698666a1f fix: restore webhook SSE authentication using FastAPI dependency injection (#12661)
fix sse webhook
2026-04-13 18:55:48 +00:00
faac7ad007 fix: allow booleans, numbers, etc. in root-level tweaks (#12605)
fix: allow booleans, numbers, etc. in root-level tweaks (#11830)

Widen the Tweaks schema to accept bool, int, and float values alongside
str and dict, so scalar tweaks like {"stream": false} are no longer
rejected by Pydantic validation.

bool is listed before int in the union to prevent Pydantic from coercing
booleans to integers (since bool is a subclass of int).

Adds unit tests for boolean and numeric root-level tweaks, as well as
direct Tweaks Pydantic model validation tests.

Co-authored-by: Alex Kuligowski <alekuligowski@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 18:10:36 +00:00
7e786a728f fix: Raw input value leaks into Global Variables dropdown list (#12660)
* Variable input shown in dropdown

* added testcases

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-13 17:39:49 +00:00
349e78c758 fix: propagate resource-specific conflict error to api (#12580)
* fix: preserve resource-specific conflict mapping in wxo deployment flow
- rename DeploymentConflictError to ResourceConflictError (with a backward-compatible alias) and propagate resource/resource_name across deployment error handling
- extend raise_for_status_and_detail to accept explicit conflict hints and only infer resource/resource_name from provider detail as a fallback
- update deployment mappers/helpers to use resource/resource_name and format conflict details from structured fields
- add explicit conflict metadata at known wxo catch/re-raise points (connection/tool/agent paths) and enforce hint passing through raise_as_deployment_error
- prevent create/update top-level handlers from over-tagging conflicts as agent when downstream errors are tool/connection conflicts
- centralize create-agent provider error translation via raise_as_deployment_error
- add/adjust unit tests for route handlers, mapper conflict formatting, wxo service conflict propagation, and lfx deployment exception behavior (including Simple_Agent regression)

* remove DeploymentConflictError shim

* pass resource_name only on creation paths

* allow None

* fix(deployments): simplify conflict mapping and tighten error handling
Remove conflict-hint inference fallback, keep pass-through conflict detail formatting, tighten ClientAPIException status extraction, and drop temporary debug prints in deployment error paths.

* fix(deployments): simplify conflict hint mapping and align test expectations
Remove redundant conflict-hint normalization in deployment exceptions, clarify base mapper conflict-detail docs, and improve invalid flow-version guidance. Update watsonx deployment tests to assert current service-layer conflict/resource and exception-chain behavior.

* get rid of tool name fallbacks

* hard code fallback message
2026-04-13 16:08:40 +00:00
5cb8567130 fix: make logs and outputs visible for components in tool mode (#11923)
* fix: display proper tool name and description in tool mode output

When a component runs as a tool (connected to an Agent), the output modal
now shows the proper tool name, description, and tags instead of "Tool 1".

This builds tool metadata from the component's output method name and
description for proper display in the ToolOutputDisplay component.

* test: add unit tests for tool mode event emission

Add tests to verify that components running in tool mode properly emit
events to the frontend for logs visibility and tool metadata display.

* [autofix.ci] apply automated fixes

* fix: use public accessor for component logs instead of private attribute

Add get_logs() method to Component class and use it in component_tool.py
to fix Ruff SLF001 (private-member-access) violation flagged by CodeRabbit.

* fix: emit real-time log SSE events for components running in tool mode

- Set _current_output = TOOL_OUTPUT_NAME in tool wrappers so self.log()
  fires and logs are attributed to the component_as_tool output
- Register on_log event in EventManager with thread-safe queue enqueue
  via call_soon_threadsafe for sync tools running in thread executor
- Register on_log in production event manager (JobQueueService)
- Add appendLogToFlowPool Zustand action to incrementally add logs
- Handle "log" SSE event in buildUtils to update flowPool in real-time
- Fix displayOutputPreview to also check data.logs[outputName].length

* [autofix.ci] apply automated fixes

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

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

* fix: address PR review issues for tool mode logs visibility

- Fix TypeError: add output_name param to _build_output_function and
  _build_output_async_function (called with 4 args but only took 3)
- Fix double-dispatch bug in event_manager.send_event: separate loop
  detection from queue dispatch to avoid misdiagnosing queue RuntimeErrors
- Improve event_manager error handling: warn on QueueFull, error with
  traceback on unexpected failures, warn when loop is unavailable
- Fix TypeScript type: VertexDataTypeAPI.logs uses LogsLogType[] (array)
  and remove the 3 as any casts in appendLogToFlowPool
- Add input validation in buildUtils.ts log event handler to guard
  against undefined keys corrupting the flow pool
- Add server-side logger.error on tool execution failure with exc_info
- Fix tests: replace end_vertex assertions (never emitted by tool path)
  with build_end/log assertions; add LoggingCalculator subclass to test
  real-time log event emission

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* fix: store tool mode logs under component_as_tool output key

- In get_tools(), pass TOOL_OUTPUT_NAME instead of output.name to
  _build_output_function/_build_output_async_function so self.log()
  events are stored under 'component_as_tool' key in flowPool, matching
  what the component_as_tool output's inspect modal reads
- Fix emptyOutput in NodeOutputfield to return false when logs exist,
  preventing disabledInspectButton being vacuously true when outputs={}
- Fix TypeScript undefined index type on internalOutputName in both
  displayOutputPreview and emptyOutput checks

* fix: address ruff violations and test failures in tool mode logs

- Fix ruff I001/SIM117/F401/TRY003/EM101 violations in test_component_toolkit.py
- Replace private _event_manager/_current_output access with public setters in component_tool.py
- Add set_current_output() public method to Component
- Fix send_event() to call put_nowait directly in sync context (no event loop)
- Fix _build_output_function/async to use getattr default fallback for non-component methods
- Fix tests to use constructor-based _id to survive __deepcopy__
- Add TypeError guard in _get_method_return_type for mocked methods
- Remove incorrect pytest.raises(ToolException) since handle_tool_error=True swallows it

* fix: handle array logs in switchOutputView and guard build_end/log events

- Export onEvent for testability
- Guard build_end event against missing data.id to prevent state corruption
- Type results as OutputLogType | LogsLogType[] in SwitchOutputView to handle
  tool mode logs arriving as an array
- Guard resultType/resultMessage against array case to prevent crashes
- Add tests for onEvent log/build_end paths and appendLogToFlowPool store method

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 16:05:54 +00:00
da24dfad61 docs: components index path env var (#12630)
* env-var

* allowlist-for-custom-components

* clarify-which-wins
2026-04-13 15:06:14 +00:00
e89c124153 feat: harden /variables/detections to return only global variables (#12650)
* refactor: simplify /variables/detections to return only verified global variable names
Drop the two-tier detection model (load_from_db + password-field heuristics)
in favor of a single source: fields with load_from_db=True. Candidates are
cross-checked against the user's existing global variables before being
returned, preventing accidental secret leakage via template values.
- Remove DetectedEnvVar model and unresolved_ids from the response
- Flatten response to list[str] of verified global variable names
- Fail fast (404/422) on missing or malformed flow versions
- Add min_length=1 validation on flow_version_ids
- Update frontend types and consumers to match simplified response

* refactor: batch flow-version loading for variable detection
Reduce /variables/detections query fanout by fetching flow versions in one CRUD call and validating IDs up front in the request schema. Add a bounded filter-size guard in flow_version CRUD, keep payload-shape validation explicit in the endpoint, and align unit/API tests with the new batch helper path.
- Deduplicate DetectVarsRequest.flow_version_ids via schema validation
- Add get_flow_version_entries_by_ids() with MAX_VERSION_ID_FILTER_SIZE guard
- Replace per-ID flow-version lookups in detect_env_vars with one batch fetch
- Update detect-env-vars unit tests to mock the batch helper and cover dedup/validation paths
- Add CRUD guard test for oversized ID filters
- Update variable endpoint tests to patch get_flow_version_entries_by_ids
2026-04-13 14:45:28 +00:00
d40e316622 feat(templates): replace AstraDB with native Knowledge Base in Vector Store RAG (#12629)
* feat(templates): replace AstraDB with native Knowledge Base in Vector Store RAG starter project

Swaps the AstraDB vector store components for Langflow's native
KnowledgeIngestion and KnowledgeBase components, removing the need
for external Astra credentials. Updates README and Load Data notes
to reflect the new components, removes the disconnected AstraDB node,
and updates the template tags accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: clean up hardcoded local state from template export

- clear REDACTED api_key placeholder
- clear hardcoded knowledge_base name "release"
- clear hardcoded model options (populated dynamically at runtime)

* Sanitize the KB options

* Sanitize the KB options

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: ogabrielluiz <gabriel@langflow.org>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2026-04-11 23:55:50 +00:00