Ë
    ½ìjÙ
  ã                  óˆ   — d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	m
Z
 eeeee	f      z  Z	  G d„ de«      Z G d„ d	e
«      Zy
)a  Provider interface contracts for model layer clients.

Defines the base ``ProviderABC`` abstract base class that all model provider
clients (LiteLLM, Ollama, llama.cpp) must implement.  This ensures structural
and behavioral compatibility across providers.
é    )Úannotations)ÚABCÚabstractmethod)ÚIterator)ÚAnyÚProtocolc                  óŠ   — e Zd ZdZe	 	 	 	 	 	 	 	 dd„«       Ze	 	 	 	 	 	 	 	 d	d„«       Zed
d„«       Zedd„«       Zedd„«       Z	y)ÚProviderABCzIAbstract base class defining the contract for all model provider clients.c                 ó   — y)aj  Send a chat completion request.

        Args:
            model: The model identifier to use.
            messages: The conversation messages.
            **kwargs: Additional provider-specific parameters.

        Returns:
            The model's response content as a string, or an iterator of
            response chunks when streaming is requested.
        N© ©ÚselfÚmodelÚmessagesÚkwargss       úQ/home/oem/CyberBrain26-unified/src/cyberbrain26/model_layer/provider_interface.pyÚchatzProviderABC.chat   ó   � ó    c                 ó   — y)a  Create embeddings for the given texts.

        Args:
            model: The model identifier to use.
            texts: The texts to embed.
            **kwargs: Additional provider-specific parameters.

        Returns:
            A list of embedding vectors.
        Nr   ©r   r   Útextsr   s       r   ÚembedzProviderABC.embed(   r   r   c                 ó   — y)zrList available models from the provider.

        Returns:
            A list of model info dictionaries.
        Nr   ©r   s    r   Úlist_modelszProviderABC.list_models:   r   r   c                 ó   — y)z…Check if the provider is available/healthy.

        Returns:
            True if the provider is reachable and operational.
        Nr   r   s    r   Úis_availablezProviderABC.is_availableB   r   r   c                 ó   — y)z{Perform a health check on the provider.

        Returns:
            A dictionary with health status information.
        Nr   r   s    r   Úhealth_checkzProviderABC.health_checkJ   r   r   N©r   Ústrr   zlist[dict[str, str]]r   r   ÚreturnÚ
ChatResult©r   r"   r   z	list[str]r   r   r#   zlist[list[float]]©r#   zlist[dict[str, Any]]©r#   Úbool©r#   zdict[str, Any])
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r    r   r   r   r
   r
      s³   „ ÙSàðàðð 'ðð ð	ð
 
òó ðð$ ðàðð ðð ð	ð
 
òó ðð" òó ðð òó ðð òó ñr   r
   c                  óX   — e Zd ZdZ	 	 	 	 	 	 	 	 dd„Z	 	 	 	 	 	 	 	 d	d„Zd
d„Zdd„Zdd„Zy)ÚProviderProtocolz:Structural protocol for provider duck-typing verification.c                 ó   — y ©Nr   r   s       r   r   zProviderProtocol.chatV   ó   € ð 	r   c                 ó   — y r1   r   r   s       r   r   zProviderProtocol.embed^   r2   r   c                 ó   — y r1   r   r   s    r   r   zProviderProtocol.list_modelsf   ó   € Ør   c                 ó   — y r1   r   r   s    r   r   zProviderProtocol.is_availablei   r5   r   c                 ó   — y r1   r   r   s    r   r    zProviderProtocol.health_checkl   r5   r   Nr!   r%   r&   r'   r)   )	r*   r+   r,   r-   r   r   r   r   r    r   r   r   r/   r/   S   sj   „ ÙDðàðð 'ðð ð	ð
 
óðàðð ðð ð	ð
 
óóóôr   r/   N)r-   Ú
__future__r   Úabcr   r   Úcollections.abcr   Útypingr   r   r"   Údictr$   r
   r/   r   r   r   ú<module>r=      sK   ðñõ #ç #Ý $ß  à�8˜D  c ™NÑ+Ñ+€
Ø Oô>�#ô >ôB�xõ r   