"""Provider abstraction for AI generation backends.""" from __future__ import annotations import abc from pathlib import Path from bulkgen.config import TargetConfig from bulkgen.providers.models import ModelInfo class Provider(abc.ABC): """Abstract base for generation providers.""" @staticmethod @abc.abstractmethod def get_provided_models() -> list[ModelInfo]: """Return the models this provider supports.""" @abc.abstractmethod async def generate( self, target_name: str, target_config: TargetConfig, resolved_prompt: str, resolved_model: ModelInfo, project_dir: Path, ) -> None: """Generate the target artifact and write it to *project_dir / target_name*. Args: target_name: Output filename (relative to project_dir). target_config: The parsed target configuration. resolved_prompt: The fully resolved prompt text. resolved_model: The resolved model information. project_dir: The project working directory. """