Skip to content

[BUG] BidiGeminiLiveModel and BidiOpenAIRealtimeModel not exported in bidi.models #1329

@cagataycali

Description

@cagataycali

Checks

  • I have updated to the lastest minor and patch version of Strands
  • I have checked the documentation and this is not expected behavior
  • I have searched ./issues and there are no duplicates of my issue

Strands Version

1.19.0

Python Version

3.13 (also affects 3.10, 3.11, 3.12)

Operating System

All platforms (macOS, Linux, Windows)

Installation Method

git clone

Steps to Reproduce

  1. Install strands-agents:
pip install strands-agents
  1. Try to import as documented in official examples:
from strands.experimental.bidi.models import BidiOpenAIRealtimeModel
from strands.experimental.bidi.models import BidiGeminiLiveModel
  1. Observe the ImportError:
ImportError: cannot import name 'BidiOpenAIRealtimeModel' from 'strands.experimental.bidi.models'
  1. Documentation references:

Expected Behavior

The imports should work as documented. Users should be able to import BidiGeminiLiveModel and BidiOpenAIRealtimeModel from the top-level strands.experimental.bidi.models package, just like BidiNovaSonicModel (which works correctly).

Actual Behavior

ImportError is raised because these classes are not included in the __all__ list of src/strands/experimental/bidi/models/__init__.py.

Current workaround requires importing directly from submodules:

from strands.experimental.bidi.models.openai_realtime import BidiOpenAIRealtimeModel
from strands.experimental.bidi.models.gemini_live import BidiGeminiLiveModel

Additional Context

Root Cause:
The classes exist and work perfectly, but are missing from the package exports in src/strands/experimental/bidi/models/__init__.py:

# Current __init__.py (MISSING EXPORTS)
from .model import BidiModel, BidiModelTimeoutError
from .nova_sonic import BidiNovaSonicModel
# Missing: from .gemini_live import BidiGeminiLiveModel
# Missing: from .openai_realtime import BidiOpenAIRealtimeModel

__all__ = [
    "BidiModel",
    "BidiModelTimeoutError",
    "BidiNovaSonicModel",
    # Missing: "BidiGeminiLiveModel",
    # Missing: "BidiOpenAIRealtimeModel",
]

Impact:

  • 🔴 Critical: Users cannot follow official documentation
  • 🔴 Confusing: Inconsistent - BidiNovaSonicModel works but others don't
  • 🔴 Poor DX: Forces users to discover internal package structure

Testing:
Verified across Python 3.10, 3.11, 3.12, 3.13 - all fail with the same ImportError.

Possible Solution

Add the missing imports and exports to src/strands/experimental/bidi/models/__init__.py:

from .model import BidiModel, BidiModelTimeoutError
from .nova_sonic import BidiNovaSonicModel
from .gemini_live import BidiGeminiLiveModel        # ADD THIS
from .openai_realtime import BidiOpenAIRealtimeModel  # ADD THIS

__all__ = [
    "BidiModel",
    "BidiModelTimeoutError",
    "BidiNovaSonicModel",
    "BidiGeminiLiveModel",           # ADD THIS
    "BidiOpenAIRealtimeModel",        # ADD THIS
]

This 4-line change fixes the issue and aligns code with documentation.

Fix provided in PR #1328

Related Issues

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions