fix: expose agent module via cascadeflow.agent attribute#176
Open
AasheeshLikePanner wants to merge 1 commit intolemony-ai:mainfrom
Open
fix: expose agent module via cascadeflow.agent attribute#176AasheeshLikePanner wants to merge 1 commit intolemony-ai:mainfrom
AasheeshLikePanner wants to merge 1 commit intolemony-ai:mainfrom
Conversation
- Add 'agent' to _LAZY_IMPORTS dict to expose the agent module - Handle attr_name=None case in __getattr__ to return module itself - This fixes AttributeError when accessing cascadeflow.agent - Enables hasattr(cascadeflow.agent, 'PROVIDER_REGISTRY') to work Fixes test_harness_api.py::test_top_level_exports_exist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Description
This fix exposes the
agentmodule viacascadeflow.agentattribute, which was previously missing from the lazy imports. The testtest_top_level_exports_existwas failing becausehasattr(cascadeflow.agent, 'PROVIDER_REGISTRY')raised an AttributeError.🔗 Related Issues
🔄 Type of Change
🧪 Testing
Test cases added
How to test
📋 Checklist
Code Quality
blackto format my coderuffand fixed all linting issuesTesting
Breaking Changes
🙏 Reviewers
By submitting this PR, I confirm that: