feat: fix cuga component with new release#10646
Conversation
…ngflow into feature/new-cuga-release
…eature/new-cuga-release
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe PR bumps the cuga dependency to 0.1.8, removes structured-output methods and outputs from CugaComponent, adds a new decomposition_strategy input field, and updates corresponding unit tests to reflect these changes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touchesImportant Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 2 warnings, 2 inconclusive)
✅ Passed checks (2 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/lfx/src/lfx/components/models_and_agents/cuga_agent.py (1)
381-381: Remove redundant import.The
uuid4is already imported at line 4. The local import at line 381 is unnecessary.Apply this diff:
- from uuid import uuid4 -
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
pyproject.toml(1 hunks)src/backend/tests/unit/components/models_and_agents/test_agent_component.py(0 hunks)src/backend/tests/unit/components/models_and_agents/test_cuga_agent.py(2 hunks)src/lfx/src/lfx/components/models_and_agents/cuga_agent.py(7 hunks)
💤 Files with no reviewable changes (1)
- src/backend/tests/unit/components/models_and_agents/test_agent_component.py
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-05T22:51:27.961Z
Learnt from: edwinjosechittilappilly
Repo: langflow-ai/langflow PR: 0
File: :0-0
Timestamp: 2025-08-05T22:51:27.961Z
Learning: The TestComposioComponentAuth test in src/backend/tests/unit/components/bundles/composio/test_base_composio.py demonstrates proper integration testing patterns for external API components, including real API calls with mocking for OAuth completion, comprehensive resource cleanup, and proper environment variable handling with pytest.skip() fallbacks.
Applied to files:
src/backend/tests/unit/components/models_and_agents/test_cuga_agent.py
🧬 Code graph analysis (2)
src/backend/tests/unit/components/models_and_agents/test_cuga_agent.py (1)
src/backend/tests/unit/components/models_and_agents/test_agent_component.py (4)
component_class(26-27)component_class(178-179)default_kwargs(40-55)component_setup(33-37)
src/lfx/src/lfx/components/models_and_agents/cuga_agent.py (1)
src/lfx/src/lfx/inputs/inputs.py (4)
BoolInput(418-431)DropdownInput(470-496)IntInput(346-379)MultilineInput(260-270)
⏰ 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). (17)
- GitHub Check: Lint Backend / Run Mypy (3.11)
- GitHub Check: Lint Backend / Run Mypy (3.13)
- GitHub Check: Lint Backend / Run Mypy (3.10)
- GitHub Check: Lint Backend / Run Mypy (3.12)
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 4
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 5
- GitHub Check: Run Frontend Tests / Determine Test Suites and Shard Distribution
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 3
- GitHub Check: Run Frontend Unit Tests / Frontend Jest Unit Tests
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 2
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 1
- GitHub Check: Run Backend Tests / LFX Tests - Python 3.10
- GitHub Check: Run Backend Tests / Integration Tests - Python 3.10
- GitHub Check: Test Starter Templates
- GitHub Check: Update Component Index
- GitHub Check: Update Starter Projects
- GitHub Check: Run Ruff Check and Format
🔇 Additional comments (5)
src/backend/tests/unit/components/models_and_agents/test_cuga_agent.py (1)
74-74: LGTM! Comprehensive test coverage for the new decomposition_strategy field.The test changes properly validate:
- Field presence in inputs and component attributes
- Correct default value ("flexible")
- Available options (["flexible", "exact"])
- Advanced configuration flag
- Field mutability between valid values
Also applies to: 231-231, 240-240, 245-245, 247-273
src/lfx/src/lfx/components/models_and_agents/cuga_agent.py (3)
131-139: LGTM! Well-configured decomposition_strategy input field.The new DropdownInput is properly configured with:
- Clear display name and informative description
- Appropriate options (["flexible", "exact"])
- Sensible default value ("flexible")
- Correct advanced flag setting
203-203: LGTM! Decomposition strategy properly propagated to settings.The decomposition_strategy value is correctly propagated to the Dynaconf settings object using the appropriate nested path.
390-402: LGTM! Proper handling of missing message IDs.The logic correctly handles the case where messages sent without a ChatOutput connection lack an ID by generating and assigning one. The try-except pattern appropriately catches AttributeError when accessing the id property.
pyproject.toml (1)
137-137: No issues found. The cuga dependency bump is valid.Version 0.1.8 exists on PyPI and has no known security vulnerabilities. The version bump from 0.1.7 to 0.1.8 is safe to merge.
Summary by CodeRabbit
Chores
New Features
Refactor