from abc import ABC, abstractmethod from typing import Any, Optional class BaseLLMClient(ABC): """Abstract base class for LLM clients.""" def __init__(self, model: str, base_url: Optional[str] = None, **kwargs): self.model = model self.base_url = base_url self.kwargs = kwargs @abstractmethod def get_llm(self) -> Any: """Return the configured LLM instance.""" pass @abstractmethod def validate_model(self) -> bool: """Validate that the model is supported by this client.""" pass