* 🐛 (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>
* 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>
* 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>
* 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>
* chore: Update changes-filter.yaml to include component_index.json in various sections
* chore: remove update-component-index workflow file
* chore: add update component index job to autofix workflow
* 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>
* 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>
I believe we are not properly cleaning up between steps so we end up storying every version rather then just the one needed for the current flow which is causing memory issues in CI.
Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com>
* ci: pin torch version
i think this should work. I need to spin up a linux instance locally to test this but I wanted to see what it looks like in CI
* chore: address rabbit
* use direct reference
I tried to avoid this but this seems to be the only solution that works locally. lets see what happens in ci
* add pinned versions for all python versions
* change index order
* chore: address coderabbit windows comment
* chore: add aarch64 support
* chore: add win32 support
* chore: add missing cpu to win32
* retry +cpu on ci not local
* index not in deperate config
* chore: revert to my solution
revert to the ugly solution I found yesterday
* chore: try unpinning other deps
other deps that are pinned are causing problems if we remove them we can possibly make the torch dep more readable
* chore: revert
* chore: index no name +cpu dep
* chore: test index-strategy = "unsafe-best-match"
* chore: revert to og solution + remove network pin
* chore: reorger index and +cpu
* chore: remove name
* chore: revert to my og solution
* chore: test jordan comments
test what happens if we remove "torch==2.8.0; sys_platform == 'darwin'"
and
index = [
{ url = "https://pypi.org/simple"},
{ url = "https://download.pytorch.org/whl/cpu"}]
* chore: re-add allow-direct-references
dont know how but i read it ass `index-strategy = "unsafe-best-match"` and removed it
`allow-direct-references` necessary to allow the direct referencing we are using wth for the torch dependencies with out it hatchling returns the below error
Call to `hatchling.build.build_editable` failed (exit status: 1)
...
line 1205, in dependencies_complex
raise ValueError(message)
ValueError: Dependency #106 of field `project.dependencies`
cannot be a direct reference unless field
`tool.hatch.metadata.allow-direct-references` is set to `true`
hint: This usually indicates a problem with the package or the build
environment.
Error: Process completed with exit code 1.
* chore: update uv.lock
---------
Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com>
* 📝 (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>
* 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>
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.
* ci: Update Docker Hub login condition in workflow for better access control
Added a conditional check to the Docker Hub login step in the GitHub Actions workflow, allowing login only during manual dispatch or when the pull request originates from the same repository. This enhances security and access control during CI/CD processes.
* ci: Refine Docker Hub login condition in workflow for pull requests
Updated the conditional logic for the Docker Hub login step in the GitHub Actions workflow to ensure it only triggers for manual dispatch or when the pull request originates from the same repository. This change improves access control and security during CI/CD processes.
* 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>
* chore: update pre-commit configuration to refine exclude patterns
Modified the exclude pattern for the detect-secrets hook to prevent false positives by excluding the specific component_index.json file in addition to the docs directory. This change enhances the accuracy of secret detection during pre-commit checks.
* chore: update ruff exclude patterns to include component_index.json
Added the component_index.json file to the exclude patterns in the ruff configuration to prevent false positives during linting. This change enhances the accuracy of code quality checks.
* chore: enhance GitHub Actions comments for component index updates
Updated the GitHub Actions workflow to improve the commenting mechanism for component index updates. Added logic to delete previous comments from the GitHub Actions bot to prevent duplicates and included a marker in the comment body for better tracking. This change ensures that users receive clear instructions on updating the component index when necessary.
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* 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>
* 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>
* 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>
* 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>
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>
* chore: update pre-commit configuration to exclude specific JSON file from secrets detection
- Modified the exclude pattern for the detect-secrets hook to prevent false positives for the component_index.json file located in src/lfx/src/lfx/_assets.
* ci: update GitHub Actions workflow to enhance security for pull request handling
- Changed the event trigger from `pull_request` to `pull_request_target` to improve security when handling forked pull requests.
- Updated conditions for repository checkout and dependency installation to ensure safe execution only for same-repo pull requests.
- Adjusted PR comment conditions to reflect the new event trigger, maintaining functionality for both community forks and same-repo updates.
* 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.
* 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>
* 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>
* ci: add Docker Hub login step to CI workflow to avoid rate limits
* Introduced a new step in the Docker CI workflow to log in to Docker Hub using credentials stored in GitHub secrets. This enhances the workflow by ensuring that the build process can push images to Docker Hub securely.
* ci: add Docker Hub credentials to CI workflow for secure image testing
* Updated the CI workflow to include Docker Hub credentials as secrets for the Docker image testing job. This ensures secure access to Docker Hub during the CI process, enhancing the reliability of image builds and tests.
* 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>
* docs: Update README with note on development setup instructions
* docs: Revise development environment setup instructions for clarity and organization
* Revise Quickstart note for repo cloning
Updated note about repo cloning in the Quickstart section.
* Update README for clarity and organization in Quickstart section
Refined installation and running instructions, added emphasis on local installation, and improved formatting for better readability. Included a caution note for Windows users regarding updates.
* Update README to streamline Quickstart instructions
Removed unnecessary header and improved clarity in the Quickstart section by consolidating the instructions for accessing the local server. This enhances readability and user experience.
* Enhance README Quickstart section for clarity and completeness
Updated installation instructions to improve clarity, added emphasis on local installation, and included additional details about running the Langflow server. Revised section headers for better organization and user experience.
* Add @mendonk suggestion
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* Improve devcontainer instruction, to @mendonk suggestion
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
---------
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>