Commit Graph

17889 Commits

Author SHA1 Message Date
8c08e1be7f feat: opensearch multimodal: support filters, adjust defaults (#12319)
* opensearch multimodal: support filters, adjust defaults

Update OpenSearch multimodal vector store component to parse and apply filter_expression JSON to search queries, wrapping existing queries in a bool with filter clauses and applying limit (size) and min_score from the filter object when present. Also validate filter_expression JSON and raise a clear ValueError on parse errors. Adjust component inputs and defaults: remove "JSON" from input_types, change default auth_mode to "jwt", and set bearer_prefix default to false. Uses existing _coerce_filter_clauses helper to build filter clauses.

* Update component_index.json

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* resolve review comments

* [autofix.ci] apply automated fixes

* fix ruff errors

* [autofix.ci] apply automated fixes

* fix ruff errors

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: himavarshagoutham <himavarshajan17@gmail.com>
Co-authored-by: Himavarsha <40851462+HimavarshaVS@users.noreply.github.com>
2026-04-02 13:06:17 +00:00
96c9035fc6 docs: point security reports to hackerone (#12368)
* use-hackerone-and-remove-cve-list

* link-to-ibm-hackerone

* add-release-note

* typo
2026-04-02 01:42:03 +00:00
65c313909c fix: restore langflow-logo-color-black-solid.svg removed in docs release (#12445) 2026-04-01 17:11:41 -04:00
9f255dc851 chore: remove mypy from CI (#12448)
chore: remove mypy from CI and dev dependencies

mypy hasn't caught issues in a long time due to its lenient config
(follow_imports=skip, ignore_missing_imports=true). We evaluated ty as
a replacement but it lacks Pydantic and SQLModel support, producing too
many false positives. Removing the type checker until a viable
alternative matures.
2026-04-01 20:35:44 +00:00
2ef9a5fff2 fix: redact sensitive information from log output (#12271)
* fix: redact sensitive information from log output

Mask or remove API keys, passwords, tokens, auth settings, and
configuration values from logger calls and print statements to prevent
clear-text exposure of credentials in logs.

* fix: address code review feedback on sensitive info redaction

- Restore full API key display in Windows fallback banner (masking
  defeated the purpose of showing the key for the only time)
- Revert test helper masking in locust setup (developers need full
  credentials for load testing)
- Add missing await on logger.adebug in agentic_mcp
- Remove redundant duplicate log line in openai_responses

* fix: replace unnecessary dict comprehension with dict() call

---------

Co-authored-by: Janardan Singh Kavia <janardankavia@ibm.com>
2026-04-01 19:53:04 +00:00
5a0d36cd97 fix: Support self-referential MCP JSON schema (#12359)
* fix: Support self-referential MCP JSON schema

* Address comments from review
2026-04-01 19:45:01 +00:00
389f702743 fix: Always resolve first dep for determinism (#12204)
* fix: Always resolve first dep for determinism

* [autofix.ci] apply automated fixes

* Update component_index.json

* Update component_index.json

* [autofix.ci] apply automated fixes

* Fix ruff error

* Template updates

* [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-01 18:48:25 +00:00
c43fbc95ce feat: LE-374 token usage tracking for LLM and Agent components (#11891)
* feat: add token usage tracking for LLM and Agent components

Track input/output/total tokens across LLM providers (OpenAI, Anthropic,
Ollama) and display them on both node badges and chat messages.

Backend: thread-safe callback handler for agent token accumulation,
usage_metadata extraction for Ollama/LangChain standard, pipeline
integration from component through vertex to API response.

Frontend: token count formatting utility, Coins icon badge on nodes
with tooltip breakdown, chat message status with token display.

* feat: accumulate token usage across serial LLMs on chat messages

Add upstream token usage accumulation so chat messages display the
total tokens from all LLMs in the pipeline, not just the last one.
Output vertex node badges hide token counts since the accumulated
total is shown on the chat message instead.

* chore: add CLAUDE.local.md to .gitignore

* chore: update starter project templates for token usage tracking

* fix: enable token usage tracking for streaming LLM responses

Enable stream_usage=True on OpenAI and Anthropic model constructors so
the API includes token counts in streaming chunks.

Fix _handle_stream to propagate the AIMessage back to _get_chat_result
when not connected to a chat output, so usage can be extracted from the
invoke fallback path.

Accumulate usage across multiple streaming chunks instead of overwriting,
since Anthropic splits input/output tokens across separate events.

* [autofix.ci] apply automated fixes

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

* refactor: centralize token usage extraction into shared module

Extract duplicated token usage logic from Component, LCModelComponent,
TokenUsageCallbackHandler, and Vertex into a shared lfx.schema.token_usage
module. Replace loose dict typing with the existing Usage Pydantic model
throughout the token tracking pipeline. Declare _token_usage on Component
__init__ instead of dynamically injecting it.

* [autofix.ci] apply automated fixes

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

* [autofix.ci] apply automated fixes

* feat: add validation for token_usage field in ResultDataResponse

* feat: enable stream_usage in OpenAI model tests

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* refactor: consolidate token usage extraction into single source of truth

Eliminate ~75 lines of duplicated LLMResult token extraction logic between
the token usage feature (TokenUsageCallbackHandler) and the traces feature
(NativeCallbackHandler) by adding a shared extract_usage_from_llm_result()
function. Also fix missing usage property mapping in chat history hook so
token counts display correctly in playground messages.

* feat: add token usage tracking to all LLM components

Add token usage extraction to the 7 remaining components that make LLM
calls but weren't tracking token consumption:

- Smart Router: direct extract_usage_from_message after invoke
- Guardrails: accumulate_usage across multiple guardrail checks
- Batch Run: accumulate_usage across batch responses
- Smart Transform: extract after ainvoke (already done in prior commit)
- Structured Output: via token_usage_callback on get_chat_result
- LLM Selector: direct extract for judge + callback for selected model
- NotDiamond: via token_usage_callback on get_chat_result

Also adds a backward-compatible token_usage_callback parameter to
get_chat_result() so components using that shared helper can capture
the AIMessage before it's reduced to .content.

* [autofix.ci] apply automated fixes

* fix: update mock_get_chat_result signatures to accept token_usage_callback

The structured output test mocks define explicit parameter lists for
get_chat_result but were missing the new token_usage_callback kwarg,
causing CI failure. Add **kwargs to all mock definitions.

* fix: address PR review findings for token usage UI and data flow

- Remove bare "bg" Tailwind class and replace hard-coded bg-neutral-700
  with semantic bg-success-background on success tooltip (C2/C3)
- Propagate usage properties regardless of source.id presence so agent
  inner messages still show token counts (H9)
- Make PropertiesType.source optional to match the new data flow
- Restore "in" preposition in "Finished in X.Xs" chat message (M10)
- Fix misleading "optional dependency" comment in native_callback.py (C1)

* fix: structured output token usage not captured due to config key mismatch

get_chat_result() reads "get_langchain_callbacks" as a callable, but
structured output was passing "callbacks" as a list — the token handler
was silently dropped. Fix by matching the expected key names and
injecting TokenUsageCallbackHandler via the LangChain callback chain
instead of the token_usage_callback parameter (which doesn't fire for
structured output chains that return Pydantic models, not AIMessages).

* [autofix.ci] apply automated fixes

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

* chore: update component index

* test: add E2E tests for token usage tracking

* [autofix.ci] apply automated fixes

* test: add missing unit tests from PR review

Adds the 4 recommended test scenarios identified in Cristhianzl's review
of PR #11891 (token usage tracking):

- TestStreamingTokenAccumulation: verifies extract_usage_from_chunk() +
  accumulate_usage() correctly accumulates across multiple streaming chunks
  (OpenAI, Anthropic, and usage_metadata formats)
- TestChatOutputTokenUsageAccumulation: verifies message_response() sets
  upstream token usage on the message and updates the stored message when
  applicable
- TestAgentTokenCallbackWiring: verifies TokenUsageCallbackHandler is wired
  into run_agent() callbacks and its result is stored on _token_usage
- TestResultDataResponseTokenUsageValidator: verifies the field_validator
  converts Usage Pydantic models to dicts and passes through None/dict values

* [autofix.ci] apply automated fixes

* Revert "[autofix.ci] apply automated fixes"

This reverts commit c618b12498.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix: move hover action bar above message to prevent overlap with header row

Position the EditMessageButton toolbar using \`bottom-full\` instead of \`-top-4\` so it always sits fully above the message container. This prevents the button bar from overlapping the 'Finished in' usage/time row in bot messages.

* [autofix.ci] apply automated fixes

* feat: add token usage tooltip to bot message and fix node status background

- Wrap "Finished in" stat in a ShadTooltip showing last run time, duration, input/output token breakdown
- Fix node status success background color from bg-success-background to bg-zinc-700

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-01 17:36:35 +00:00
1c2a79c682 fix: Address a dictionary comprehension ruff error (#12438)
fix: Dictionary comprehension ruff error
2026-04-01 17:11:19 +00:00
e3b90b7351 Revert "fix(mcp): Stop sending API key as Bearer token in MCP client (#12349)"
This reverts commit cb665e0006.
2026-04-01 14:20:59 -03:00
cb665e0006 fix(mcp): Stop sending API key as Bearer token in MCP client (#12349) 2026-04-01 14:20:26 -03:00
1337a70d81 fix(test): Add missing required llm field and fix flaky assertions in Watsonx tests (#12436) 2026-04-01 09:38:20 -03:00
3815b9b6f7 fix(test): Add missing required llm field to Watsonx deployment mapper tests (#12434) 2026-04-01 08:58:12 -03:00
73f7bb0f96 feat(deployments): add list (llms) endpoint and wxo implementation (#12389)
* feat: add list (llms) endpoint and wxo implemetation

* use provider_data/provider_result fields instead of top-level llms field

* feat(wxo): make LLM user-configurable and add attach_tool operation
Replace hardcoded DEFAULT_WXO_AGENT_LLM with a required user-supplied
`llm` field on both API and adapter create/update payloads, threaded
through mapper → service → plan → agent call. LLM-only updates (no
tool operations) are now supported.
Add `attach_tool` adapter operation to attach an existing provider tool
to a deployment without connection bindings. At the API layer, bind
operations now accept empty `app_ids` to create/attach a flow version
as an unbound raw tool; the mapper translates this by emitting the raw
tool payload while skipping the provider bind operation, preserving the
adapter-layer invariant that bind always requires non-empty app_ids.
Pre-seed raw_tool_app_ids from declared raw payloads so unbound tools
are created even without a referencing bind operation. Add overlap
validation for conflicting operations on the same tool_id (attach+bind,
remove+bind/unbind, bind/unbind app_id overlap, duplicate attach/remove).

* fix(wxo): improve LLM listing and update code review feedback
Add dedicated LIST_LLMS error prefix so LLM-listing failures are
distinguishable from deployment-list errors in user-facing messages.
Fix test URL path in _with_wxo_wrappers to match the real
WxOClient.get_models_raw endpoint (/models, not /v1/models).
Clarify API contract and intent via docstrings: document that
operations defaults to empty for LLM-only updates, that
build_update_payload_from_spec treats None as "not provided",
and that duplicate models are intentionally passed through.

* fix(wxo): make snapshot update contracts explicit and strict
Split update snapshot semantics into created/added/removed/referenced bindings, remove fallback masking, and enforce strict reconciliation for added flow-version bindings.
Also fix rollback update handling to avoid MissingGreenlet by passing scalar deployment identifiers after rollback, with updated tests across mapper, sync, route, and service coverage.

* harden resource_name_prefix presence validation for update path

* improve ux for missing field error messages

* fix: restore exclude_unset semantics, consolidate has_tool_work, fix format_first_error for model validators

- Restore model_dump(exclude_unset=True) in build_update_payload_from_spec
  so explicitly-set None fields (e.g. description=null) are distinguishable
  from omitted fields.
- Add has_tool_work property on WatsonxDeploymentUpdatePayload and use it
  in the service layer instead of duplicating the routing logic inline.
- Fix format_first_error() to pass through model-validator value_error
  messages instead of sanitizing them to generic "Invalid payload."
- Add missing llm field to pre-existing update schema tests.

* Add explicit is not none check to spec update name

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-31 23:27:43 +00:00
61fac94139 feat: Add Langflow Assistant chat panel for component generation (#11636)
* add agentic api backend

* [autofix.ci] apply automated fixes

* add docs to feature

* ruff and test fixes

* ruff fixes

* fix lfx tests

* fix ruff style

* [autofix.ci] apply automated fixes

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

* refactor code improvements

* add rate limit to tests

* [autofix.ci] apply automated fixes

* new canvas control

* chat UI skeleton v0

* add empty state when doesnt have model provider

* add generating code statuses

* assist panel doc

* add stop button to cancel flow generation

* view code dialog

* add translation json flow and stop button on inputchat

* add floating state of the chat

* refacator frontend codes

* assistant docs.

* add execution from .py file

* update docs

* fix verbose error

* improve disabled placeholder

* unify placeholder messages

* start chat state closed

* add canvas behavior

* fix model selection and position chat

* dialog z100

* [autofix.ci] apply automated fixes

* docs update

* change crypto to uuid regular

* fix inexistent assistant

* chore: removed old unused implmentation

remoced old FF and all it's UI components

* add memory to flow..

* add prompt on agent

* [autofix.ci] apply automated fixes

* cherry-pick first commit

* cherry pick commit changes canvas

* code improvements

* fix session id null and close button

* add tests suite

* fix await error

* ruff style and checker

* [autofix.ci] apply automated fixes

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

* improvements UIUX

* change css canvas controls

* pannel execution

* [autofix.ci] apply automated fixes

* improve code gen

* [autofix.ci] apply automated fixes

* fix: Remove code execution from assistant validation path (#12244)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fixes UI

* UI improvements

* [autofix.ci] apply automated fixes

* code improevements and tests

* fix docker images npm versions

* remove unused test

* fix playwright tests on branch

* [autofix.ci] apply automated fixes

* fix ruff style and checker

* fix jest test

* add assistant e2e tests

* move sticky notes and remove backfor controls

* assistant pr review

* [autofix.ci] apply automated fixes

* update docs and input limit

* [autofix.ci] apply automated fixes

* remove unecessary doc

* improve button

* fix button floating on new session, fix tracing on component generation

* fix padding equal to input

* add basic session management on chat assistant

* [autofix.ci] apply automated fixes

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

* guardrails and prompt injection prevent

* QA round - fix shortcut and model selection

* fix ollama model not working

* add models limitation error, fix watsonX integration and ollama

* adjust code tab size

* tabs session management

* fix tabs overflow layout

* [autofix.ci] apply automated fixes

* ruff style and checker

* [autofix.ci] apply automated fixes

* remove tabs session

* final UX improvements

* add tooltip information and docs update

* fix ruff style and checkrs

* [autofix.ci] apply automated fixes

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

* fix jest tests on assistant

* [autofix.ci] apply automated fixes

* fix tests e2e

* fix assert on streaming messages

* add overwrite files on fe artifacts

* fix model metadata test

* fix agent test retry test

* fix assistant retry

* fix agentic backend tests

* fix providers tests

* fix test fixture

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com>
Co-authored-by: Rodrigo Nader <rodrigonader@MacBook-Pro-de-Rodrigo.local>
2026-03-31 21:56:53 +00:00
1de571aa7c feat(wxo): list / update (agents) directly from Langflow API (#12390)
* feat: (wxo) list(agents/conns/tools) and update(agents) directly from langflow api

* improve error handling, schema constraints, and clean up logic

* rollback on create from existing

* feat(deployments): add include_provider param to DELETE, cascade-delete tools/configs

Adds `include_provider` query param (default true) to DELETE /{deployment_id}.
When true, cascade-deletes the agent's bound tools and connections on the
provider (best-effort) before removing the agent and local DB row.
When false, only the local DB row is removed.

Also fixes 5 pre-existing test failures where mapper mocks were missing
util_existing_deployment_resource_key_for_create.return_value = None.

* [autofix.ci] apply automated fixes

* Remove cascading delete

only support deletion of agents, not tools or connections,
for this iteration.

* [autofix.ci] apply automated fixes

* fix ruff checks

* set default true properly

* fix mapper tests

---------

Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
2026-03-31 21:49:26 +00:00
6cb87cca4c fix: Fix shareable playground build events and message rendering (#12421)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-31 18:32:49 -03:00
811ac4b3e3 chore: bump versions
bump versions
2026-03-31 15:54:36 -04:00
1b3a656e0f fix(deps): pin tar-fs to >=2.1.4 to fix symlink following vulnerabili… (#12419)
fix(deps): pin tar-fs to >=2.1.4 to fix symlink following vulnerability (#12078)

Adds override for tar-fs in package.json to ensure versions prior to
2.1.4 are never resolved. Addresses CVE in tar-fs <2.1.4 (PVR0686558)
where symlink validation bypass was possible with a crafted tarball.

Co-authored-by: Ram Gopal Srikar Katakam <44802869+RamGopalSrikar@users.noreply.github.com>
2026-03-31 15:50:21 -04:00
ccc7ffa714 fix: Improve the sub-process handling of the Docling Worker (#12296)
* fix: Don't reprocess files in Advanced Mode

* Preserve metadata in docling processing

* [autofix.ci] apply automated fixes

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

* Preserve metadata in docling processing

* Preserve metadata in docling processing

* Update docling_inline.py

* [autofix.ci] apply automated fixes

* Preserve metadata in docling processing

* Emit log while worker is active

* [autofix.ci] apply automated fixes

* Update test_file_component_image_processing.py

* Update test_file_component_image_processing.py

* Update component_index.json

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Update component_index.json

* [autofix.ci] apply automated fixes

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

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

* Merge release branch

* Secrets baseline update

* [autofix.ci] apply automated fixes

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

* fix: Handle markdowns with large buffer output

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-31 18:39:55 +00:00
9543d7d31f feat: MCP server for operating Langflow via REST API (#12237)
* feat: add pure flow-builder utilities to lfx

Add flow_builder subpackage with pure functions for manipulating
flow JSON dicts — component ops, edge creation with ReactFlow
handle format, topological layout, and dynamic field detection.

* feat: add MCP server for operating Langflow via REST API

FastMCP server exposing 15 tools across auth, flow, component,
connection, and execution groups. Agents can create flows, add
and configure components, wire connections, and run flows against
a Langflow server through MCP tool calls.

* feat: add langflow-mcp-client console script entry point

* fix: use dict comprehension in setup.py to fix PERF403 lint

* fix: address PR review feedback on MCP client

- Add asyncio.Lock to prevent race condition in _client() under
  concurrent access
- Handle 204 No Content responses in delete() instead of calling
  resp.json() on empty body
- Fix weak assertion in test_default_values

* feat: auto-enable tool_mode when connecting component_as_tool

describe_component_type now shows component_as_tool as an output
for any component with tool_mode-capable outputs. When an agent
connects via component_as_tool, tool_mode is auto-enabled — no
extra step needed.

* refactor: move MCP server from langflow-base to lfx

The MCP server has no langflow dependencies — only httpx, mcp,
and lfx.graph.flow_builder. Moving it to lfx.mcp makes it usable
without installing langflow. Entry point: lfx-mcp.

* fix: isolate session state and harden MCP server

* fix: move test_flow_builder into tests/unit so CI collects coverage

* fix: add trailing slash to /api_key endpoint in MCP client login

The FastAPI endpoint redirects /api_key to /api_key/ (307) and httpx
drops the POST body on redirect, causing API key creation to fail
silently during login.

* fix: isolate session state and harden MCP server

contextvars alone lose state between stdio tool calls. Add module-level
fallback so login credentials persist across calls while still
supporting per-session isolation for SSE transport.

* fix: update test fixture to use contextvars-based server API

The mcp_client fixture was accessing mcp_server_module._client and
._registry directly, but these were replaced with contextvars
(_client_var, _shared_client, _set_client, etc.) in the server
module refactor.

* [autofix.ci] apply automated fixes

* fix: add connection type validation and fix session isolation

- add_connection() now enforces type compatibility using the Graph's
  types_compatible() when types are resolved from the flow. Explicit
  types bypass validation (caller takes responsibility).

- Session state uses only contextvars, removing _shared_client and
  _shared_registry globals that leaked between SSE sessions.

- login() wraps old client close in contextlib.suppress so a failed
  close doesn't prevent establishing a new session.

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-31 18:22:25 +00:00
7c5668e1ca docs: rename data to JSON and dataframe to table (#12352)
* datatypes-page-and-sidebars

* release-notes

* find-and-replace-components

* notes

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* make-component-renaming-a-separate-item

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
2026-03-31 17:51:01 +00:00
86dd7dfc31 fix: resolve code scanning alerts for URL sanitization and insecure randomness (#12362)
Use urlparse for proper hostname validation instead of substring check (LE-719).
Replace Math.random() with crypto.randomUUID() in test fixtures (LE-718).

Co-authored-by: Janardan Singh Kavia <janardankavia@ibm.com>
2026-03-31 17:39:55 +00:00
dd70205827 fix: Propagate error details to Playground chat on flow build failure (#12366)
* add error messages back to playground

* fix message sent even with requirement error on flow
2026-03-31 17:36:36 +00:00
4e449da9da fix: update npm dependencies (#12412)
* fix(docs): update fast-xml-parser to 4.5.4 to address security vulnerability

- Add override for fast-xml-parser to force version 4.5.4
- Fixes entity encoding bypass via regex injection in DOCTYPE entity names
- Addresses CVE in transitive dependency from redocusaurus

* ci: update merge-frontend-coverage if

update merge-frontend-coverage if to not run during doc changes

---------

Co-authored-by: Janardan S Kavia <janardanskavia@Janardans-MacBook-Pro.local>
Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com>
2026-03-31 16:43:54 +00:00
ba3472959f docs: CSS redesign (#12306)
* align-copy-page-to-version

* css-changes

* add-tsx-components

* fix-giant-icons

* improve-download-cta-to-align-with-font

* peer-review

* accessibility-scan

* aria-labels-and-roles-for-svgs

* add continue on error on JEST download step

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2026-03-31 16:43:32 +00:00
be5578493b fix: Add platform markers to cuga extra for macOS x86_64 (#12416) 2026-03-31 13:54:19 -03:00
1810174cd5 fix: Fix shareable playground build events and message rendering (#12361)
* fix shareable playground

* fix ruff style and checker

* [autofix.ci] apply automated fixes

* ruff style checker fix

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-31 16:19:21 +00:00
51fd75bb9f perf(test): Optimize CI tests causing timeout on Windows and Python 3.12 (#12405)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-31 12:01:29 -03:00
263cfc68f1 fix(test): Increase timeout and add waitFor on folder rename input (#12402) 2026-03-31 06:53:14 -03:00
1f1fb20614 fix: enforce message ownership in monitor endpoints (#12202)
* fix: enforce message ownership in monitor endpoints

* [autofix.ci] apply automated fixes

* chore(monitor): add inline comments for ownership fix

* fix(monitor): enforce flow ownership on builds/transactions

Address remaining monitor IDOR/BOLA vectors for flow_id-based endpoints by scoping data access to the authenticated flow owner.

Security strategy: avoid resource-existence leakage by keeping endpoint behavior idempotent and shape-stable for foreign flow IDs (empty 200 pages/maps and 204 no-op deletes) instead of distinguishable error codes.

Adds focused ownership regression tests for monitor endpoints.

* [autofix.ci] apply automated fixes

* fix(monitor): make vertex-build ownership checks mandatory

* fix: add missing delete import in monitor.py

* [autofix.ci] apply automated fixes

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

* [autofix.ci] apply automated fixes

* fix: wrap column references with col() to fix mypy in_ attribute errors

Use col() from sqlmodel for .in_() calls on MessageTable.id and
VertexBuildTable.flow_id so mypy resolves them as column expressions
instead of UUID instances.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Janardan Singh Kavia <janardankavia@ibm.com>
2026-03-30 19:49:12 +00:00
4a9866696c deps: add official wxo client package to langflow-base complete (#12383)
* feat: add official wxo adk to langflow-base complete

* remove stale comment

* remove from complete installation. wait for feature flag to be dropped

* add extra to complete installation

* add core package as explicit dependency because it is used directly

* add temporary fix for adk regression
2026-03-30 18:32:01 +00:00
46d18e39dc feat(deployments): add environment variable overrides for IBM IAM URLs (wxO) (#12373)
* fix: harden verify_credentials error handling and add dev IAM URL overrides
Move authenticator construction inside try/except to catch SDK validation
errors directly from the constructor instead of calling validate() twice.
Add env var overrides (IBM_IAM_MCSP_DEV_URL_OVERRIDE, IBM_IAM_DEV_URL_OVERRIDE)
for non-production wxO environments that use different IAM endpoints.
Expand test coverage for constructor failures, 403 responses, and
empty/whitespace env var fallback behavior.

* improve docs

* tighten up docs

* fix typo

* [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-03-30 16:13:15 +00:00
acc649107c ci: upgrade runtime to python:3.14.3-slim-trixie (#12369)
* ci: upgrade runtime to python:3.14.3-slim-trixie

upgrade our dockerfiles to use LTS runner version python:3.14.3-slim-trixie

* chore: stay with version 3.12

3.12
2026-03-29 20:17:17 +00:00
1d3d6ea1c8 fix(cloud): Harden cloud mode store and fix review findings
Wrap cloudModeStore localStorage access in try-catch to prevent crashes
in private browsing or SSR. Extract storage key to a constant. Log
errors in model refresh catch block instead of silently swallowing.
Remove unused filterEdge from useAddComponent deps. Type
CLOUD_INCOMPATIBLE_PROVIDERS as ReadonlySet.
2026-03-27 19:53:00 -04:00
b09b3ebae6 chore: update deps due to security vulnerabilities (#12371)
* chore: update deps due to security vulnerabilities

update deps due to security vulnerabilities found by mend scan done by openrag team

* chore: run npm audit fix

run npm audit fix

* chore: safe uv audit changes

safe uv audit changes

* chore: safe 2

safe 2

* chore: safe upgrades 3
safe upgrades 3

* chore: pin "langgraph-checkpoint>4.0.0,<5.0.0",

pin "langgraph-checkpoint>4.0.0,<5.0.0",
2026-03-27 23:40:12 +00:00
8ab4f5a926 fix: enforce ownership check in build_flow endpoint (GHSA-qj98-rhf8-v93f) (#12305)
* fix: enforce ownership check in build_flow endpoint (GHSA-qj98-rhf8-v93f)

POST /api/v1/build/{flow_id}/flow fetched flows by UUID without verifying
ownership, allowing any authenticated user to execute another user's private
flow and read its full build output.

- Replace session.get(Flow) with a scoped query that filters by
  Flow.user_id == current_user.id OR access_type == PUBLIC
- Return 404 for both not-found and not-owned cases to avoid UUID enumeration
- Add _job_owners registry to JobQueueService (register_job_owner /
  get_job_owner / cleanup on teardown)
- Register the job owner in build_flow after start_flow_build returns
- Harden GET /api/v1/build/{job_id}/events with the same ownership check;
  jobs started via build_public_tmp have no registered owner and remain
  accessible to any authenticated user

* style: fix ruff import order violations in chat.py and job_queue service

* test: add ownership security tests for build_flow (GHSA-qj98-rhf8-v93f)

Cover the attack scenarios fixed by the ownership check:

- Cross-user build blocked (attacker cannot build victim's private flow)
- Cross-user event polling blocked (attacker cannot read another user's job)
- Public flow remains accessible by any authenticated user
- Unauthenticated request is rejected
- Non-existent flow UUID returns 404

* fix: extend ownership check to cancel_build and add security event logging

- Add ownership check to cancel_build (prevents DoS via job cancellation
  by a different authenticated user)
- Add logger.awarning on IDOR rejection in build_flow, get_build_events,
  and cancel_build so that probing attempts are visible in production logs
- Add cross-reference comment in build_flow explaining why the query
  intentionally extends _read_flow to include PUBLIC flows

* test: add cross-user cancel_build ownership test

Cover the DoS-via-job-cancellation attack vector: an attacker who knows a
job_id must receive 404 when attempting to cancel a build they do not own.

* fix: replace false-positive IDOR warning with accurate log message in build_flow

The previous warning fired for both legitimate 404s (non-existent flows) and
actual IDOR attempts (flow owned by another user), causing alert fatigue and
making real IDOR probing indistinguishable from client typos in production logs.

* [autofix.ci] apply automated fixes

* fix: address review recommendations for IDOR ownership check PR

- Extract _verify_job_ownership helper to centralize ownership check logic
- Add tests for build_public_tmp jobs accessible by any authenticated user
- Add test verifying _job_owners cleanup after cleanup_job
- Add @pytest.mark.security to all security regression tests
- Register security marker in pyproject.toml

* fix: apply ruff lint fixes to test_chat_endpoint

- Replace try-except-pass with contextlib.suppress
- Add missing contextlib import
- Add pragma: allowlist secret to suppress false-positive secret detection on test passwords

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-27 21:55:28 +00:00
2473c1bfae fix: replace grep -oP with sed for Node.js version extraction in Docker builds (#12331)
The grep -oP (PCRE regex) command fails in the python:3.12.12-slim-trixie
Docker base image because PCRE support is not available in the slim variant.

This replaces grep -oP with portable sed -nE in all 5 Dockerfiles and adds
an empty version guard to fail fast with a clear error message instead of
producing a broken download URL.
2026-03-27 20:58:06 +00:00
1f7341931b ref: add feature flag around BE wxo deployments (#12365)
* Add feature flag around BE wxo deployments

* remove old comment

* [autofix.ci] apply automated fixes

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

* fix: improve consistency in feature flag logging and api
- Use consistent DEBUG log level for disabled-flag path in both
  register_builtin_adapters and register_builtin_deployment_mappers
- Remove dead __getattr__ lazy-load hook and deployment_router from
  __all__ in api/v1/__init__.py (no internal callers remain)
- Change _ensure_deployments_enabled_for_filters from 404 to 400 with
  descriptive error message naming the wxo_deployments feature flag

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Hamza Rashid <hzarashid@gmail.com>
2026-03-27 18:08:43 +00:00
56afe00857 fix(cloud): Fix stale closure in useAddComponent and model auto-select ref
Add missing filterType to useAddComponent's useCallback deps so the
callback always sees the current output filter when adding a component.
Reset hasProcessedEmptyRef when flatOptions changes so model auto-select
fires again after cloud mode toggle changes the available options.
2026-03-27 13:52:36 -04:00
901498df3c Add fe tests 2026-03-27 12:52:18 -04:00
cb6fa9537e [autofix.ci] apply automated fixes (attempt 3/3) 2026-03-27 14:19:25 +00:00
c48d050dd0 [autofix.ci] apply automated fixes (attempt 2/3) 2026-03-27 14:17:23 +00:00
c6b3af0d7e [autofix.ci] apply automated fixes 2026-03-27 14:16:34 +00:00
79eb29946b fix(cloud): Mark cloud-hostile components and consolidate cloud metadata utils
Mark git, google, and homeassistant components as cloud_compatible=False
since they require local filesystem, credentials files, or local network
access. Consolidate duplicated cloud metadata helpers into cloudMetadataUtils
and fix the nodeType resolution to use the explicit prop instead of falling
back to nodeClass.type. Fix model input empty state to distinguish disabled
models from cloud-filtered models.
2026-03-27 10:08:59 -04:00
fa9118742d fix(cloud): Backfill cloud metadata for saved nodes
Older flows saved before cloud metadata existed could miss cloud warnings
and option filtering. Overlay only the safe cloud fields from the
current catalog when Cloud Mode is on so existing node state stays
unchanged.
2026-03-27 07:51:26 -04:00
4775eb402e [autofix.ci] apply automated fixes (attempt 2/3) 2026-03-27 11:03:16 +00:00
c93a878d00 [autofix.ci] apply automated fixes 2026-03-27 11:02:23 +00:00
718a21f039 update starter projects 2026-03-27 07:00:29 -04:00
097fc7500c fix(cloud): Tighten cloud compatibility truthfulness
Keep preserved cloud-incompatible selections visible with inline warnings
and make model empty states follow the filtered cloud-compatible set.

Add a cloud default override for SearXNG and update the built component
index so non-dev startup matches cloud mode behavior.
2026-03-27 07:00:27 -04:00