def __init__(
        self, providers: R2RProviders, services: R2RServices, config: R2RConfig
    ):
        """
        :param providers: Typically includes auth, database, etc.
        :param services: Additional service references (ingestion, etc).
        """
        self.providers = providers
        self.services = services
        self.config = config
        self.router = APIRouter()
        self.openapi_extras = self._load_openapi_extras()

        # Add the rate-limiting dependency
        self.set_rate_limiting()

        # Initialize any routes
        self._setup_routes()
        self._register_workflows()

        :param providers: Typically includes auth, database, etc.
        :param services: Additional service references (ingestion, etc).
        
py/core/main/api/v3/base_router.py