fix(bidi): export BidiGeminiLiveModel and BidiOpenAIRealtimeModel
Description
Fixes missing exports in strands.experimental.bidi.models module that caused ImportError when users followed the official documentation examples.
Problem: Users following documentation at:
Were encountering:
from strands.experimental.bidi.models import BidiOpenAIRealtimeModel
# ImportError: cannot import name 'BidiOpenAIRealtimeModel' from 'strands.experimental.bidi.models'
Solution:
- Added
BidiGeminiLiveModelandBidiOpenAIRealtimeModelto imports - Added both classes to
__all__list insrc/strands/experimental/bidi/models/__init__.py
Why this matters:
The classes exist and work perfectly when imported directly (from .openai_realtime import BidiOpenAIRealtimeModel), but were not exposed at the package level, causing confusion for users following the docs.
Related Issues
Discovered during testing of bidirectional streaming examples. No existing issue.
Documentation PR
No documentation changes needed - this PR aligns code with existing documentation.
Type of Change
Bug fix
Testing
How have you tested the change?
Manual Testing:
# Before: ImportError
# After: Works correctly
from strands.experimental.bidi.models import BidiOpenAIRealtimeModel
from strands.experimental.bidi.models import BidiGeminiLiveModel
# Both imports now work as documented
Verification:
-
Tested that imports work from top-level
strands.experimental.bidi.models -
Verified existing direct imports still work:
from strands.experimental.bidi.models.openai_realtime import BidiOpenAIRealtimeModel -
Confirmed no breaking changes to existing code
-
[x] I ran
hatch run prepare
Checklist
- [x] I have read the CONTRIBUTING document
- [x] I have added any necessary tests that prove my fix is effective or my feature works
- [x] I have updated the documentation accordingly
- [x] I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
- [x] My changes generate no new warnings
- [x] Any dependent changes have been merged and published
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:loudspeaker: Thoughts on this report? Let us know!
Gemini and OpenAI requires lazy loading on imports, so closing in favor of https://github.com/strands-agents/sdk-python/pull/1383/files