Summary
Users currently have to import ModelProvider directly from the Data Designer internals:
from data_designer.config.models import ModelProvider
This leaks a dependency implementation detail into user code. ModelProvider should be re-exported from the anonymizer package so the full setup is self-contained:
from anonymizer import Anonymizer, AnonymizerConfig, AnonymizerInput, Redact, Substitute, ModelProvider, configure_logging
Current state
Configuring model providers programmatically (rather than via YAML) requires a data_designer import. This means users need to know about and directly depend on an internal Data Designer type, even though they are only configuring the Anonymizer.
Proposed change
Add ModelProvider (and any other Data Designer types that surface in the public Anonymizer API) to src/anonymizer/__init__.py as explicit re-exports:
from data_designer.config.models import ModelProvider as ModelProvider
This keeps the internal dependency on Data Designer but hides it behind the Anonymizer public surface. Users never need to know where ModelProvider comes from.
Acceptance criteria
Summary
Users currently have to import
ModelProviderdirectly from the Data Designer internals:This leaks a dependency implementation detail into user code.
ModelProvidershould be re-exported from theanonymizerpackage so the full setup is self-contained:Current state
Configuring model providers programmatically (rather than via YAML) requires a
data_designerimport. This means users need to know about and directly depend on an internal Data Designer type, even though they are only configuring the Anonymizer.Proposed change
Add
ModelProvider(and any other Data Designer types that surface in the public Anonymizer API) tosrc/anonymizer/__init__.pyas explicit re-exports:This keeps the internal dependency on Data Designer but hides it behind the Anonymizer public surface. Users never need to know where
ModelProvidercomes from.Acceptance criteria
from anonymizer import ModelProviderworksdata_designerimports__init__.pywith explicitasre-exports (PEP 484__all__or explicit aliases) so the re-export is visible to type checkers