Ë
    tPêjÝ  ã                   ó4   — d dl mZmZ ddlmZ  G d„ d«      Zy)é    )ÚAnyÚFinalé   )Ú
HTTPClientc                   óT   — e Zd ZdZd
dededz  defd„Zdeeef   fd„Z	dedz  fd	„Z
y)ÚHealthManagementClientzW
    Client for interacting with the health endpoints of the LiteLLM proxy server.
    NÚbase_urlÚapi_keyÚtimeoutc                 ó*   — t        |||¬«      | _        y)aa  
        Initialize the HealthManagementClient.

        Args:
            base_url (str): The base URL of the LiteLLM proxy server (e.g., "http://localhost:4000")
            api_key (Optional[str]): API key for authentication. If provided, it will be sent as a Bearer token.
            timeout (int): Request timeout in seconds (default: 30)
        )r	   r
   r   N)r   Ú_http)Úselfr	   r
   r   s       ú`/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/proxy/client/health.pyÚ__init__zHealthManagementClient.__init__   s   € ô  ¨¸7ÈGÔTˆ�
ó    Úreturnc                 ó:   — | j                   j                  dd«      S )a4  
        Check the readiness of the LiteLLM proxy server.

        Returns:
            Dict[str, Any]: The readiness status and details from the server.

        Raises:
            requests.exceptions.RequestException: If the request fails
            ValueError: If the response is not valid JSON
        ÚGETz/health/readiness)r   Úrequest)r   s    r   Úget_readinessz$HealthManagementClient.get_readiness   s   € ð �z‰z×!Ñ! %Ð)<Ó=Ð=r   c                 óD   — | j                  «       }|j                  d«      S )z«
        Get the LiteLLM server version from the readiness endpoint.

        Returns:
            Optional[str]: The server version if available, otherwise None.
        Úlitellm_version)r   Úget)r   Ú	readinesss     r   Úget_server_versionz)HealthManagementClient.get_server_version#   s"   € ð  ×-Ñ-Ó/ˆ	Ø�}‰}Ð.Ó/Ð/r   )Né   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstrÚintr   Údictr   r   r   © r   r   r   r      sM   „ ññ	U ð 	U¨s°T©zð 	UÈ3ó 	Uð>˜t C¨ H™~ó >ð0 C¨$¡Jô 0r   r   N)Útypingr   r   Úhttp_clientr   r   r$   r   r   ú<module>r'      s   ðß å #÷%0ò %0r   