
    h                     ~   d dl mZ d dlZd dlmZ d dlmZ ddlm	Z	m
Z
mZmZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ dedee   fdZ ej:                  d       ej<                  ddddddd        ej<                  ddddd       ej<                  dddd !      ej>                  d"ej@                  dedee   d#dfd$                                   Z!e!jE                         ej>                  d"ej@                  fd%              Ze!jG                  e
       e!jG                  e       e!jG                  e       e!jG                  e       e!jG                  e       e!jG                  e       e!jG                  e       e!jG                  e       e!jG                  e       e$d&k(  r e!        yy)'    )OptionalN)version)HealthManagementClient   )get_stored_api_keyloginlogoutwhoami)chat)credentials)http)keys)models)users)interactive_shellbase_urlapi_keyc                 h   t        j                  dt                | rt        j                  d|         	 t        | |      }|j	                         }|rt        j                  d|        yt        j                  d       y# t
        $ r"}t        j                  d|        Y d}~yd}~ww xY w)z"Print CLI and server version info.zLiteLLM Proxy CLI Version: zLiteLLM Proxy Server URL: )r   r   zLiteLLM Proxy Server Version: z+LiteLLM Proxy Server Version: (unavailable)z#Could not retrieve server version: N)clickecholitellm_versionr   get_server_version	Exception)r   r   health_clientserver_versiones        Y/var/www/Befach/backend/env/lib/python3.12/site-packages/litellm/proxy/client/cli/main.pyprint_versionr      s    	JJ,_,=>?

/z:;>.'R&99;JJ77GHIJJDE >

8<==>s   7B 0B 	B1B,,B1T)invoke_without_commandz	--versionz-vFz7Show the LiteLLM Proxy CLI and server version and exit.c                     |r`| j                   sTt        | j                  j                  d      xs d| j                  j                  d            xs | j	                         S d S )Nr   http://localhost:4000r   )resilient_parsingr   paramsgetexit)ctxparamvalues      r   <lambda>r)   *   s^     
s,, 	JJNN:&A*AJJNN9%	
 	 88:(7 37(7    )is_flagis_eagerexpose_valuehelpcallbackz
--base-urlLITELLM_PROXY_URLr!   z$Base URL of the LiteLLM proxy server)envvarshow_envvardefaultr.   z	--api-keyLITELLM_PROXY_API_KEYzAPI key for authentication)r1   r2   r.   r&   returnc                     | j                  t               |
t               }|| j                  d<   || j                  d<   | j                  t        |        yy)z4LiteLLM Proxy CLI - Manage your LiteLLM proxy serverNr   r   )ensure_objectdictr   objinvoked_subcommandr   )r&   r   r   s      r   clir;   &   sX    8 d $&"CGGJ CGGI %# &r*   c                     t        | j                  j                  d      | j                  j                  d             y)z.Show the LiteLLM Proxy CLI and server version.r   r   N)r   r9   r$   )r&   s    r   r   r   P   s(     #''++j)377;;y+ABr*   __main__)%typingr   r   litellm._versionr   r   litellm.proxy.client.healthr   commands.authr   r   r	   r
   commands.chatr   commands.credentialsr   commands.httpr   commands.keysr   commands.modelsr   commands.usersr   	interfacer   strr   groupoptionpass_contextContextr;   commandadd_command__name__ r*   r   <module>rR      s     7 > D D  -   $ ! (>C >(3- >  D)td	B7
 #	/ "	%	 U]] c HSM d  
 *4  C C  C                   zE r*   