-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Description
Please read this first
- Have you read the docs?Agents SDK docs
- Have you searched for related issues? Others may have faced similar issues.
Describe the bug
The MultiProvider
class is used as the default factory for RunConfig.model_provider
but is not exported in the public API (__init__.py
). This creates an inconsistency where users cannot directly access the class that's used internally as the default.
Current Behavior
# In run.py
model_provider: ModelProvider = field(default_factory=MultiProvider)
# But in __init__.py, MultiProvider is not exported
# Users cannot do:
from agents import MultiProvider # This fails
Expected Behavior
Users should be able to access MultiProvider
directly since it's used as the default model provider.
Impact
- API Inconsistency: The default behavior uses a class that's not publicly accessible
- User Confusion: Users might want to customize the default provider but can't access the class
- Limited Flexibility: Users cannot create custom
MultiProvider
instances with specific configurations
Proposed Solutions
Export MultiProvider directly
Add MultiProvider
to the __all__
list in __init__.py
:
from .models.multi_provider import MultiProvider
__all__ = [
# ... existing exports
"MultiProvider",
# ...
]
Debug information
- Agents SDK version: (e.g.
v0.2.2
) - Python version (e.g. Python 3.12)