Alpha Berkeley Framework v0.7.6 - Provider Registry System
Alpha Berkeley Framework - Latest Release (v0.7.6)
π Architecture Enhancement Release - Provider Registry System with extensible AI provider management.
What's New in v0.7.6
ποΈ Provider Registry System
Centralized Provider Management
- Registry Integration: AI providers now managed through the same registry system as capabilities, services, and other components
- Single Source of Truth: All provider logic centralized in provider adapter classes
- Lazy Loading: Providers loaded on-demand with proper dependency management
- Extensibility: Applications can register custom providers (Azure OpenAI, institutional AI services, etc.)
Provider Adapter Architecture
- New
BaseProviderAbstract Class: Defines consistent interface for all AI providers - Five Framework Providers: Anthropic, OpenAI, Google, Ollama, CBORG adapters implemented
- Provider Metadata: Simple class attributes define requirements (API key, base URL, proxy support)
- Health Check System: Each provider implements connectivity testing with charge-aware logic
Simplified Registration
- Minimal Registration: Just
module_pathandclass_namerequired - Metadata Introspection: Registry reads provider metadata from class attributes
- 60% Less Code: Provider registration reduced from 8-9 lines to 2 lines per provider
- No Duplication: Single source of truth eliminates metadata duplication
Code Reduction & Maintainability
- ~860 Lines Removed: Eliminated provider-specific logic from factory.py, completion.py, health_cmd.py
- ~290 Lines Saved: Factory module reduced from 472 to 206 lines (-56%)
- ~298 Lines Saved: Completion module streamlined significantly
- ~290 Lines Saved: Health check module simplified
- Single Implementation: Both PydanticAI models and direct completions use same adapter code
π§ Critical Features Preserved
All existing functionality maintained:
- β
HTTP Proxy Support:
HTTP_PROXYenvironment variable for enterprise deployments - β Ollama Fallback Logic: Automatic localhost β host.containers.internal switching
- β Timeout Configuration: Per-provider and per-request timeouts
- β
Environment Variables:
${VAR_NAME}resolution in config files - β Extended Thinking: Anthropic and Google thinking modes fully supported
- β TypedDict Support: Automatic conversion to Pydantic models
- β Charge-Aware Health Checks: Format validation for paid APIs (Anthropic, Google)
π― Developer Experience Improvements
Custom Provider Registration
Applications can now register custom AI providers:
from framework.registry import ProviderRegistration
from framework.models.providers.base import BaseProvider
# Define provider adapter
class AzureOpenAIProviderAdapter(BaseProvider):
name = "azure_openai"
requires_api_key = True
requires_base_url = True
# ... implementation ...
# Register in application registry
return extend_framework_registry(
providers=[
ProviderRegistration(
module_path="my_app.providers.azure",
class_name="AzureOpenAIProviderAdapter"
)
]
)Common use cases:
- Azure OpenAI enterprise deployments
- Institutional AI services (Stanford AI Playground, national lab endpoints)
- Commercial providers (Cohere, Mistral AI, Together AI)
- Self-hosted models with OpenAI-compatible APIs
Provider Discovery
from framework.registry import get_registry
registry = get_registry()
providers = registry.list_providers() # ['anthropic', 'openai', 'google', 'ollama', 'cborg']
provider = registry.get_provider('anthropic') # Get provider classπ§ͺ Testing Infrastructure
pytest Configuration
- New
pytest.iniwith test markers (unit, integration, requires_api, etc.) - Organized test categorization for better test management
- VCR cassette markers for recorded API interactions
VCR Test Support
tests/cassettes/infrastructure for recording/replaying API interactions- Cost-effective integration testing without repeated API charges
- Deterministic tests with recorded responses
- Comprehensive README documenting VCR usage and security
π οΈ Utilities & Infrastructure
Log Filtering System
- New
framework.utils.log_filtermodule for dynamic log control LoggerFilterclass for selective suppression by logger name, level, or pattern- Context managers:
suppress_logger(),suppress_logger_level(),quiet_logger() - Used in health checks to suppress verbose registry initialization logs
Memory Storage Improvements
- Switched from root logger to framework logger for consistency
- Reduced log verbosity (INFO β DEBUG for initialization messages)
- Better integration with framework logging patterns
π Documentation Updates
Provider Registry Documentation
- New
ProviderRegistrationdocumentation in registry API reference - Custom provider registration guide with Azure OpenAI example
- Updated component initialization order to include providers
- Provider access methods documented on
RegistryManager
Configuration Documentation
- Updated provider extensibility information
- Direct link to custom provider registration guide
- GitHub issue creation guidance for community providers
π§Ή Code Cleanup
Removed Deprecated Code
- Deleted
src/framework/interfaces/openwebui/(deprecated interface) - Removed
docs/ressources/other/EXECUTION_POLICY_SYSTEM.md(outdated doc) - Cleaned up unused provider logic from multiple files
Test Updates
- Fixed config import paths (moved from
configs.configtoframework.utils.config) - Added minimal config.yml in tests to prevent config loading errors
- Updated integration tests for new architecture
Benefits Summary
- Maintainability: Single source of truth for provider logic
- Extensibility: Applications can register custom providers easily
- Consistency: Same adapter used by factory.py and completion.py
- Type Safety: Strong typing throughout provider system
- Discoverability:
registry.list_providers()shows available providers - Clean Architecture: Clear separation between provider interface and implementation
- Reduced Code: ~860 lines removed, ~1,090 lines of well-structured adapter code added
- Zero Breaking Changes: All existing APIs work identically
- Better Testing: VCR infrastructure for integration tests
- Enhanced Health Checks: Provider-specific health validation through registry
Technical Details
Component Architecture
Registry System
βββ ProviderRegistration (minimal metadata: module_path, class_name)
βββ Provider Adapters (metadata as class attributes)
β βββ BaseProvider (abstract interface)
β βββ AnthropicProviderAdapter
β βββ OpenAIProviderAdapter
β βββ GoogleProviderAdapter
β βββ OllamaProviderAdapter
β βββ CBorgProviderAdapter
βββ RegistryManager (lazy loading, metadata introspection)
Initialization Order
- Context classes
- Data sources
- Providers (new in v0.7.6)
- Core nodes
- Services
- Capabilities
- Framework prompt providers
Provider Interface
Each provider implements:
create_model()- PydanticAI model creationexecute_completion()- Direct API callscheck_health()- Connectivity validation
Migration Notes
No breaking changes. The provider registry is a backward-compatible internal refactoring. All existing code using get_model() and get_chat_completion() continues to work without modifications.
For Advanced Users
If you need custom AI providers, you can now register them through the registry system. See documentation for complete examples.
Configuration Changes
No configuration changes required. All existing config.yml provider configurations remain valid.
Files Changed
- 12 atomic commits implementing provider registry system
- 3 documentation files updated
- 6 version files updated for v0.7.6 release
Upgrade Instructions
pip install --upgrade alpha-berkeley-frameworkOr with specific extras:
pip install --upgrade "alpha-berkeley-framework[memory,docs]"Full Changelog: See CHANGELOG.md for detailed commit history