Commit Graph

12963 Commits

Author SHA1 Message Date
cd74c19cdd fix: Migrate env vars from process.env to import.meta.env (#10315)
* 🐛 (feature-flags.ts): update usage of process.env to import.meta.env for Vite compatibility
🔧 (vite.config.mts): replace process.env with import.meta.env in Vite configuration for better integration with Vite bundler

* 🔧 (constants.ts): replace process.env with import.meta.env for Vite compatibility
🔧 (vite-env.d.ts): declare ImportMetaEnv and ImportMeta interfaces for Vite compatibility

*  (jest.config.js): Update Jest configuration to use a custom transformer for replacing import.meta.env with process.env for compatibility
 (transform-import-meta.js): Add custom Jest transformer to replace import.meta.env with process.env for compatibility with Jest testing framework

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-22 17:43:10 +00:00
11c3285683 feat: Add SSL verification option to MCP tools and clients (#10269)
* Add SSL verification option to MCP tools and clients

* Add SSL verification option to MCP tools and clients

* Update component_index.json

* [autofix.ci] apply automated fixes

* chore: update component index

* Update component_index.json

* [autofix.ci] apply automated fixes

* chore: update component index

* chore: update component index

* chore: update component index

* Refactor and expand MCP SSL verification tests

Replaces and significantly expands SSL/TLS verification tests for MCP clients. Adds a new comprehensive test suite in test_mcp_ssl.py, removes the old TestSSLVerificationFeature class from test_mcp_util.py, and updates function signatures in util.py to use keyword-only arguments for verify_ssl. This improves test coverage, clarity, and enforces explicit SSL configuration throughout the MCP client codebase.

* chore: update component index

* [autofix.ci] apply automated fixes

* chore: update component index

* [autofix.ci] apply automated fixes

* chore: update component index

* Update component_index.json

* Update component_index.json

* [autofix.ci] apply automated fixes

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

* Update component_index.json

* [autofix.ci] apply automated fixes

* Add Notion integration components to index

Updated component_index.json to include new Notion integration components: AddContentToPage, NotionDatabaseProperties, NotionListPages, NotionPageContent, NotionPageCreator, NotionPageUpdate, and NotionSearch. These components provide functionality for interacting with Notion databases and pages, including creating, updating, listing, searching, and retrieving content.

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

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

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
2025-10-22 16:43:30 +00:00
ff63d14a5d chore: centralize and align ruff configuration to eliminate lint conflicts (#10354)
* fix: resolve SLF001 private member access violations

This commit fixes SLF001 (private member access) violations by:

1. Creating and using public getters for internal code:
   - CustomComponent: Use get_vertex(), get_results(), set_results(),
     get_artifacts(), set_artifacts() instead of direct private access
   - TracingService: Use component.get_vertex() instead of ._vertex
   - ComposioBaseComponent: Add classmethods get_actions_cache(),
     get_action_schema_cache(), get_all_auth_field_names()
   - ChatComponent: Use get_vertex() and get_id() methods

2. Adding noqa comments for third-party library private access:
   - chroma._collection and chroma._client (langchain-chroma)
   - request._send (FastAPI/Starlette)
   - langwatch and opik client private members

3. Fixing B008 errors (function calls in argument defaults):
   - FastAPI: Use Annotated[Type, Depends()] pattern
   - Typer: Add noqa comments for CLI argument defaults

4. Fixing PLR2004 (magic values in tests):
   - Add per-file-ignores for src/lfx/tests/* in pyproject.toml

This reduces ruff errors from 298 to 107 (64% reduction).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* chore: remove redundant ruff configuration from pyproject.toml files

This commit removes the ruff configuration sections from both the backend and lfx pyproject.toml files, streamlining the project setup. The removed configurations included linting rules, per-file ignores, and other related settings that are no longer necessary.

* config: add comprehensive per-file ruff ignores

Add per-file-ignores to handle legitimate cases that can't be fixed:

1. FastAPI endpoints (TCH rules):
   - api/v1/* and api/v2/* need runtime type evaluation

2. Security warnings (S104, S105, S108, S301, S110):
   - Intentional binding to all interfaces for servers
   - False positives for PASSWORD constants and token variables
   - Intentional pickle usage in caching
   - Legitimate try-except-pass in optional metadata

3. Code execution (S102):
   - Intentional exec/eval in dynamic code tools and validation

4. Third-party library private access (SLF001):
   - Google API, MongoDB, Chroma, MCP, Grandalf libraries
   - Component introspection and code analysis utilities

5. CLI tools (B008):
   - Typer requires function calls in argument defaults

This configuration ensures ruff checks pass consistently with
or without the --config flag.

* refactor: replace private member access with public getters

Replace private member access with public API methods for better
encapsulation and maintainability:

1. Component base inputs:
   - Use get_base_inputs() instead of _base_inputs
   - Updated AgentComponent, CugaComponent, AmazonBedrockConverseModel

2. Component methods:
   - Rename _run_actor() to run_actor() in ApifyActorsComponent
   - Rename _reset_all_output_values() to reset_all_output_values()
   - Use get_output_logs() instead of _output_logs

Files changed:
- src/lfx/src/lfx/components/agents/agent.py
- src/lfx/src/lfx/components/agents/cuga_agent.py
- src/lfx/src/lfx/components/amazon/amazon_bedrock_converse.py
- src/lfx/src/lfx/components/apify/apify_actor.py
- src/lfx/src/lfx/custom/custom_component/component.py
- src/lfx/src/lfx/graph/graph/base.py
- src/lfx/src/lfx/graph/vertex/vertex_types.py

This eliminates 6 SLF001 violations by using proper public APIs.

* fix: add noqa comments for unavoidable third-party private access

Add SLF001 noqa comments for cases where we must access private
members of third-party libraries:

1. Chroma vector store:
   - Access _collection to get document metadata
   - Access _client to retrieve embeddings
   (langchain-chroma library)

2. FastAPI/Starlette Request:
   - Access _send for SSE (Server-Sent Events) connections
   - Required by MCP SSE implementation
   (starlette library)

3. MongoDB Atlas:
   - Access _collection to verify search index
   - Add pragma comment for certificate format documentation
   (langchain-mongodb library)

These are unavoidable as the libraries don't expose public APIs
for these use cases.

Files changed:
- src/backend/base/langflow/api/v1/knowledge_bases.py
- src/backend/base/langflow/api/v1/mcp.py
- src/backend/base/langflow/api/v1/mcp_projects.py
- src/lfx/src/lfx/components/vectorstores/mongodb_atlas.py

* style: auto-fix import sorting and add test secret pragmas

Auto-fixed import sorting violations (I001) in test files using
ruff's --fix option. Also added pragma comments for test API keys
flagged by detect-secrets hook.

Changes:
1. Import sorting (auto-fixed by ruff):
   - Fixed I001 violations in 40 test files
   - Fixed import sorting in langflow/custom/__init__.py

2. Secret pragmas (false positives in tests):
   - Added 'pragma: allowlist secret' for test API keys
   - These are test constants like 'test-key', not real secrets
   - Fixed in test_serve.py, test_serve_app.py, test_common.py,
     test_param_handler.py, test_graph_state_model.py

All changes are formatting-only with no functional impact.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* [autofix.ci] apply automated fixes

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

* fix: enhance error handling in AstraDBBaseComponent

Updated the exception handling in AstraDBBaseComponent to log detailed error messages when metadata retrieval fails. This improves debugging capabilities by providing context on the failure, including the database name and the exception message.

Files changed:
- src/lfx/src/lfx/base/datastax/astradb_base.py

* fix: restore critical import order and fix tracing test mock

Fix issues introduced by import sorting auto-fix:

1. Restore import order in langflow/custom/__init__.py:
   - Move 'from lfx import custom' back to first position
   - Import order affects initialization and component loading
   - Added per-file-ignore (I001) to prevent future auto-sorting

2. Fix tracing service test mock:
   - Update mock_component fixture to support get_vertex() method
   - Create proper mock_vertex object so .id returns string value
   - Fixes: AssertionError in test_trace_component

3. Update .secrets.baseline:
   - Pre-commit hook updated baseline for new test files

Note: test_refresh_starter_projects and test_get_all failures are
pre-existing on main branch (only 'agents' category loads due to
upstream component loading issues), not caused by this PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* config: update ruff configuration for enhanced linting

- Set target Python version to 3.10.
- Added exclusions for specific directories and files to improve linting accuracy.
- Enhanced linting rules with new flake8 configurations for better type checking and immutability handling.

These changes aim to refine the linting process and ensure compatibility with the latest coding standards.

* style: format code for consistency and clarity

- Adjusted the formatting of the `env_file` option in `serve_command` for improved readability.
- Restored import order in `schema.py` by moving `EdgeData` and `NodeData` imports to the correct section, enhancing code organization.

These changes aim to maintain consistent code style and improve clarity in the command and schema files.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-22 15:02:17 +00:00
fa21c4e5f1 ci: Improve Slack notifications for nightly build status (#10244) 2025-10-21 22:45:12 -03:00
743a8d80b6 feat: Astra DB Base Class for Components (#10000)
* feat: Astra DB Base Class for Components

* [autofix.ci] apply automated fixes

* Update test_astra_component.py

* Update test_vector_store_rag.py

* [autofix.ci] apply automated fixes

* Update src/lfx/src/lfx/base/datastax/astradb_base.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Clean up some of the naming

* Bring everything in line with the Base Component

* [autofix.ci] apply automated fixes

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

* Fix importing for circular

* [autofix.ci] apply automated fixes

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

* Update src/lfx/src/lfx/components/datastax/astradb_cql.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* Add comprehensive test suite

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* chore: update component index

* Update astradb_chatmemory.py

* Update the starter templates

* chore: update component index

* Update component_index.json

* chore: update component index

* [autofix.ci] apply automated fixes

* chore: update component index

* Remove cassandra chat from datastax bundle

* [autofix.ci] apply automated fixes

* chore: update component index

* chore: update component index

* More cleanup of astradb imports

* [autofix.ci] apply automated fixes

* chore: update component index

* Update the imports a bit

* [autofix.ci] apply automated fixes

* chore: update component index

* Update astradb_base.py

* [autofix.ci] apply automated fixes

* chore: update component index

* Create astradb_graph.py

* Update __init__.py

* chore: update component index

* chore: update component index

* Fix a couple broken tests

* chore: update component index

* [autofix.ci] apply automated fixes

* chore: update component index

* chore: update component index

* 📝 (Vector Store.spec.ts): remove unnecessary empty line to improve code readability

* 🔧 (.github/workflows/typescript_test.yml): free up disk space to optimize workflow performance

* chore: update component index

* 🔧 (.github/workflows/typescript_test.yml): remove unnecessary tool cache directories and docker images to free up disk space

* 🔧 (.github/workflows/typescript_test.yml): remove unnecessary step to free disk space to optimize workflow execution

* chore: update component index

* chore: update component index

* fix: Refactor out unneeded pieces from base component

* Move embedding model stuff to vectorstore

* [autofix.ci] apply automated fixes

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

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

* fix tests

* Update test_astradb_base_component.py

* Update test_astradb_base_component.py

* [autofix.ci] apply automated fixes

* Update astradb_vectorstore.py

* Fix ruff

* starter proj

* Spacing

* Ruff formatting

* [autofix.ci] apply automated fixes

* Component index update

* [autofix.ci] apply automated fixes

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

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

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-10-21 19:38:29 +00:00
cea4b4294d fix: lazy load settings service; fix env init order (#10142) (#10307)
* fix: lazy load settings service; fix env init order (#10142)

* Ensure settings services are lazy loaded; fixes settings init order

* Remove dupe tests

* remove useless test

* [autofix.ci] apply automated fixes

* Ruff

* [autofix.ci] apply automated fixes

* mypy

* Fix test reference

* ruff fixes

* [autofix.ci] apply automated fixes

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

* ruff + starter projects

---------

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

* chore: update component index

* fix import errors

* [autofix.ci] apply automated fixes

* chore: update component index

* fix service manager imports in  main

* chore: update component index

* fix lfx service manager

* [autofix.ci] apply automated fixes

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

* chore: update component index

* chore: update component index

* chore: update component index

* chore: update component index

* fix tests

* [autofix.ci] apply automated fixes

* chore: update component index

* chore: update component index

* chore: update component index

* fix ruff errors

* [autofix.ci] apply automated fixes

* fix test_mcp_util

* [autofix.ci] apply automated fixes

* chore: update component index

* chore: update component index

* [autofix.ci] apply automated fixes

* build component index

---------

Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-21 15:25:28 +00:00
f42107e2f1 fix: Improve agent input handling and message filtering (#10277)
* Improve agent input handling and message filtering

Enhances agent.py to ensure input text is never empty, providing defaults to prevent Anthropic API errors. Updates utils.py to filter out messages with empty content and log warnings for conversion failures. Also updates starter project to set a default input value.

* Add tests for agent handling of empty and whitespace input

Introduces unit tests to verify that the AgentComponent correctly filters out empty and whitespace-only messages in chat history, and handles empty or whitespace input values without errors for both OpenAI and Anthropic models. These tests address previous issues with message validation and ensure robust input handling.

* [autofix.ci] apply automated fixes

*  (general-bugs-agent-anthropic-integration.spec.ts): add test for user to send images in the playground with the agent component

* Update src/lfx/src/lfx/base/agents/agent.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* Remove unused test parameters in agent component tests

The parameters 'component_class' and 'default_kwargs' were removed from the 'test_agent_filters_empty_chat_history_messages' test as they were not used. This simplifies the test signature.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-21 14:12:26 +00:00
aa3d8e621e fix(loop): make sure loop runs in the correct order by updating run_map (#10305)
* fix: update run_map in LoopComponent to ensure correct predecessor tracking

- Added logic to update the run_map when a new predecessor is added to the run_predecessors list. This ensures that the remove_from_predecessors() function works correctly by maintaining accurate dependencies in the graph's run manager.

* feat: add execution path validation tests for graph flows

- Introduced a new test file to validate execution paths in graph flows using predefined test data.
- Implemented tests to ensure that both async_start and arun execution paths yield identical results.
- Added fixtures and helper functions to facilitate testing without external dependencies.
- Enhanced error reporting for execution mismatches to aid in debugging.

* feat: add DataFrame import to constants.py

- Introduced import for DataFrame from lfx.schema.dataframe to enhance functionality in field typing.

* chore: update component index

* refactor: update TEST_DATA_DIR path in execution path validation tests

- Changed the TEST_DATA_DIR definition to use a relative path based on the current file's location, improving portability and ensuring the tests can locate the necessary data files regardless of the environment.

* [autofix.ci] apply automated fixes

* chore: update component index

* feat: add execution path equivalence tests

This commit introduces a new test suite for validating the equivalence of execution paths between `async_start` and `arun`. The tests ensure that both paths produce identical results, execute components in compatible orders, and handle loops correctly. The `ExecutionTrace` and `ExecutionTracer` classes have been implemented to capture detailed runtime behavior and state changes during graph execution.

* refactor: simplify import statements and enhance test fixture usage

This commit refactors the import statements in the test_execution_path_validation.py file for improved readability by consolidating multiple imports from the same module into a single line. Additionally, it updates the test_flow_execution_equivalence function to include the "client" fixture, enhancing the test's setup for better execution context.

* update component index

* [autofix.ci] apply automated fixes

* chore: update component index

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-20 20:53:20 +00:00
4cad7ab545 feat: Add context_id history to agent and chat (#10319)
* feat: Add context_id history to agent and chat

* chore: update component index

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-20 18:59:58 +00:00
774772eed3 fix(windows): ensure psycopg async compatibility by setting WindowsSe… (#9899)
* fix(windows): ensure psycopg async compatibility by setting WindowsSelectorEventLoopPolicy

* [autofix.ci] apply automated fixes

* add build only script windows

* 📝 (langflow/__main__.py): add type ignore comment to suppress attribute defined error for asyncio set_event_loop_policy on Windows platform

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cris Zanforlin <cris.zanforlin@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2025-10-17 15:17:52 +00:00
5ce2801e6c chore: Update lfx package version to 0.1.13 (#10309) 2025-10-16 21:06:26 -03:00
4f31e58f00 feat: Add new Context ID for message history (#10183)
* feat: Add new context ID for message history

* [autofix.ci] apply automated fixes

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

* Add migration as well

* Update memory.py

* [autofix.ci] apply automated fixes

* chore: update component index

* Add checks on upgrade and downgrade

* chore: update component index

* Update component_index.json

* chore: update component index

* Update component_index.json

* chore: update component index

* chore: update component index

* Update 182e5471b900_add_context_message.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* chore: update component index

* Update 182e5471b900_add_context_message.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-16 21:49:39 +00:00
fb96181f3e feat: Add flow execution permission checks (#10306)
* 📝 (endpoints.py): Add function to check user permission before running a flow
📝 (user.py): Add function to check if user associated with API key has permission to run a flow
📝 (utils.py): Import function to get user by flow ID or endpoint name for webhook user authentication
🔧 (test_endpoints.py): Add security tests to check user permissions for flow access
🔧 (code-tabs.tsx): Remove unnecessary comma in object keys and fix formatting issues

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Fix mypy errors

* Update src/backend/base/langflow/helpers/user.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update user.py

* Fix UUID conversion

* 📝 (endpoints.py): Remove unused import and refactor user permission check to use flow object instead of flow_id
🔧 (utils.py): Fix import statement for get_user_by_flow_id_or_endpoint_name function

* [autofix.ci] apply automated fixes

* 🐛 (endpoints.py): change parameter name from flow_id to flow_id_or_name for better clarity and flexibility
♻️ (endpoints.py): refactor code to use flow.id instead of flow_id for consistency and readability

* Update endpoints.py

* 🐛 (test_endpoints.py): update error message to use consistent wording for user permission denial

* Update endpoints.py

* 📝 (endpoints.py): update function parameter name from 'flow_id' to 'flow' for better clarity and consistency
♻️ (endpoints.py): remove unused 'flow_id_or_name' parameter from 'experimental_run_flow' function to clean up code and improve maintainability

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-16 21:32:07 +00:00
7dd37d49db feat: Add CometAPI integration with new components and documentation. (#9735)
* feat: Add CometAPI integration with new components and documentation.

- Updated sidebars to include CometAPI bundle.
- Enhanced compatibility modules to support CometAPI constants.
- Implemented lazy loading for CometAPI icons in the frontend.
- Added CometAPI to the list of sidebar bundles in styleUtils.
- Introduced CometAPI documentation page detailing usage and parameters.
- Created CometAPI icon components for consistent UI representation.
- Defined CometAPI model constants for available models.
- Developed CometAPI component for language model integration with input handling.
- Implemented model fetching logic from CometAPI API.

* fix: Update CometAPI component with improved error handling and dynamic imports

* Update docs/sidebars.js

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

* Update docs/docs/Components/bundles-cometapi.mdx

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

* Update docs/docs/Components/bundles-cometapi.mdx

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

* Update docs/docs/Components/bundles-cometapi.mdx

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

* Update docs/docs/Components/bundles-cometapi.mdx

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

* Update docs/docs/Components/bundles-cometapi.mdx

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

* Update docs/docs/Components/bundles-cometapi.mdx

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

* add tests to cometAPI

* [autofix.ci] apply automated fixes

* Add new Claude model constant

* fixtest_component_input_types

* build component index

* test_lambda_filter

* fix merge conflicts test_lambda_filter

* build_component_index

* [autofix.ci] apply automated fixes

* fix ruff errors

* update component index

* build component index

* build_component_index

* build component index

* build: Update component index for CometAPI integration

* fix: playwright tests

* chore: Update starter projects with latest component versions

* chore: no code changes (empty change set)

No modifications to source files were detected in this change set.
This is a no-op commit used to record a checkpoint; no behavior,
dependencies, or tests were altered.

Files changed: 0

* fix tests for components

* build component index

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: Himavarsha <40851462+HimavarshaVS@users.noreply.github.com>
Co-authored-by: himavarshagoutham <himavarshajan17@gmail.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>
2025-10-16 20:20:35 +00:00
58dd11fd4b fix: Add session ID validation to MessageBase model (#10308)
feat: Add session ID validation to MessageBase model

- Implemented a field validator for the session_id attribute in the MessageBase class to ensure that UUID values are converted to strings before storage. This enhancement improves data consistency and integrity within the database model.
2025-10-16 19:53:43 +00:00
3d7ad8b088 feat: Adding backend unit tests (#9416)
* Add comprehensive unit tests for Celery modules (celery_app.py and celeryconfig.py)

- Add test_celery_app.py with 10 unit tests covering make_celery function
- Add test_celeryconfig.py with 14 unit tests covering configuration validation
- All tests use proper mocking to avoid external dependencies
- Achieve 100% test pass rate (24/24 tests)
- Improve test coverage from 0% to meaningful levels for core Celery functionality
- Fix linting issues: combine nested with statements and optimize startswith calls

* fix: Resolve linting issues in utility test files

- Remove unused variables and function arguments
- Fix boolean positional arguments in test calls
- Combine nested with statements
- Fix string literals in exception messages
- Add missing newlines at end of files

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* Add comprehensive unit tests for backend modules

This commit adds focused unit test coverage for critical backend components
with meaningful test implementations:

API Layer:
- AsyncStreamingLLMCallbackHandleSIO callback handler tests
- WebSocket streaming, agent actions, and error handling

Components:
- NotifyComponent initialization and configuration tests
- PythonCodeStructuredTool component structure and build tests

Services:
- SocketIOService session management and event handling tests
- S3StorageService AWS operations and error handling tests

Utils:
- async_helpers: AsyncLock, async utilities, and error handling
- component_utils: Component operations and data processing
- compression: Response compression and encoding utilities
- concurrency: Thread management and parallel processing
- lazy_load: Module lazy loading and import optimization
- payload: Data transformation and API payload handling
- schemas: Data validation and schema verification
- version: Version parsing and compatibility checking
- voice_utils: Audio processing and voice feature utilities

All tests include comprehensive mocking, error scenarios, edge cases,
and integration patterns following pytest best practices. Removed
placeholder functions and kept only meaningful test implementations.

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* Fix linting issues in test_data_structure.py and test_util.py

- Fix boolean positional value warnings with noqa comments
- Replace string literals in exceptions with variables
- Combine nested with statements
- Remove unused variables and function arguments
- Use proper parameter names with underscores for unused args

All ruff checks now pass for these test files.

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* merge conflicts

* Add comprehensive unit tests for logic components

- Added test_conditional_router.py with 51 tests for ConditionalRouterComponent
- Added test_data_conditional_router.py with 53 tests for DataConditionalRouterComponent
- Added test_listen.py with 22 tests for ListenComponent
- Added test_notify_component.py with 12 tests for NotifyComponent
- Added test_pass_message.py with 16 tests for PassMessageComponent
- Added test_flow_tool.py with 17 tests for FlowToolComponent

Total: 171 comprehensive tests covering initialization, functionality, edge cases, and error handling
All tests follow clean code practices and achieve high coverage

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* merge conflict

* merge conflict

* fix import errors in unit tests

* fix ruff errors

* [autofix.ci] apply automated fixes

* update path for test_graph in smoke tests

* fix smoke test and failing tests

* modify smoke tests paths

* run lfx tests separately

* fix test_conditional_router.py

* [autofix.ci] apply automated fixes

* fix FlowToolComponent tests

* [autofix.ci] apply automated fixes

* fix: Ensure CLI error output is visible in tests

- Fix error messages not appearing in test output when stdout is redirected
- Temporarily restore stdout before writing error JSON to ensure visibility
- Fix overly broad test condition that matched 'langflow' in file paths
- Only check for actual langflow/lfx import errors, not dependency errors

Fixes 3 failing tests in test_run_starter_projects.py:
- News Aggregator.json
- Pokédex Agent.json
- Price Deal Finder.json

All 736 LFX tests now pass.

* [autofix.ci] apply automated fixes

* Revert "fix: Ensure CLI error output is visible in tests"

This reverts commit 390c669043.

* fix: Correct import paths in test_concurrency.py

* fix test_voice_utils

* fix test_util

* [autofix.ci] apply automated fixes

* fiix test_util

* [autofix.ci] apply automated fixes

* fix test_voice_util.py

* unused args:

* refactor tests to use componentclient

* [autofix.ci] apply automated fixes

* fix ruff errors in test_flow_tool

* skip if api key is not present

* make workflow more robust

* fix mocking in test_celery_app

* [autofix.ci] apply automated fixes

* add celery

* add removed files back

* include once functional

* skip celery tests

* review comments addressed

* remove celery from dependency

* change env var validation

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: himavarshagoutham <himavarshajan17@gmail.com>
Co-authored-by: Himavarsha <40851462+HimavarshaVS@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-16 16:46:26 +00:00
e8765f97b5 fix(cuga): fix cuga component configurations & update version (#10303) 2025-10-16 13:53:59 -03:00
4d4ca8c585 feat: add CUGA integration with agent component and tests (#9907) 2025-10-15 19:11:00 -03:00
edb3d0cc10 ci: Refactor API key handling in tests for consistency (#10290)
* Refactor API key handling in tests for consistency

Centralizes and improves API key retrieval and validation by using shared utility functions from tests/api_keys.py. Updates all test files to use get_openai_api_key and has_api_key, ensuring consistent skipping of tests when the API key is missing, empty, or set to 'dummy'.

* Remove unused imports and improve import grouping in tests

Eliminated unused 'os' imports and reorganized import statements for clarity across multiple test files. This cleanup reduces clutter and improves code readability without affecting test logic or functionality.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-15 19:46:26 +00:00
ef4223b0c8 fix: Improve the appearance of Tools in the Tool output (#10182)
* fix: Improve the appearance of Tools in the Tool output

* [autofix.ci] apply automated fixes

*  (switchOutputView/index.tsx): Update rendering logic to handle optional tool properties more gracefully
🔧 (tool-mode.spec.ts): Add tests for displaying tool information in output modal and custom component in tool mode

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-10-15 19:13:32 +00:00
b34b458287 feat: Right clicking a component should be the same as the (…) button. (#9955)
* feat: Implement right-click context menu for nodes in flow editor

- Added functionality to open a dropdown menu when right-clicking on nodes, enhancing user interaction.
- Integrated state management for right-clicked node ID to control dropdown visibility.
- Updated NodeToolbarComponent to handle dropdown behavior based on right-click events.
- Added tests to ensure the right-click functionality works as expected across various scenarios.

* refactor: Clean up and reorganize imports in GenericNode component

- Streamlined import statements for better readability and organization.
- Ensured consistent import structure by moving and reordering dependencies.
- Enhanced overall maintainability of the GenericNode component.

* feat: Implement right-click node deletion cleanup in flow store

- Added functionality to clear the right-clicked node ID when the corresponding node is deleted, ensuring proper state management.
- Updated flow store to include a new property for tracking the right-clicked node ID.
- Enhanced tests to verify the correct behavior of the right-click context menu and node deletion interactions.

* feat: Enhance right-click functionality for node selection in flow editor

- Updated the right-click behavior to immediately select and focus on nodes, similar to left-click actions.
- Improved the context menu interaction by ensuring it opens without requiring a second click.
- Added tests to verify the new right-click selection and dropdown behavior, ensuring a smoother user experience.

* fixed tests

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2025-10-15 18:52:18 +00:00
9de0bc5848 fix: Allow two or more agent calls to Gemini (#10214)
* fix: Allow two or more agent calls to Gemini

* [autofix.ci] apply automated fixes

* Update google_generative_ai.py

* Update google_generative_ai.py

* Update google_generative_ai.py

* chore: update component index

* Update google_generative_ai.py

* chore: update component index

* Update component_index.json

* chore: update component index

* Update component_index.json

* chore: update component index

* Update language_model.py

* chore: update component index

* [autofix.ci] apply automated fixes

* chore: update component index

* Update component_index.json

* chore: update component index

* Reorganize the imports for the fixed Google model

* Fix templates

* Update component_index.json

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-15 17:51:17 +00:00
87351d28df fix: Standardize beta/experimental indicators to use consistent purple color scheme (#10095)
* fix: Standardize beta/experimental indicators to use consistent purple color scheme

- Add new purpleStatic variant to Badge component with purple border and text
- Update sidebar Beta badges to use purpleStatic variant instead of pinkStatic
- Update "Show Beta" toggle to use purpleStatic variant
- Update store page Beta icon to use purple color scheme with border
- All beta/experimental indicators now use accent-purple-foreground color token

This ensures visual consistency across all beta/experimental indicators in the application.

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* [autofix.ci] apply automated fixes

* Fixed tests

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
2025-10-15 17:22:38 +00:00
b6e248663d fix: Reduce toggle button size (#10115)
fix: Reduce toggle button size to better match interface scale

Reduces the Beta and Legacy toggle switches to 90% of original size
using CSS transform scale to improve visual consistency with the rest
of the interface.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
2025-10-15 16:56:26 +00:00
3ab7ff59f7 docs: update astra component docs links (#10279)
* add-astra-docs-links

* chore: update component index

* duplicate-https

* update-component-index

* chore: update component index

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2025-10-15 15:24:44 +00:00
c83ba9253c feat: add an option to use custom creds for toolkits with Composio managed auth. (#10229)
feat: add cutom fields for toolkits with Composio managed and minor bug fixes and improved DX

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-10-15 03:03:53 +00:00
2a6461560d ci(lfx): add coverage generation and Codecov reporting (#10266)
* chore: update dependency markers and add pytest-cov for coverage reporting

- Refined dependency markers for several packages to improve compatibility with Python 3.12 and specific platforms.
- Added pytest-cov to development dependencies for enhanced test coverage reporting.
- Updated dependencies for pyobjc frameworks to include platform-specific markers for better compatibility.

* chore: enhance lfx_tests command with coverage reporting

- Updated the lfx_tests target in the Makefile to include coverage reporting options for pytest.
- Added coverage metrics output in XML, HTML, and terminal formats to improve test visibility and analysis.

* chore: update codecov configuration for LFX coverage tracking

- Added LFX coverage target and threshold to the codecov.yml file.
- Defined separate coverage flags for frontend, backend, and LFX components.
- Updated ignore patterns to exclude LFX test and component directories from coverage reports.

* chore: add coverage upload steps to Python CI workflow

- Implemented steps to upload coverage reports to Codecov for Python 3.10.
- Added artifact upload for coverage reports, retaining them for 30 days.

* chore: update LFX coverage target in codecov configuration

- Increased the LFX coverage target from 40% to 60% to encourage aspirational improvement.
- Clarified the allowable drop in coverage threshold from 44% to 39% without failing the status check.

* chore: update coverage configuration in pyproject.toml

- Enabled branch coverage in the coverage run configuration.
- Fixed a typo in the main module check to ensure proper execution.
2025-10-14 21:55:36 +00:00
c6a3bdbbab fix: Enhance SmartRouter component with route descriptions and fix imports (#10113)
* fix: Enhance SmartRouter component with route descriptions and fix imports

- Added Route Description field to help LLM understand when to use each route
- Renamed "Route/Category" to "Route Name" for clarity
- Renamed "Output Value" to "Route Message (Optional)" for better understanding
- Fixed imports from langflow to lfx to ensure proper type detection
- Updated prompt generation to include route descriptions for better categorization accuracy
- Added default descriptions for Positive/Negative routes

These changes improve the SmartRouter's ability to accurately categorize inputs by providing
context about each route, and fixes the issue where outputs were showing as Data instead of Message.

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* [autofix.ci] apply automated fixes

* feat: Add inline editing to SmartRouter table fields

- Route Name now uses inline editing for quick edits
- Route Description uses popover for longer text
- Route Message uses popover for optional longer messages
- Import EditMode from lfx.schema.table

This improves UX by allowing users to quickly edit route names directly
in the table without opening a modal dialog.

* [autofix.ci] apply automated fixes

* feat: Add ToolRouter component for LLM-based tool selection

- Created ToolRouter component similar to SmartRouter but for tools
- Uses HandleInput for tools (like Agent component does)
- Dynamically creates outputs based on connected tools
- LLM categorizes input and routes to appropriate tool
- Executes selected tool and returns result as Message
- Supports override output and else output options
- Added both SmartRouter and ToolRouter to logic module exports

The ToolRouter allows users to connect multiple tools and have the LLM
intelligently select which tool to use based on the input text, then
execute that tool and return the result.

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* [autofix.ci] apply automated fixes

* debug: Add debugging to ToolRouter update_outputs and use .to_dict()

- Add debug prints to understand when and how update_outputs is called
- Add .to_dict() to Output objects like other working components
- This will help identify why dynamic outputs aren't being created

* [autofix.ci] apply automated fixes

* debug: Try alternative approach for dynamic outputs

- Add _setup_dynamic_outputs method called in __init__ and process_tool
- Directly modify self.outputs instead of relying on update_outputs
- This might work better for HandleInput connections

If this doesn't work, we'll need to investigate how HandleInput
connections trigger component updates in Langflow.

* [autofix.ci] apply automated fixes

* fix: Replace HandleInput with ToolsInput for dynamic outputs

- ToolsInput has real_time_refresh=True hardcoded and is designed for tool selection
- This should properly trigger update_outputs when tools are added/removed
- ToolsInput is specifically built for dynamic tool behavior unlike HandleInput

* Revert "fix: Replace HandleInput with ToolsInput for dynamic outputs"

This reverts commit e2831e6415.

* Update tool_router.py

* Fix some files inadvertently added

* [autofix.ci] apply automated fixes

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

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

* [autofix.ci] apply automated fixes

* chore: update component index

* Remove unneeded code

* Update llm_conditional_router.py

* chore: update component index

* Update llm_conditional_router.py

* chore: update component index

* Update llm_conditional_router.py

* Update __init__.py

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-14 20:10:30 +00:00
ca3d85c891 fix: streamline session management in build_vertex function (#10263)
* feat: Add run_id fields to telemetry payloads for enhanced tracking

* Introduced run_id to RunPayload, PlaygroundPayload, and ComponentPayload to facilitate better tracking of individual runs and components in telemetry data.

* fix: Update create_response to include run_id in telemetry payloads

* Added run_id field to the telemetry payloads in create_response for both success and error cases, aligning with the OpenAI endpoint's requirements for enhanced tracking.

* feat: Enhance flow execution with run_id for telemetry tracking

* Added run_id parameter to simple_run_flow and related functions to improve tracking of flow executions.
* Updated telemetry logging to include run_id for both successful and failed executions, ensuring better traceability.
* Refactored error handling in webhook_run_flow to maintain consistent telemetry logging.

* feat: Integrate run_id into telemetry for enhanced tracking in chat flow

* Added run_id generation and integration into the retrieve_vertices_order and build_vertex functions to improve telemetry tracking.
* Updated telemetry logging to include run_id for both successful and failed executions, ensuring better traceability of flow executions.

* feat: Enhance telemetry logging with run_id integration in generate_flow_events

* Added run_id generation and integration into the generate_flow_events function to improve tracking of flow executions.
* Updated telemetry logging to include run_id for both successful and failed executions, ensuring better traceability of flow events.
* Refactored log_telemetry function to accept run_id as a parameter for consistent logging across different execution paths.

* tests: Add run_id fields to telemetry payloads in integration tests

* Updated test assertions to validate the inclusion of run_id as None in the serialized output, aligning with the latest telemetry structure.

* feat: Integrate run_id into build_vertex for improved telemetry tracking

* Added run_id generation and integration into the build_vertex function to enhance telemetry tracking of component executions.
* Updated telemetry logging to include run_id for both successful and failed executions, ensuring better traceability of flow events.
* Refactored error handling to maintain consistent logging of run_id across different execution paths.

* [autofix.ci] apply automated fixes

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

* refactor: streamline session management in build_vertex function

- Removed direct session retrieval and replaced it with a context manager for session scope, enhancing resource management and code clarity.

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-14 20:08:50 +00:00
efa57c1adc feat: add run_id to telemetry payloads (#10105)
* feat: Add run_id fields to telemetry payloads for enhanced tracking

* Introduced run_id to RunPayload, PlaygroundPayload, and ComponentPayload to facilitate better tracking of individual runs and components in telemetry data.

* fix: Update create_response to include run_id in telemetry payloads

* Added run_id field to the telemetry payloads in create_response for both success and error cases, aligning with the OpenAI endpoint's requirements for enhanced tracking.

* feat: Enhance flow execution with run_id for telemetry tracking

* Added run_id parameter to simple_run_flow and related functions to improve tracking of flow executions.
* Updated telemetry logging to include run_id for both successful and failed executions, ensuring better traceability.
* Refactored error handling in webhook_run_flow to maintain consistent telemetry logging.

* feat: Integrate run_id into telemetry for enhanced tracking in chat flow

* Added run_id generation and integration into the retrieve_vertices_order and build_vertex functions to improve telemetry tracking.
* Updated telemetry logging to include run_id for both successful and failed executions, ensuring better traceability of flow executions.

* feat: Enhance telemetry logging with run_id integration in generate_flow_events

* Added run_id generation and integration into the generate_flow_events function to improve tracking of flow executions.
* Updated telemetry logging to include run_id for both successful and failed executions, ensuring better traceability of flow events.
* Refactored log_telemetry function to accept run_id as a parameter for consistent logging across different execution paths.

* tests: Add run_id fields to telemetry payloads in integration tests

* Updated test assertions to validate the inclusion of run_id as None in the serialized output, aligning with the latest telemetry structure.

* feat: Integrate run_id into build_vertex for improved telemetry tracking

* Added run_id generation and integration into the build_vertex function to enhance telemetry tracking of component executions.
* Updated telemetry logging to include run_id for both successful and failed executions, ensuring better traceability of flow events.
* Refactored error handling to maintain consistent logging of run_id across different execution paths.

* [autofix.ci] apply automated fixes

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

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-14 18:19:27 +00:00
034457777f fix: Correct ArXiv search type dropdown to use proper API prefixes (#10235)
* fix: correct ArXiv search type dropdown to use proper API prefixes

The ArXiv component's search type dropdown was incorrectly using "all" as a prefix,
which is not recognized by the ArXiv API. This fix maps the dropdown options to
the correct API prefixes:
- "all" → no prefix (searches all fields)
- "title" → "ti:" prefix
- "abstract" → "abs:" prefix
- "author" → "au:" prefix
- "cat" → "cat:" prefix

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* [autofix.ci] apply automated fixes

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

* [autofix.ci] apply automated fixes

* chore: update component index

* [autofix.ci] apply automated fixes

* chore: update component index

* Update component_index.json

* [autofix.ci] apply automated fixes

* chore: update component index

* Update component_index.json

* chore: update component index

* Add test and update starter template

* Fix failed import

* chore: update component index

* [autofix.ci] apply automated fixes

* chore: update component index

* Update test_arxiv_component.py

* [autofix.ci] apply automated fixes

* Correct the lambda filter tests

* chore: update component index

* Update test_lambda_filter.py

* [autofix.ci] apply automated fixes

* Update test_lambda_filter.py

* Update component_index.json

* chore: update component index

* Update test_lambda_filter.py

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2025-10-14 18:15:29 +00:00
f34ac05bdd fix: revert POV (#10270)
* fix: revert POV

* chore: updated component index

* Update component_index.json

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-10-14 17:44:56 +00:00
ad51c91525 fix: Remove outdated List[Data] from Smart Transform and adapt it to accept DataFrame. (#10267)
* fix: Refine the Smart Transform component

* chore: update component index

* Update src/lfx/src/lfx/components/processing/lambda_filter.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: update component index

* Update src/lfx/src/lfx/components/processing/lambda_filter.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* chore: update component index

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
2025-10-14 16:51:29 +00:00
354a6cecc1 feat: add new Composio components (#10017)
* feat:new Composio components

* fix: format

* rm: Brandfetch & capsulecrm

* updates components JSON

* add component index

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-10-14 14:08:32 +00:00
81c19bca1c feat: add new Composio components (#10156)
* feat: add new Composio components

* add component index

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-10-14 13:46:01 +00:00
c27c04789f feat: v3 custom auth fields along with Composio managed. (#10153)
* feat: custom auth fields for apps w composio managed

* minor fix for default required field

* fix: format

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-10-13 23:45:16 +00:00
9570711c89 feat: Add CreateData component for dynamic input generation (#9526)
* feat: Add CreateData component for dynamic input generation

* [autofix.ci] apply automated fixes

* feat: Refactor imports from langflow to lfx

* Add tests for create data

* Restore old create data component

* Update dynamic_create_data.py

* Update src/lfx/src/lfx/components/processing/dynamic_create_data.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* Update src/lfx/src/lfx/components/processing/dynamic_create_data.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* [autofix.ci] apply automated fixes

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

* [autofix.ci] apply automated fixes

* chore: update component index

* [autofix.ci] apply automated fixes

* chore: enhance component index update workflow with script existence check

* chore: update checkout step in component index workflow to use pull request repository and ref

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-10-13 22:38:04 +00:00
d230ca4555 fix: Properly handle initialization of LM Studio (#10199)
* fix: Properly handle initialization of LM Studio

* Don't error at canvas when adding component

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Revert changes to templates

* chore: update component index

* Delete src/lfx/src/lfx/_assets/component_index.json

* Create component_index.json

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-13 21:34:01 +00:00
fd74f194dd feat: add static components index to avoid rebuild on startup (#10181)
* feat: add script to build static component index for fast startup

This script generates a prebuilt index of all built-in components in the lfx.components package, saving it as a JSON file for quick loading at runtime. It includes versioning and integrity verification through SHA256 hashing.

* chore: update package dependencies and versioning

- Bump revision to 3 in uv.lock.
- Update dependency markers for several packages to improve compatibility with Python versions and platforms.
- Increment versions for langflow (1.6.4) and langflow-base (0.6.4).
- Adjust dependency markers for packages related to darwin platform to enhance specificity.

* chore: update .gitignore to include component index cache

- Added entry for user-specific component index cache directory to .gitignore.
- Included member_servers.json in the ignore list for better file management.

* feat: enhance component loading with custom index support

- Introduced functions to detect development mode and read a custom component index from a specified path or URL.
- Added caching mechanism for dynamically generated component indices to improve performance.
- Updated `import_langflow_components` to utilize the new index reading and caching logic, allowing for faster startup in production mode.
- Added `components_index_path` to settings for user-defined index configuration.

* feat: add GitHub Actions workflow to automatically update component index

- Introduced a new workflow that triggers on pull requests and manual dispatch to update the component index.
- The workflow checks for changes in the component index and commits updates if necessary.
- Added a comment feature to notify users when the component index is updated.

* [autofix.ci] apply automated fixes

* fix: enhance development mode detection logic

- Updated the `_dev_mode` function to improve clarity and functionality in detecting development mode.
- Refined environment variable checks to explicitly handle "1"/"true"/"yes" for development and "0"/"false"/"no" for production.
- Maintained the editable install heuristic as a fallback for determining the mode when the environment variable is not set.

* refactor: simplify development mode detection logic

- Revised the `_dev_mode` function to clarify the detection of development mode.
- Removed the editable install heuristic, making the environment variable `LFX_DEV` the sole determinant for development mode.
- Updated documentation to reflect the new behavior and ensure accurate understanding of the mode switching.

* docs: update DEVELOPMENT.md to clarify component development mode

- Added tips for enabling dynamic component loading with `LFX_DEV=1` for faster development.
- Emphasized the importance of using `LFX_DEV=1` for live reloading of components during development.
- Included instructions for manually rebuilding the component index for testing purposes.

* add component index

* test: add unit tests for component index functionality

- Introduced comprehensive unit tests for the component index system, covering functions such as _dev_mode, _read_component_index, _save_generated_index, and import_langflow_components.
- Tests include various scenarios for development mode detection, reading and saving component indices, and handling custom paths and URLs.
- Enhanced test coverage to ensure robustness and reliability of the component index features.

* chore: update GitHub Actions workflow for component index updates

- Modified the workflow to include separate checkout steps for pull requests and manual dispatch events.
- Added an environment variable `LFX_DEV` to the build step for enhanced development mode support.
- Improved clarity in the workflow structure to accommodate different triggering events.

* chore: update component index with new timezones and remove deprecated entries

- Added new timezone options including America/Boise, Australia/North, and Etc/GMT-2.
- Removed outdated timezone entries to streamline the selection process.
- Updated the component index structure to enhance clarity and maintainability.

* docs: clarify output path determination in build_component_index.py

- Updated comment to specify that the output path is relative to the script location and intended for development/CI use, not from the installed package.
- Enhanced clarity for future developers regarding the script's execution context.

* refactor: update component import logic and structure

- Changed the comment to reflect the correct module path for extracting subpackage names.
- Flattened the custom components dictionary if it has a "components" wrapper for consistency.
- Merged built-in and custom components into a single structure, ensuring the output maintains a "components" wrapper.
- Updated the component count calculation to reflect the new merged structure.

* refactor: streamline component merging logic

- Simplified the merging of built-in and custom components by removing the "components" wrapper at the cache level.
- Updated the component count calculation to directly reflect the new structure of the merged components.
- Enhanced code clarity by refining comments related to the merging process.

* chore: enhance GitHub Actions workflow for component index updates

- Updated the workflow to conditionally comment on pull requests from community forks, instructing users to manually update the component index.
- Refined the commit and push logic to ensure it only executes for changes made within the same repository.

* chore: update component index [skip ci]

* chore: refine GitHub Actions workflow for component index checks

- Enhanced the logic to check for changes in the component index file, ensuring it only triggers actions for changes made within the same repository.
- Updated the PR comment step to clarify that it applies only to pull requests from the same repository, improving workflow accuracy.

* chore: update component index [skip ci]

* chore: update component index [skip ci]

* refactor: rename version retrieval function for clarity

- Changed the function name from _get_lfx_version to _get_langflow_version to accurately reflect the version being retrieved.
- Updated the version retrieval logic in the build_component_index function to use the new function name.

* fix: update version check to reflect langflow instead of lfx

- Changed the version check logic in the _read_component_index and _save_generated_index functions to use "langflow" instead of "lfx".
- Ensured that the component index version matches the installed langflow version for better accuracy.

* fix: sort timezone options in CurrentDateComponent

- Updated the timezone options in the CurrentDateComponent to be sorted for better user experience.
- Ensured that the dropdown displays timezones in a consistent and organized manner.

* chore: update component index with new timezone options and MistralAI model configurations

- Replaced outdated timezone options with a more relevant and diverse set for improved user experience.
- Added new configurations for the MistralAI model component, including input fields for API key, model selection, and request parameters.
- Updated version number to reflect recent changes.

* chore: update component index [skip ci]

* chore: update component index [skip ci]

* chore: update component index [skip ci]

* chore: update component index [skip ci]

* chore: minify component index output to reduce file size

* test: Add unit tests for build_component_index script functionality

* chore: enhance push logic in update-component-index workflow to handle concurrent updates with retries

* chore: update component index [skip ci]

* fix: standardize logging messages for MCP server initialization

* chore: update component index [skip ci]

* test: Add unit tests for build_component_index script functionality

* chore: update component index [skip ci]

* fix: improve error handling for missing LangChain dependencies in run.py

* feat: add deterministic normalization for component index serialization

* chore: update component index [skip ci]

* chore: update component index

* chore: update component index

* chore: update component index

* chore: enhance component index update workflow with detailed diff statistics and SHA256 comparison

* chore: update component index

* chore: update component loading message to reflect total components discovered

* chore: sort model options for improved readability in NVIDIA component

* chore: filter out 'localtime' from timezone options for improved user experience

* chore: update component index with sorted lists

* chore: update component index with mistral

* chore: update component index

* fix: improve error message for langflow tests to include detailed instructions for environment setup

* refactor: rename and enhance _dev_mode function to _parse_dev_mode for improved clarity and functionality; support boolean and list modes for module loading

* docs: enhance DEVELOPMENT.md with updated instructions for Component Development Mode, including dynamic loading options for specific components

* fix: enhance error handling in _read_component_index to log specific issues with fetching and parsing component indices, including corrupted JSON and missing SHA256 hash

* chore: update component index

* feat: add metadata to component index including number of modules and components for improved indexing information

* feat: integrate telemetry for component index loading, capturing metrics on modules and components, and enhancing performance tracking

* feat: add build command for dynamic component index generation

* fix: add missing import for json in CustomComponent definition in LoopTest.json

* fix: improve handling of dotted imports in prepare_global_scope function

* chore: update component index

* fix: refine import handling in prepare_global_scope to correctly manage aliased and dotted imports

* chore: update component index

* feat: enhance component index update workflow with detailed change analysis and summary

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-13 18:54:17 +00:00
db280e420d feat: update flows with agent with debug logs for chat history (#10204)
* udpate flows

* agent memory test

* adding plauywright for memory

* agent memory test

*  (Simple Agent Memory.spec.ts): update test to select the last chat message element for assertion accuracy

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-10-13 18:42:10 +00:00
5ea316d2f7 fix: non-processible error when empty body is sent to fastAPI (#10248)
* Fix non-processible erro when empty body is sent to fastAPI

* Annotate FlowDataRequest with Body for embedding

* Refine requestBody type for vertex order retrieval

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-13 18:14:20 +00:00
c6731f5fd8 fix: Update Vector Store RAG connections (#10217) 2025-10-10 18:38:18 +00:00
4b32df50cb bugfix: FileComponent fixes exception when uploading compressed files on mac (#7061)
* bugfix: FileComponent fixes exception when uploading compressed files on mac

* [autofix.ci] apply automated fixes

* Change the way use the os package to use the imported Path() function

---------

Co-authored-by: zhangliang1-jk <zhangliang1-jk@360shuke.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-10 16:42:03 +00:00
a3f7f918ea tests: add tests in lfx for 1.6.0 starter projects (#9997)
* tests: add 1.6.0 starter projects in lfx tests data

- Introduced multiple starter project JSON files, including "Basic Prompt Chaining", "Blog Writer", "Document Q&A", and others, to provide diverse templates for chatbot functionalities.
- Each project includes detailed descriptions and structured data to facilitate easy integration and usage.
- Enhanced the overall framework for building chatbots, content generation, and data processing tasks, improving user experience and flexibility in application development.

* test: add backward compatibility tests for starter projects from version 1.6.0

- Introduced a new test suite to validate that starter project templates from version 1.6.0 can be loaded without import errors.
- Implemented asynchronous fetching of starter project JSON files from GitHub and caching them locally for testing.
- Added multiple test cases to ensure the existence, validity, and proper execution of starter projects, while checking for import errors related to langflow and lfx modules.
- Enhanced overall test coverage for backward compatibility, ensuring existing projects remain functional with the latest codebase.

* feat(logging): add backwards compatibility module for lfx.logging.logger

- Introduced a new module to maintain compatibility for imports from lfx.logging.logger, redirecting functionality to lfx.log.logger.
- Ensured all original exports are preserved to facilitate a smooth transition for existing codebases relying on the previous import path.

* refactor(tests): replace aiohttp with httpx for async HTTP requests in backward compatibility tests

- Updated the test suite to utilize httpx for asynchronous HTTP requests instead of aiohttp, enhancing performance and compatibility.
- Improved error handling by checking response status codes and ensuring proper JSON parsing.
- Added handling for known failing starter projects due to import issues in version 1.6.0, marking them as expected failures in tests.
- Enhanced documentation within tests to clarify known issues with specific starter projects.

* refactor(tests): simplify starter project path retrieval and remove unused async fetching

- Refactored the test suite to streamline the retrieval of starter project paths, eliminating the need for asynchronous fetching from GitHub.
- Updated the `get_starter_projects_path` function to directly return the local path for cached starter projects.
- Removed redundant code related to GitHub API calls and caching logic, enhancing test clarity and performance.
- Adjusted test cases to ensure they continue to validate the existence and format of starter project files effectively.

* test(cli): add tests for --format option behavior in error messages

- Introduced two new tests to validate the application of the --format option to error messages in the CLI.
- The first test checks that error messages are returned as plain text when the --format option is set to "text".
- The second test ensures that even with the --verbose flag, the output remains valid JSON when the --format option is set to "json".
- Both tests are marked as expected failures to document current limitations and guide future fixes.
2025-10-10 13:12:25 +00:00
bf535df56d hotfix: fixed NoneType Object is non iterable and name as a reserved … (#10013)
hotfix: fixed NoneType Object is non iterable and name as a reserved keyword

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-10-09 23:38:42 +00:00
b840b71193 feat: Add common telemetry fields (#7899)
* feat: add common telemetry fields and dynamic timestamp to telemetry payloads

* test: Add common telemetry fields to exception telemetry tests

- Introduced common telemetry fields including langflow_version, platform, and os to the telemetry service in multiple test cases.
- Updated assertions to verify the inclusion of these fields in the telemetry data sent during exception handling.

* test: Enhance exception telemetry tests with common telemetry fields

- Added common telemetry fields (langflow_version, platform, os) to the telemetry service in multiple test cases.
- Updated assertions to ensure these fields are included in the telemetry data during exception handling.

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
2025-10-09 21:00:06 +00:00
d12bb50320 fix: Ensure log_level is set correctly (#10128)
* fix: Ensure `log_level` is set correctly (#10032)

fix: `log_level` variable has to be set for it not to be None

* Simplify the log env var

* [autofix.ci] apply automated fixes

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

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-09 15:41:18 +00:00
d95f071c3a feat: pins MCP composer version and adds new setting to configure it (#10163)
* feat: Add mcp_composer_version field with validation in Settings class

- Introduced mcp_composer_version attribute to specify version constraints for mcp-composer using PEP 440 syntax.
- Implemented a field validator to ensure version strings have appropriate specifier prefixes, defaulting to '~=0.1.0.7' if none is provided.
- Enhanced documentation for clarity on versioning behavior and validation logic.

* feat: Integrate mcp_composer_version into MCP Composer command construction

- Updated the command for starting the MCP Composer subprocess to include the mcp_composer_version from settings, ensuring the correct version is used.
- Enhanced the installation function to reflect the same change, improving consistency across the codebase.

* test: Add unit tests for mcp_composer_version validation in Settings

- Introduced tests for the mcp_composer_version validator, covering various version formats and ensuring correct behavior for both valid and default cases.
- Created a new test file for settings services, enhancing test coverage and documentation for the versioning logic.
2025-10-09 13:03:08 +00:00
4dd5bf3009 fix: Prevent crash on invalid replacement components (#10110)
*  (NodeLegacyComponent): Improve rendering logic to only display components with valid replacements
🐛 (use-get-replacement-components): Update data access to handle potential undefined values
📝 (general-bugs-frontend-crashing-on-invalid-replace.spec.ts): Add test case for handling undefined replacements in custom components
♻️ (local_db.py): Remove unnecessary replacement values from LocalDBComponent

*  (fileUploadComponent.spec.ts): update test for file types visibility to use async/await syntax for better readability and maintainability

*  (userSettings.spec.ts): refactor tests to use a helper function awaitBootstrapTest for code reusability and to skip modal popups before interacting with the page.

* [autofix.ci] apply automated fixes

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

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-09 13:02:37 +00:00
67960cf044 feat: add VLM Run audio and video transcription component (#9460)
* add vlmrun audio and video transcription

* update vlmrun icon and copy. Add unit tests

* linting fixes for vlmrun

* fix: fix code complexity errors

* fix: fix recursive import

* fix: improve tests and remove hardcoded output formatting for vlm run component

* fix: regenerate uv.lock after rebase on upstream/main

* fix: update vlmrun __init__

* fix: move vlm components to lfx

* fix: fix vlmrun test

* fix: move vlmrun test to lfx structure and regenerate uv.lock

* fix: add vlmrun test to lfx structure and fix secret detection

* fix: fix linting errors in VLM test file

- Replace assert statements with pytest.fail() to avoid S101 errors
- Fix line length issues by splitting long lines
- Replace magic values with named constants

* fix: fix floating point issue in vlmrun test

* fix: regenerate uv.lock after rebase with upstream/main

* fix: regenerate uv.lock after rebase on upstream/main

* fix: regenerate uv.lock after rebase on upstream/main
2025-10-09 02:26:04 +00:00