"""Model adapters."""

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from ..config import ModelConfig

from .base import BaseModel
from .stub import StubModel


def get_model(config: "ModelConfig") -> BaseModel:
    """Factory function to create model from config."""
    models = {
        "stub": StubModel,
        # "openai": OpenAIModel,  # TODO: implement
        # "anthropic": AnthropicModel,  # TODO: implement
        # "local": LocalTransformerModel,  # TODO: implement
    }
    
    model_cls = models.get(config.provider)
    if not model_cls:
        # Fall back to stub for unimplemented providers
        return StubModel(config)
    
    return model_cls(config)


__all__ = ["BaseModel", "StubModel", "get_model"]
