"""Embedder interface."""

from __future__ import annotations

from typing import Protocol, runtime_checkable


class EmbeddingError(Exception):
    """Raised when an embedding provider call fails."""


@runtime_checkable
class Embedder(Protocol):
    provider: str
    model: str

    def embed(self, texts: list[str]) -> list[list[float]]:
        """Return one vector per input text."""
        ...
