Skip to content

Conversation

@zzzming
Copy link
Collaborator

@zzzming zzzming commented Oct 11, 2025

see the issue #10231

When LANGFLOW_DB_CONNECTION_SETTINGS={"poolclass": "NullPool"} , the langflow fails on the sql pool initialization. Error: Pool.init() missing 1 required positional argument: 'creator'
timestamp='2025-10-11T02:29:03.785753Z' level='error' event="Unhandled error during cleanup: Pool.init() missing 1 required positional argument: 'creator'"

On line 131 in service.py:131, the code tries to instantiate pool_class() to check if it's an instance of sa.pool.Pool, but pool classes like NullPool require a creator argument. The check should use issubclass() instead of isinstance(). The environment variable LANGFLOW_DB_CONNECTION_SETTINGS={"poolclass": "NullPool"} is triggering this bug.

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation of database pool configuration to prevent errors when an invalid pool class is provided.
    • Now safely ignores invalid pool settings and logs an error instead of failing, enhancing stability during database engine initialization.
    • Ensures compatibility with supported pool classes for more reliable startup and connection handling.

@zzzming zzzming marked this pull request as ready for review October 11, 2025 18:02
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 11, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Refines poolclass handling in database engine creation: retrieves the pool class from sa.pool, validates with issubclass, logs and strips invalid poolclass from kwargs, and proceeds to create the async engine with the sanitized/validated configuration.

Changes

Cohort / File(s) Summary
Database engine poolclass validation
src/backend/base/langflow/services/database/service.py
Adjusts poolclass retrieval to sa.pool, validates via issubclass, logs and removes invalid poolclass from kwargs, and uses the validated/sanitized value when calling create_async_engine. No public API signature changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Caller
  participant DatabaseService as DatabaseService._create_engine
  participant SA as sqlalchemy
  participant Engine as create_async_engine

  Caller->>DatabaseService: _create_engine(**kwargs)
  activate DatabaseService

  DatabaseService->>SA: Lookup poolclass in sa.pool
  alt poolclass provided
    alt poolclass is subclass of sa.pool.Pool
      note right of DatabaseService: Valid poolclass retained
    else poolclass invalid
      DatabaseService->>DatabaseService: Log error and remove poolclass from kwargs
      note right of DatabaseService: Invalid poolclass stripped
    end
  else no poolclass provided
    note right of DatabaseService: Proceed without poolclass
  end

  DatabaseService->>Engine: create_async_engine(**sanitized_kwargs)
  Engine-->>DatabaseService: engine instance
  DatabaseService-->>Caller: engine instance
  deactivate DatabaseService
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 error, 2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Test Coverage For New Implementations ❌ Error The PR adjusts the database service pool class validation but does not add or modify any backend tests (no files following the test_*.py convention appear in the diff), so there is no regression or unit coverage confirming the fix for pool class handling. Please add regression tests that reproduce the NullPool failure scenario and confirm the new issubclass-based validation works, ideally in a backend test_*.py file covering the service’s _create_engine logic.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Test Quality And Coverage ⚠️ Warning LangFlow PR 10232 introduces modifications to the SQL engine creation logic but adds no accompanying tests, leaving new behavior unverified and lowering confidence that pool class validation works across scenarios. As there are no tests exercising the revised issubclass-based path or ensuring error logging and kwargs sanitization, the update fails to meet the project’s testing expectations for backend changes. Without targeted regression coverage, this adjustment could reintroduce similar issues undetected. Please add backend pytest coverage that simulates LANGFLOW_DB_CONNECTION_SETTINGS with a NullPool and other representative pool class cases, asserts that the engine initialization proceeds or fails as intended, and verifies that invalid pool class entries are removed from kwargs with appropriate logging.
Test File Naming And Structure ❓ Inconclusive No new or modified test files are included in this pull request, so none of the specified naming, structural, or coverage expectations can be evaluated; therefore the status of this check is indeterminate. Please add or reference test updates that align with the required naming and structural conventions, then rerun this check to confirm compliance.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Excessive Mock Usage Warning ✅ Passed No test files were modified in this pull request, and a search of the repository’s test suite did not reveal any new or existing tests tied to the updated pool creation logic that rely on heavy mocking; consequently, there is no evidence of excessive mock usage introduced or exposed by these changes.
Title check ✅ Passed The PR title accurately reflects the main technical change: replacing isinstance() with issubclass() for pool class validation, which directly addresses the core issue of pool initialization without instantiation.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/backend/base/langflow/services/database/service.py (1)

130-136: LGTM! Fix correctly addresses the NullPool instantiation issue.

The changes resolve the core problem by:

  • Retrieving pool classes from sa.pool module (line 130) instead of the root sa namespace
  • Using issubclass() (line 131) to validate the class hierarchy without instantiation, which prevents the "missing 'creator' argument" error for NullPool and similar pool classes
  • Using safer kwargs.pop() (line 136) instead of del to avoid potential KeyError

Optional: Add defensive error handling around issubclass().

While unlikely, if pool_class is not actually a class, issubclass() raises TypeError. Consider wrapping the check for robustness:

 poolclass_key = kwargs.get("poolclass")
 if poolclass_key is not None:
     pool_class = getattr(sa.pool, poolclass_key, None)
-    if pool_class and issubclass(pool_class, sa.pool.Pool):
-        logger.debug(f"Using poolclass: {poolclass_key}.")
-        kwargs["poolclass"] = pool_class
-    else:
-        logger.error(f"Invalid poolclass '{poolclass_key}' specified. Using default pool class.")
-        kwargs.pop("poolclass", None)
+    try:
+        if pool_class and issubclass(pool_class, sa.pool.Pool):
+            logger.debug(f"Using poolclass: {poolclass_key}.")
+            kwargs["poolclass"] = pool_class
+        else:
+            logger.error(f"Invalid poolclass '{poolclass_key}' specified. Using default pool class.")
+            kwargs.pop("poolclass", None)
+    except TypeError:
+        logger.error(f"Invalid poolclass '{poolclass_key}' specified (not a class). Using default pool class.")
+        kwargs.pop("poolclass", None)

Verify the fix resolves the NullPool configuration issue.

Please confirm that setting LANGFLOW_DB_CONNECTION_SETTINGS={"poolclass": "NullPool"} no longer raises the "missing 'creator' argument" error and that the engine initializes successfully with NullPool.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f24a064 and 83c5d1c.

📒 Files selected for processing (1)
  • src/backend/base/langflow/services/database/service.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
{src/backend/**/*.py,tests/**/*.py,Makefile}

📄 CodeRabbit inference engine (.cursor/rules/backend_development.mdc)

{src/backend/**/*.py,tests/**/*.py,Makefile}: Run make format_backend to format Python code before linting or committing changes
Run make lint to perform linting checks on backend Python code

Files:

  • src/backend/base/langflow/services/database/service.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Optimize new Python code in this PR
  • GitHub Check: Update Starter Projects

@zzzming zzzming changed the title use issubclass in the pool creation fixc: use issubclass in the pool creation Nov 17, 2025
@ogabrielluiz ogabrielluiz changed the title fixc: use issubclass in the pool creation fix: use issubclass in the pool creation Nov 17, 2025
@github-actions github-actions bot added the bug Something isn't working label Nov 17, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Nov 17, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Nov 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 15%
14.68% (3983/27130) 7.57% (1560/20599) 8.94% (535/5982)

Unit Test Results

Tests Skipped Failures Errors Time
1630 0 💤 0 ❌ 0 🔥 18.794s ⏱️

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.61%. Comparing base (318805c) to head (c964d50).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...backend/base/langflow/services/database/service.py 0.00% 3 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (40.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project status has failed because the head coverage (38.92%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #10232      +/-   ##
==========================================
- Coverage   31.62%   31.61%   -0.02%     
==========================================
  Files        1348     1348              
  Lines       61098    61099       +1     
  Branches     9129     9129              
==========================================
- Hits        19322    19314       -8     
- Misses      40863    40873      +10     
+ Partials      913      912       -1     
Flag Coverage Δ
backend 51.77% <0.00%> (-0.07%) ⬇️
frontend 13.59% <ø> (ø)
lfx 38.92% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...backend/base/langflow/services/database/service.py 59.56% <0.00%> (-3.02%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Nov 17, 2025
Copy link
Member

@Cristhianzl Cristhianzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions github-actions bot added the lgtm This PR has been approved by a maintainer label Nov 17, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Nov 17, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Nov 17, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Nov 17, 2025
@Cristhianzl Cristhianzl disabled auto-merge November 17, 2025 20:15
@Cristhianzl Cristhianzl disabled auto-merge November 17, 2025 20:28
@Cristhianzl Cristhianzl added this pull request to the merge queue Nov 17, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Nov 17, 2025
@HzaRashid HzaRashid added this pull request to the merge queue Nov 17, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Nov 17, 2025
@Cristhianzl Cristhianzl added this pull request to the merge queue Nov 17, 2025
Merged via the queue into main with commit be6f7a8 Nov 17, 2025
80 of 83 checks passed
@Cristhianzl Cristhianzl deleted the allowNullPool branch November 17, 2025 21:29
andifilhohub pushed a commit to andifilhohub/langflow that referenced this pull request Nov 19, 2025
* use issubclass in the pool creation

* [autofix.ci] apply automated fixes

* add poolclass pytests

* [autofix.ci] apply automated fixes

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

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

---------

Co-authored-by: Hamza Rashid <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <[email protected]>
andifilhohub pushed a commit to andifilhohub/langflow that referenced this pull request Nov 19, 2025
* use issubclass in the pool creation

* [autofix.ci] apply automated fixes

* add poolclass pytests

* [autofix.ci] apply automated fixes

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

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

---------

Co-authored-by: Hamza Rashid <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Dec 11, 2025
…parse errors (#10508)

* feat: Add ALTK Agent with tool validation and comprehensive tests (#10587)

* Add ALTK Agent with tool validation and comprehensive tests

- Added agent-lifecycle-toolkit~=0.4.1 dependency to pyproject.toml
- Implemented ALTKBaseAgent with comprehensive error handling and tool validation
- Added ALTKToolWrappers for SPARC integration and tool execution safety
- Created ALTK Agent component with proper LangChain integration
- Added comprehensive test suite covering tool validation, conversation context, and edge cases
- Fixed docstring formatting to comply with ruff linting standards

* [autofix.ci] apply automated fixes

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

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

* minor fix to execute_tool that was left out.

* Fixes following coderabbitai comments.

* [autofix.ci] apply automated fixes

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

* Update component_index.json

* [autofix.ci] apply automated fixes

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

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

* Add custom message to dict conversion in ValidatedTool

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

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

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

* 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 querying, creating, updating, and retrieving content.

* [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

* [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

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

---------

Co-authored-by: Koren Lazar <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <[email protected]>

* feat: Implement dynamic model discovery system (#10523)

* add dynamic model request

* add description to groq

* add cache folder to store cache models json

* change git ignore description

* [autofix.ci] apply automated fixes

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

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

* add comprehensive tests for Groq dynamic model discovery

- Add 101 unit tests covering success, error, and edge cases
- Test model discovery, caching, tool calling detection
- Test fallback models and backward compatibility
- Add support for real GROQ_API_KEY from environment
- Fix all lint errors and improve code quality

* [autofix.ci] apply automated fixes

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

* fix Python 3.10 compatibility - replace UTC with timezone.utc

Python 3.10 doesn't have datetime.UTC, need to use timezone.utc instead

* fix pytest hook signature - use config instead of _config

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix conftest config.py

* fix timezone UTC on tests

* [autofix.ci] apply automated fixes

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

* [autofix.ci] apply automated fixes

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

---------

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

* feat: remove `code` from Transactions to reduce clutter in logs (#10400)

* refactor: remove code from transaction model inputs

* refactor: remove code from transaction model inputs

* tests: add tests to make sure code is not added to transactions data

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

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

* refactor: improve code removal from logs with explicit dict copying

---------

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

* feat: new release for cuga component (#10591)

* feat: new release of cuga

* [autofix.ci] apply automated fixes

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

* fix: address review

* fix: fixed more bugs

* fix: build component index

* [autofix.ci] apply automated fixes

* fix: update test

* chore: update component index

* [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>

* feat: adds Component Inputs telemetry (#10254)

* feat: Introduce telemetry tracking for sensitive field types

Added a new set of field types that should not be tracked in telemetry due to their sensitive nature, including PASSWORD, AUTH, FILE, CONNECTION, and MCP. Updated relevant input classes to ensure telemetry tracking is disabled for these sensitive fields, enhancing data privacy and security.

* feat: Enhance telemetry payloads with additional fields and serialization support

Added new fields to the ComponentPayload and ComponentInputsPayload classes, including component_id and component_run_id, to improve telemetry data tracking. Introduced a serialize_input_values function to handle JSON serialization of component input values, ensuring robust handling of input data for telemetry purposes.

* feat: Implement telemetry input tracking and caching

Added functionality to track and cache telemetry input values within the Component class. Introduced a method to determine if inputs should be tracked based on sensitivity and an accessor for retrieving cached telemetry data, enhancing the robustness of telemetry handling.

* feat: Add logging for component input telemetry

Introduced a new method, log_package_component_inputs, to the TelemetryService for logging telemetry data related to component inputs. This enhancement improves the tracking capabilities of the telemetry system, allowing for more detailed insights into component interactions.

* feat: Enhance telemetry logging for component execution

Added functionality to log component input telemetry both during successful execution and error cases. Introduced a unique component_run_id for each execution to improve tracking. This update ensures comprehensive telemetry data collection, enhancing the robustness of the telemetry system.

* feat: Extend telemetry payload tests and enhance serialization

Added tests for the new component_id and component_run_id fields in ComponentPayload and ComponentInputsPayload classes. Introduced a new test suite for ComponentInputTelemetry, covering serialization of various data types and handling of edge cases. This update improves the robustness and coverage of telemetry data handling in the system.

* fix: Update default telemetry tracking behavior in BaseInputMixin

Changed the default value of track_in_telemetry from True to False in the BaseInputMixin class. Updated documentation to clarify that telemetry tracking is now opt-in and can be explicitly enabled for individual input types, enhancing data privacy and control.

* fix: Update telemetry tracking defaults for input types

Modified the default value of `track_in_telemetry` for various input classes to enhance data privacy. Regular inputs now default to False, while safe inputs like `IntInput` and `BoolInput` default to True, ensuring explicit opt-in for telemetry tracking. Updated related tests to reflect these changes.

* feat: add chunk_index and total_chunks fields to ComponentInputsPayload

This commit adds two new optional fields to ComponentInputsPayload:
- chunk_index: Index of this chunk in a split payload sequence
- total_chunks: Total number of chunks in the split sequence

Both fields default to None and use camelCase aliases for serialization.
This is Task 1 of the telemetry query parameter splitting implementation.

Tests included:
- Verify fields exist and can be set
- Verify camelCase serialization aliases work correctly
- Verify fields default to None when not provided

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

Co-Authored-By: Claude <[email protected]>

* refactor: update ComponentInputsPayload to support automatic splitting of oversized inputs

This commit enhances the ComponentInputsPayload class by implementing functionality to automatically split input values into multiple chunks if they exceed the maximum URL size limit. Key changes include:

- Added methods for calculating URL size, truncating oversized values, and splitting payloads.
- Updated component_inputs field to accept a dictionary instead of a string for better handling of input values.
- Improved documentation for the ComponentInputsPayload class to reflect the new splitting behavior and usage examples.

These changes aim to improve telemetry data handling and ensure compliance with URL length restrictions.

* refactor: enhance log_package_component_inputs to handle oversized payloads

This commit updates the log_package_component_inputs method in the TelemetryService class to split component input payloads into multiple requests if they exceed the maximum URL size limit. Key changes include:

- Added logic to split the payload using the new split_if_needed method.
- Each chunk is queued separately for telemetry logging.

These improvements ensure better handling of telemetry data while adhering to URL length restrictions.

* refactor: centralize maximum telemetry URL size constant

This commit introduces a centralized constant, MAX_TELEMETRY_URL_SIZE, to define the maximum URL length for telemetry GET requests. Key changes include:

- Added MAX_TELEMETRY_URL_SIZE constant to schema.py for better maintainability.
- Updated split_if_needed method in ComponentInputsPayload to use the new constant instead of a hardcoded value.
- Adjusted the TelemetryService to reference the centralized constant for URL size limits.

These changes enhance code clarity and ensure consistent handling of URL size limits across the telemetry service.

* refactor: update ComponentInputsPayload tests to use dictionary inputs

This commit modifies the tests for ComponentInputsPayload to utilize a dictionary for component inputs instead of a serialized JSON string. Key changes include:

- Renamed the test method to reflect the new input type.
- Removed unnecessary serialization steps and assertions related to JSON strings.
- Added assertions to verify the correct handling of dictionary inputs.

These changes streamline the testing process and improve clarity in how component inputs are represented.

* test: add integration tests for telemetry service payload splitting

This commit introduces integration tests for the TelemetryService to verify its handling of large and small payloads. Key changes include:

- Added tests to ensure large payloads are split into multiple chunks and queued correctly.
- Implemented a test to confirm that small payloads are not split and result in a single queued event.
- Created a mock settings service for testing purposes.

These tests enhance the reliability of the telemetry service by ensuring proper payload management.

* test: enhance ComponentInputsPayload tests with additional scenarios

This commit expands the test suite for ComponentInputsPayload by adding various scenarios to ensure robust handling of input payloads. Key changes include:

- Introduced tests for calculating URL size, ensuring it returns a positive integer and accounts for encoding.
- Added tests to verify the splitting logic for large payloads, including checks for chunk metadata and preservation of fixed fields.
- Implemented property-based tests using Hypothesis to validate that all chunks respect the maximum URL size and preserve original data.

These enhancements improve the reliability and coverage of the ComponentInputsPayload tests, ensuring proper functionality under various conditions.

* [autofix.ci] apply automated fixes

* optimize query param encoding

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* refactor: extract telemetry logging logic into a separate function

This commit introduces a new function, _log_component_input_telemetry, to centralize the logic for logging component input telemetry. The function is called in two places within the generate_flow_events function, improving code readability and maintainability by reducing duplication. This change enhances the clarity of telemetry handling in the flow generation process.

* refactor: optimize truncation logic in ComponentInputsPayload

This commit refines the truncation logic for input values in the ComponentInputsPayload class. The previous binary search method for string values has been simplified, allowing for direct truncation of both string and non-string values. This change enhances code clarity and maintains functionality while ensuring optimal handling of oversized inputs.

* refactor: update telemetry tracking logic to respect opt-in flag

This commit modifies the telemetry tracking logic in the Component class to change the default behavior of the `track_in_telemetry` attribute from True to False. This adjustment enhances user privacy by requiring explicit consent for tracking input objects in telemetry. The change ensures that sensitive field types are still auto-excluded from tracking, maintaining the integrity of the telemetry data.

* refactor: update tests to use dictionary format for component inputs

This commit modifies the integration tests for telemetry payload validation and component input telemetry to utilize dictionaries for component inputs instead of serialized JSON strings. Key changes include:

- Updated assertions to compare dictionary inputs directly.
- Enhanced clarity and maintainability of the test cases by removing unnecessary serialization steps.

These changes improve the representation of component inputs in tests, aligning with recent refactoring efforts.

* [autofix.ci] apply automated fixes

* refactor: specify type for current_chunk_inputs in ComponentInputsPayload

This commit updates the type annotation for the current_chunk_inputs variable in the ComponentInputsPayload class to explicitly define it as a dictionary. This change enhances code clarity and maintainability by providing better type information for developers working with the code.

* test: add component_id to ComponentPayload tests

This commit enhances the test cases for the ComponentPayload class by adding a component_id parameter to various initialization tests. The updates ensure that the component_id is properly tested across different scenarios, including valid parameters, error messages, and edge cases. This change improves the robustness of the tests and aligns with recent updates to the ComponentPayload structure.

* [autofix.ci] apply automated fixes

* feat: add component_id to ComponentPayload in build_vertex function

* fix: update MAX_TELEMETRY_URL_SIZE to 2048 and adjust related tests

This commit increases the maximum URL size for telemetry GET requests from 2000 to 2048 bytes to align with Scarf's specifications. Corresponding test assertions have been updated to reference the new constant, ensuring consistency across the codebase.

* [autofix.ci] apply automated fixes

* feat(telemetry): add track_in_telemetry field to starter project configurations

* refactor(telemetry): remove unused blank line in test imports

* [autofix.ci] apply automated fixes

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

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

* update starter templates

* [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

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

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* feat: Add gpt-5.1 model to Language models (#10590)

* Add gpt-5.1 model to starter projects

Added 'gpt-5.1' to the list of available models in all starter project JSON files to support the new model version. This update ensures users can select gpt-5.1 in agent configurations.

* [autofix.ci] apply automated fixes

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

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

* Update component_index.json

* [autofix.ci] apply automated fixes

* Update component_index.json

* [autofix.ci] apply automated fixes

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

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

---------

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

* fix: Use the proper Embeddings import for Qdrant vector store (#10613)

* Use the proper Embeddings import for Qdrant vector store

* [autofix.ci] apply automated fixes

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

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

---------

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

* fix: Ensure split text test is more robust (#10622)

* fix: Ensure split text test is more robust

* [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>

* fix: use issubclass in the pool creation (#10232)

* use issubclass in the pool creation

* [autofix.ci] apply automated fixes

* add poolclass pytests

* [autofix.ci] apply automated fixes

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

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

---------

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

* feat: make it possible to load graphs using `get_graph` function in scripts (#9913)

* feat: Enhance graph loading functionality to support async retrieval

- Updated `load_graph_from_script` to be an async function, allowing for the retrieval of the graph via an async `get_graph` function if available.
- Implemented fallback to the existing `graph` variable for backward compatibility.
- Enhanced `find_graph_variable` to identify both `get_graph` function definitions and `graph` variable assignments, improving flexibility in script handling.

* feat: Update load_graph_from_script to support async graph retrieval

- Refactored `load_graph_from_script` to be an async function, enabling the use of an async `get_graph` function for graph retrieval.
- Implemented a fallback mechanism to access the `graph` variable for backward compatibility.
- Enhanced error handling to provide clearer messages when neither `graph` nor `get_graph()` is found in the script.

* feat: Refactor simple_agent.py to support async graph creation

- Introduced an async `get_graph` function to handle the initialization of components and graph creation without blocking.
- Updated the logging configuration and component setup to be part of the async function, improving the overall flow and responsiveness.
- Enhanced documentation for the `get_graph` function to clarify its purpose and return type.

* feat: Update serve_command and run functions to support async graph loading

- Refactored `serve_command` to be an async function using `syncify`, allowing for non-blocking execution.
- Updated calls to `load_graph_from_path` and `load_graph_from_script` within `serve_command` and `run` to await their results, enhancing performance and responsiveness.
- Improved overall async handling in the CLI commands for better integration with async workflows.

* feat: Refactor load_graph_from_path to support async execution

- Changed `load_graph_from_path` to an async function, enabling non-blocking graph loading.
- Updated the call to `load_graph_from_script` to use await, improving performance during graph retrieval.
- Enhanced the overall async handling in the CLI for better integration with async workflows.

* feat: Enhance async handling in simple_agent and related tests

- Updated `get_graph` function in `simple_agent.py` to utilize async component initialization for improved responsiveness.
- Modified test cases in `test_simple_agent_in_lfx_run.py` to validate the async behavior of `get_graph`.
- Refactored various test functions across multiple files to support async execution, ensuring compatibility with the new async workflows.
- Improved documentation for async functions to clarify their purpose and usage.

* docs: Implement async get_graph function for improved component initialization

- Introduced an async `get_graph` function in `README.md` to facilitate non-blocking component initialization.
- Enhanced the logging configuration and component setup within the async function, ensuring a smoother flow.
- Updated documentation to clarify the purpose and return type of the `get_graph` function, aligning with the async handling improvements.

* refactor: reorder imports in simple_agent test file

* style: reorder imports in simple_agent test file

* [autofix.ci] apply automated fixes

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

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

* update component index

* [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

* [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>

* feat: Add ALTK Agent with tool validation and comprehensive tests (#10587)

* Add ALTK Agent with tool validation and comprehensive tests

- Added agent-lifecycle-toolkit~=0.4.1 dependency to pyproject.toml
- Implemented ALTKBaseAgent with comprehensive error handling and tool validation
- Added ALTKToolWrappers for SPARC integration and tool execution safety
- Created ALTK Agent component with proper LangChain integration
- Added comprehensive test suite covering tool validation, conversation context, and edge cases
- Fixed docstring formatting to comply with ruff linting standards

* [autofix.ci] apply automated fixes

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

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

* minor fix to execute_tool that was left out.

* Fixes following coderabbitai comments.

* [autofix.ci] apply automated fixes

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

* Update component_index.json

* [autofix.ci] apply automated fixes

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

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

* Add custom message to dict conversion in ValidatedTool

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

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

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

* 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 querying, creating, updating, and retrieving content.

* [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

* [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

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

---------

Co-authored-by: Koren Lazar <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <[email protected]>

* feat: Implement dynamic model discovery system (#10523)

* add dynamic model request

* add description to groq

* add cache folder to store cache models json

* change git ignore description

* [autofix.ci] apply automated fixes

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

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

* add comprehensive tests for Groq dynamic model discovery

- Add 101 unit tests covering success, error, and edge cases
- Test model discovery, caching, tool calling detection
- Test fallback models and backward compatibility
- Add support for real GROQ_API_KEY from environment
- Fix all lint errors and improve code quality

* [autofix.ci] apply automated fixes

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

* fix Python 3.10 compatibility - replace UTC with timezone.utc

Python 3.10 doesn't have datetime.UTC, need to use timezone.utc instead

* fix pytest hook signature - use config instead of _config

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix conftest config.py

* fix timezone UTC on tests

* [autofix.ci] apply automated fixes

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

* [autofix.ci] apply automated fixes

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

---------

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

* feat: remove `code` from Transactions to reduce clutter in logs (#10400)

* refactor: remove code from transaction model inputs

* refactor: remove code from transaction model inputs

* tests: add tests to make sure code is not added to transactions data

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

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

* refactor: improve code removal from logs with explicit dict copying

---------

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

* feat: new release for cuga component (#10591)

* feat: new release of cuga

* [autofix.ci] apply automated fixes

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

* fix: address review

* fix: fixed more bugs

* fix: build component index

* [autofix.ci] apply automated fixes

* fix: update test

* chore: update component index

* [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>

* feat: adds Component Inputs telemetry (#10254)

* feat: Introduce telemetry tracking for sensitive field types

Added a new set of field types that should not be tracked in telemetry due to their sensitive nature, including PASSWORD, AUTH, FILE, CONNECTION, and MCP. Updated relevant input classes to ensure telemetry tracking is disabled for these sensitive fields, enhancing data privacy and security.

* feat: Enhance telemetry payloads with additional fields and serialization support

Added new fields to the ComponentPayload and ComponentInputsPayload classes, including component_id and component_run_id, to improve telemetry data tracking. Introduced a serialize_input_values function to handle JSON serialization of component input values, ensuring robust handling of input data for telemetry purposes.

* feat: Implement telemetry input tracking and caching

Added functionality to track and cache telemetry input values within the Component class. Introduced a method to determine if inputs should be tracked based on sensitivity and an accessor for retrieving cached telemetry data, enhancing the robustness of telemetry handling.

* feat: Add logging for component input telemetry

Introduced a new method, log_package_component_inputs, to the TelemetryService for logging telemetry data related to component inputs. This enhancement improves the tracking capabilities of the telemetry system, allowing for more detailed insights into component interactions.

* feat: Enhance telemetry logging for component execution

Added functionality to log component input telemetry both during successful execution and error cases. Introduced a unique component_run_id for each execution to improve tracking. This update ensures comprehensive telemetry data collection, enhancing the robustness of the telemetry system.

* feat: Extend telemetry payload tests and enhance serialization

Added tests for the new component_id and component_run_id fields in ComponentPayload and ComponentInputsPayload classes. Introduced a new test suite for ComponentInputTelemetry, covering serialization of various data types and handling of edge cases. This update improves the robustness and coverage of telemetry data handling in the system.

* fix: Update default telemetry tracking behavior in BaseInputMixin

Changed the default value of track_in_telemetry from True to False in the BaseInputMixin class. Updated documentation to clarify that telemetry tracking is now opt-in and can be explicitly enabled for individual input types, enhancing data privacy and control.

* fix: Update telemetry tracking defaults for input types

Modified the default value of `track_in_telemetry` for various input classes to enhance data privacy. Regular inputs now default to False, while safe inputs like `IntInput` and `BoolInput` default to True, ensuring explicit opt-in for telemetry tracking. Updated related tests to reflect these changes.

* feat: add chunk_index and total_chunks fields to ComponentInputsPayload

This commit adds two new optional fields to ComponentInputsPayload:
- chunk_index: Index of this chunk in a split payload sequence
- total_chunks: Total number of chunks in the split sequence

Both fields default to None and use camelCase aliases for serialization.
This is Task 1 of the telemetry query parameter splitting implementation.

Tests included:
- Verify fields exist and can be set
- Verify camelCase serialization aliases work correctly
- Verify fields default to None when not provided

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

Co-Authored-By: Claude <[email protected]>

* refactor: update ComponentInputsPayload to support automatic splitting of oversized inputs

This commit enhances the ComponentInputsPayload class by implementing functionality to automatically split input values into multiple chunks if they exceed the maximum URL size limit. Key changes include:

- Added methods for calculating URL size, truncating oversized values, and splitting payloads.
- Updated component_inputs field to accept a dictionary instead of a string for better handling of input values.
- Improved documentation for the ComponentInputsPayload class to reflect the new splitting behavior and usage examples.

These changes aim to improve telemetry data handling and ensure compliance with URL length restrictions.

* refactor: enhance log_package_component_inputs to handle oversized payloads

This commit updates the log_package_component_inputs method in the TelemetryService class to split component input payloads into multiple requests if they exceed the maximum URL size limit. Key changes include:

- Added logic to split the payload using the new split_if_needed method.
- Each chunk is queued separately for telemetry logging.

These improvements ensure better handling of telemetry data while adhering to URL length restrictions.

* refactor: centralize maximum telemetry URL size constant

This commit introduces a centralized constant, MAX_TELEMETRY_URL_SIZE, to define the maximum URL length for telemetry GET requests. Key changes include:

- Added MAX_TELEMETRY_URL_SIZE constant to schema.py for better maintainability.
- Updated split_if_needed method in ComponentInputsPayload to use the new constant instead of a hardcoded value.
- Adjusted the TelemetryService to reference the centralized constant for URL size limits.

These changes enhance code clarity and ensure consistent handling of URL size limits across the telemetry service.

* refactor: update ComponentInputsPayload tests to use dictionary inputs

This commit modifies the tests for ComponentInputsPayload to utilize a dictionary for component inputs instead of a serialized JSON string. Key changes include:

- Renamed the test method to reflect the new input type.
- Removed unnecessary serialization steps and assertions related to JSON strings.
- Added assertions to verify the correct handling of dictionary inputs.

These changes streamline the testing process and improve clarity in how component inputs are represented.

* test: add integration tests for telemetry service payload splitting

This commit introduces integration tests for the TelemetryService to verify its handling of large and small payloads. Key changes include:

- Added tests to ensure large payloads are split into multiple chunks and queued correctly.
- Implemented a test to confirm that small payloads are not split and result in a single queued event.
- Created a mock settings service for testing purposes.

These tests enhance the reliability of the telemetry service by ensuring proper payload management.

* test: enhance ComponentInputsPayload tests with additional scenarios

This commit expands the test suite for ComponentInputsPayload by adding various scenarios to ensure robust handling of input payloads. Key changes include:

- Introduced tests for calculating URL size, ensuring it returns a positive integer and accounts for encoding.
- Added tests to verify the splitting logic for large payloads, including checks for chunk metadata and preservation of fixed fields.
- Implemented property-based tests using Hypothesis to validate that all chunks respect the maximum URL size and preserve original data.

These enhancements improve the reliability and coverage of the ComponentInputsPayload tests, ensuring proper functionality under various conditions.

* [autofix.ci] apply automated fixes

* optimize query param encoding

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* refactor: extract telemetry logging logic into a separate function

This commit introduces a new function, _log_component_input_telemetry, to centralize the logic for logging component input telemetry. The function is called in two places within the generate_flow_events function, improving code readability and maintainability by reducing duplication. This change enhances the clarity of telemetry handling in the flow generation process.

* refactor: optimize truncation logic in ComponentInputsPayload

This commit refines the truncation logic for input values in the ComponentInputsPayload class. The previous binary search method for string values has been simplified, allowing for direct truncation of both string and non-string values. This change enhances code clarity and maintains functionality while ensuring optimal handling of oversized inputs.

* refactor: update telemetry tracking logic to respect opt-in flag

This commit modifies the telemetry tracking logic in the Component class to change the default behavior of the `track_in_telemetry` attribute from True to False. This adjustment enhances user privacy by requiring explicit consent for tracking input objects in telemetry. The change ensures that sensitive field types are still auto-excluded from tracking, maintaining the integrity of the telemetry data.

* refactor: update tests to use dictionary format for component inputs

This commit modifies the integration tests for telemetry payload validation and component input telemetry to utilize dictionaries for component inputs instead of serialized JSON strings. Key changes include:

- Updated assertions to compare dictionary inputs directly.
- Enhanced clarity and maintainability of the test cases by removing unnecessary serialization steps.

These changes improve the representation of component inputs in tests, aligning with recent refactoring efforts.

* [autofix.ci] apply automated fixes

* refactor: specify type for current_chunk_inputs in ComponentInputsPayload

This commit updates the type annotation for the current_chunk_inputs variable in the ComponentInputsPayload class to explicitly define it as a dictionary. This change enhances code clarity and maintainability by providing better type information for developers working with the code.

* test: add component_id to ComponentPayload tests

This commit enhances the test cases for the ComponentPayload class by adding a component_id parameter to various initialization tests. The updates ensure that the component_id is properly tested across different scenarios, including valid parameters, error messages, and edge cases. This change improves the robustness of the tests and aligns with recent updates to the ComponentPayload structure.

* [autofix.ci] apply automated fixes

* feat: add component_id to ComponentPayload in build_vertex function

* fix: update MAX_TELEMETRY_URL_SIZE to 2048 and adjust related tests

This commit increases the maximum URL size for telemetry GET requests from 2000 to 2048 bytes to align with Scarf's specifications. Corresponding test assertions have been updated to reference the new constant, ensuring consistency across the codebase.

* [autofix.ci] apply automated fixes

* feat(telemetry): add track_in_telemetry field to starter project configurations

* refactor(telemetry): remove unused blank line in test imports

* [autofix.ci] apply automated fixes

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

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

* update starter templates

* [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

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

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* feat: Add gpt-5.1 model to Language models (#10590)

* Add gpt-5.1 model to starter projects

Added 'gpt-5.1' to the list of available models in all starter project JSON files to support the new model version. This update ensures users can select gpt-5.1 in agent configurations.

* [autofix.ci] apply automated fixes

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

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

* Update component_index.json

* [autofix.ci] apply automated fixes

* Update component_index.json

* [autofix.ci] apply automated fixes

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

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

---------

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

* fix: Use the proper Embeddings import for Qdrant vector store (#10613)

* Use the proper Embeddings import for Qdrant vector store

* [autofix.ci] apply automated fixes

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

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

---------

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

* fix: Ensure split text test is more robust (#10622)

* fix: Ensure split text test is more robust

* [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>

* fix: use issubclass in the pool creation (#10232)

* use issubclass in the pool creation

* [autofix.ci] apply automated fixes

* add poolclass pytests

* [autofix.ci] apply automated fixes

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

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

---------

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

* feat: make it possible to load graphs using `get_graph` function in scripts (#9913)

* feat: Enhance graph loading functionality to support async retrieval

- Updated `load_graph_from_script` to be an async function, allowing for the retrieval of the graph via an async `get_graph` function if available.
- Implemented fallback to the existing `graph` variable for backward compatibility.
- Enhanced `find_graph_variable` to identify both `get_graph` function definitions and `graph` variable assignments, improving flexibility in script handling.

* feat: Update load_graph_from_script to support async graph retrieval

- Refactored `load_graph_from_script` to be an async function, enabling the use of an async `get_graph` function for graph retrieval.
- Implemented a fallback mechanism to access the `graph` variable for backward compatibility.
- Enhanced error handling to provide clearer messages when neither `graph` nor `get_graph()` is found in the script.

* feat: Refactor simple_agent.py to support async graph creation

- Introduced an async `get_graph` function to handle the initialization of components and graph creation without blocking.
- Updated the logging configuration and component setup to be part of the async function, improving the overall flow and responsiveness.
- Enhanced documentation for the `get_graph` function to clarify its purpose and return type.

* feat: Update serve_command and run functions to support async graph loading

- Refactored `serve_command` to be an async function using `syncify`, allowing for non-blocking execution.
- Updated calls to `load_graph_from_path` and `load_graph_from_script` within `serve_command` and `run` to await their results, enhancing performance and responsiveness.
- Improved overall async handling in the CLI commands for better integration with async workflows.

* feat: Refactor load_graph_from_path to support async execution

- Changed `load_graph_from_path` to an async function, enabling non-blocking graph loading.
- Updated the call to `load_graph_from_script` to use await, improving performance during graph retrieval.
- Enhanced the overall async handling in the CLI for better integration with async workflows.

* feat: Enhance async handling in simple_agent and related tests

- Updated `get_graph` function in `simple_agent.py` to utilize async component initialization for improved responsiveness.
- Modified test cases in `test_simple_agent_in_lfx_run.py` to validate the async behavior of `get_graph`.
- Refactored various test functions across multiple files to support async execution, ensuring compatibility with the new async workflows.
- Improved documentation for async functions to clarify their purpose and usage.

* docs: Implement async get_graph function for improved component initialization

- Introduced an async `get_graph` function in `README.md` to facilitate non-blocking component initialization.
- Enhanced the logging configuration and component setup within the async function, ensuring a smoother flow.
- Updated documentation to clarify the purpose and return type of the `get_graph` function, aligning with the async handling improvements.

* refactor: reorder imports in simple_agent test file

* style: reorder imports in simple_agent test file

* [autofix.ci] apply automated fixes

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

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

* update component index

* [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

* [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>

* fix: prevent UI from getting stuck when switching to cURL mode after parse errors

* [autofix.ci] apply automated fixes

* [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

---------

Co-authored-by: Koren Lazar <[email protected]>
Co-authored-by: Koren Lazar <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <[email protected]>
Co-authored-by: Cristhian Zanforlin Lousa <[email protected]>
Co-authored-by: Gabriel Luiz Freitas Almeida <[email protected]>
Co-authored-by: Sami Marreed <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
Co-authored-by: Madhavan <[email protected]>
Co-authored-by: Madhavan <[email protected]>
Co-authored-by: Eric Hare <[email protected]>
Co-authored-by: ming <[email protected]>
Co-authored-by: Hamza Rashid <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants