
    AHj                        d dl Z d dlZd dlZd dlmZ d dlmZmZmZm	Z	m
Z
mZmZmZ d dl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mZmZ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*m+Z+ g dZ,e+	 	 	 	 	 	 	 dFde-deee-ef      dee	e-      de
d   deee-ef      deee-ef      deee-ef      de!fd       Z.e	 	 	 	 	 	 	 dGde-deee-ef      dee	e-      dee-   dee-   dee-   de
d   de
d   deeee!f   fd       Z/e	 	 	 	 	 	 	 dGdd de-deee-ef      dee	e-      dee-   dee-   dee-   de
d   de
d   de!fd!       Z/e+	 	 	 	 	 	 	 	 	 	 dHde-deee-ef      dee	e-      dee-   dee-   dee-   de
d   deee-ef      deee-ef      deee-ef      dee!eeee!f   f   fd"       Z/e+	 	 	 	 	 	 	 	 dId#ee-   d$ee0   d%ee-   de
d   deee-ef      deee-ef      deee-ef      de fd&       Z1e	 	 	 	 	 	 	 	 dJd#ee-   d$ee0   d%ee-   dee-   dee-   dee-   de
d   d'e
d   deeee f   fd(       Z2e	 	 	 	 	 	 	 	 dJdd)d#ee-   d$ee0   d%ee-   dee-   dee-   dee-   de
d   d'e
d   de fd*       Z2e+	 	 	 	 	 	 	 	 	 	 	 dKd#ee-   d$ee0   d%ee-   dee-   dee-   dee-   de
d   deee-ef      deee-ef      deee-ef      dee eeee f   f   fd+       Z2e+	 	 	 	 	 dLd,e-de
d   deee-ef      deee-ef      deee-ef      de!fd-       Z3e	 	 	 	 	 dMd,e-dee-   dee-   dee-   de
d   d.e
d   deeee!f   fd/       Z4e	 	 	 	 	 dMdd0d,e-dee-   dee-   dee-   de
d   d.e
d   de!fd1       Z4e+	 	 	 	 	 	 	 	 dNd,e-dee-   dee-   dee-   de
d   deee-ef      deee-ef      deee-ef      dee!eeee!f   f   fd2       Z4e+	 	 	 	 	 dLd,e-de
d   deee-ef      deee-ef      deee-ef      de"fd3       Z5e	 	 	 	 	 dMd,e-dee-   dee-   dee-   de
d   d4e
d   deeee"f   fd5       Z6e	 	 	 	 	 dMdd6d,e-dee-   dee-   dee-   de
d   d4e
d   de"fd7       Z6e+	 	 	 	 	 	 	 	 dNd,e-dee-   dee-   dee-   de
d   deee-ef      deee-ef      deee-ef      dee"eeee"f   f   fd8       Z6e+	 	 	 	 	 	 	 	 dId,e-d#ee-   d$ee0   d%ee-   de
d   deee-ef      deee-ef      deee-ef      defd9       Z7e	 	 	 	 	 	 	 	 dJd,e-d#ee-   d$ee0   d%ee-   dee-   dee-   dee-   de
d   d:e
d   deeeef   fd;       Z8e	 	 	 	 	 	 	 	 dJdd<d,e-d#ee-   d$ee0   d%ee-   dee-   dee-   dee-   de
d   d:e
d   defd=       Z8e+	 	 	 	 	 	 	 	 	 	 	 dKd,e-d#ee-   d$ee0   d%ee-   dee-   dee-   dee-   de
d   deee-ef      deee-ef      deee-ef      deeeeeef   f   fd>       Z8e+	 	 	 	 	 dLd,e-d?e$de
d   deee-ef      deee-ef      deee-ef      defd@       Z9e	 	 	 	 	 dMd,e-d?e$dee-   dee-   dee-   de
d   dAe
d   deeeef   fdB       Z:e	 	 	 	 	 dMddCd,e-d?e$dee-   dee-   dee-   de
d   dAe
d   defdD       Z:e+	 	 	 	 	 	 	 	 dNd,e-d?e$dee-   dee-   dee-   de
d   deee-ef      deee-ef      deee-ef      deeeeeef   f   fdE       Z:y)O    N)partial)Any	CoroutineDictListLiteralOptionalUnionoverload)request_timeout)ContainerRequestUtils)Logging)BaseContainerConfig)base_llm_http_handler)$ContainerCreateOptionalRequestParamsContainerFileListResponseContainerFileObject"ContainerListOptionalRequestParamsContainerListResponseContainerObjectDeleteContainerResult)	FileTypes)GenericLiteLLMParams)	CallTypes)ProviderConfigManagerclient)acreate_containeradelete_containeralist_container_filesalist_containersaretrieve_containeraupload_container_filecreate_containerdelete_containerlist_container_fileslist_containersretrieve_containerupload_container_fileopenainameexpires_afterfile_idscustom_llm_providerextra_headersextra_query
extra_bodyreturnc                   K   t               }		 t        j                         }
d|d<   t        t        f| |||||||d|}t        j                         }t        |j                  |      }|
j                  d|       d{   }t        j                  |      r| d{   }|S |}|S 7 )7 # t        $ r}t        j                  d|||	|      d}~ww xY ww)a4  Asynchronously calls the `create_container` function with the given arguments and keyword arguments.

    Parameters:
    - `name` (str): Name of the container to create
    - `expires_after` (Optional[Dict[str, Any]]): Container expiration time settings
    - `file_ids` (Optional[List[str]]): IDs of files to copy to the container
    - `timeout` (int): Request timeout in seconds
    - `custom_llm_provider` (Optional[Literal["openai"]]): The LLM provider to use
    - `extra_headers` (Optional[Dict[str, Any]]): Additional headers
    - `extra_query` (Optional[Dict[str, Any]]): Additional query parameters
    - `extra_body` (Optional[Dict[str, Any]]): Additional body parameters
    - `kwargs` (dict): Additional keyword arguments

    Returns:
    - `response` (ContainerObject): The created container object
    T
async_call)r*   r+   r,   timeoutr-   r.   r/   r0   N modelr-   original_exceptioncompletion_kwargsextra_kwargs)localsasyncioget_event_loopr   r#   contextvarscopy_contextrunrun_in_executoriscoroutine	Exceptionlitellmexception_type)r*   r+   r,   r4   r-   r.   r/   r0   kwargs
local_varsloopfuncctxfunc_with_contextinit_responseresponsees                    O/root/tools/cai/cai_env/lib/python3.12/site-packages/litellm/containers/main.pyr   r   ,   s     > J"
%%'#|
' 3'#!
 
 &&(#CGGT2"2249JKK}-**H  %H L +
  
$$ 3 (
 	

Y   CA1B- ?B) B- B+B- $C%B- (C)B- +B- -	C6CCCapi_keyapi_baseapi_versionr   Tc                     y N 
r*   r+   r,   r4   rQ   rR   rS   r-   r   rF   s
             rO   r#   r#   t            F)r   c                     y rU   rV   rW   s
             rO   r#   r#      rX   rY   c           
      <   t               }	 |j                  d      }|j                  d      }|j                  dd      du }|j                  d      }|2t        |t              rt        j                  |      }t        di |}|S t        d|||d|}t        j                  t        j                  |      	      }|t        d
|       |j                  |       t        j                   |      }t        j"                  ||      }|j%                  |dt'        |      d|i||       t(        j*                  j,                  |_        t1        j2                  | ||||||xs t4        |      S # t6        $ r}t        j8                  d||||      d}~ww xY w)a  Create a container using the OpenAI Container API.

    Currently supports OpenAI

    Example:
    ```python
    import litellm

    response = litellm.create_container(
        name="My Container",
        custom_llm_provider="openai",
    )
    print(response)
    ```
    litellm_logging_objlitellm_call_idr3   FTmock_responseNrQ   rR   rS   providerz+container operations are not supported for )container_provider_config container_create_optional_paramsr5   rF   r7   optional_paramslitellm_paramsr-   )r*   container_create_request_paramsrb   rf   logging_objr.   r4   	_is_asyncr6   rV   )r;   popget
isinstancestrjsonloadsr   r   r   get_provider_container_configrD   LlmProviders
ValueErrorupdater   -get_requested_container_create_optional_param$get_optional_params_container_createupdate_from_kwargsdictr   r#   value	call_typer   container_create_handlerDEFAULT_REQUEST_TIMEOUTrC   rE   )r*   r+   r,   r4   rQ   rR   rS   r-   r.   r/   r0   rF   rG   r\   r]   ri   r^   rM   rf   rb   rc   rg   rN   s                          rO   r#   r#      s   @ JS
17<Q1R)/4E)FJJ|U3t;	 

?3$-- $

= 9&77HO . 
#
 	
 "??))*=>
 	" %,=>Q=RS  	&! "OO 	) "FF*C1Q 	( 	.. !@A!?1 !4 	/ 		
 )2(B(B(H(H%$==,K&?)+'66	
 		
  
$$ 3 (
 	

s   A:E3 C+E3 3	F<FFafterlimitorderc                   K   t               }		 t        j                         }
d|d<   t        t        f| |||||||d|}t        j                         }t        |j                  |      }|
j                  d|       d{   }t        j                  |      r| d{   }|S |}|S 7 )7 # t        $ r}t        j                  d|||	|      d}~ww xY ww)a  Asynchronously list containers.

    Parameters:
    - `after` (Optional[str]): A cursor for pagination
    - `limit` (Optional[int]): Number of items to return (1-100, default 20)
    - `order` (Optional[str]): Sort order ('asc' or 'desc', default 'desc')
    - `timeout` (int): Request timeout in seconds
    - `custom_llm_provider` (Literal["openai"]): The LLM provider to use
    - `extra_headers` (Optional[Dict[str, Any]]): Additional headers
    - `extra_query` (Optional[Dict[str, Any]]): Additional query parameters
    - `extra_body` (Optional[Dict[str, Any]]): Additional body parameters
    - `kwargs` (dict): Additional keyword arguments

    Returns:
    - `response` (ContainerListResponse): The list of containers
    Tr3   )r|   r}   r~   r4   r-   r.   r/   r0   Nr5   r6   )r;   r<   r=   r   r&   r>   r?   r@   rA   rB   rC   rD   rE   )r|   r}   r~   r4   r-   r.   r/   r0   rF   rG   rH   rI   rJ   rK   rL   rM   rN   s                    rO   r    r      s     < J"
%%'#|
 3'#!
 
 &&(#CGGT2"2249JKK}-**H  %H L +
  
$$ 3 (
 	

rP   r    c                     y rU   rV   
r|   r}   r~   r4   rQ   rR   rS   r-   r    rF   s
             rO   r&   r&   V  rX   rY   )r    c                     y rU   rV   r   s
             rO   r&   r&   g  rX   rY   c                    t               }	 |j                  d      }|j                  d      }|j                  dd      du }|j                  d      }|2t        |t              rt        j                  |      }t        di |}|S t        d|||d|}t        j                  t        j                  |      	      }|t        d
|       t        j                  |      }|j!                  |dt#        |      d|i||       t$        j&                  j(                  |_        t-        j.                  |||| ||||	|xs t0        |
      S # t2        $ r}t        j4                  d||||      d}~ww xY w)zSList containers using the OpenAI Container API.

    Currently supports OpenAI
    r\   r]   r3   FTr^   Nr_   r`   2Container provider config not found for provider: r5   rd   )
rb   rf   rh   r|   r}   r~   r.   r/   r4   ri   r6   rV   )r;   rj   rk   rl   rm   rn   ro   r   r   r   rp   rD   rq   rr   r   +get_requested_container_list_optional_paramrv   rw   r   r&   rx   ry   r   container_list_handlerr{   rC   rE   )r|   r}   r~   r4   rQ   rR   rS   r-   r.   r/   r0   rF   rG   r\   r]   ri   r^   rM   rf   rb   container_list_optional_paramsrN   s                         rO   r&   r&   z  s   * JL
17<Q1R)/4E)FJJ|U3t;	 

?3$-- $

= 9,=}=HO . 
#
 	
 "??))*=>
 	" %,DEXDYZ  "MM 	' 	.. !?@!?0 !4 	/ 		
 )2(A(A(G(G%$;;&?)+'#66
 	
  
$$ 3 (
 	

s   A:E CE 	E5E00E5container_idc           
        K   t               }	 t        j                         }d|d<   t        t        f| |||||d|}	t        j                         }
t        |
j                  |	      }|j                  d|       d{   }t        j                  |      r| d{   }|S |}|S 7 )7 # t        $ r}t        j                  d||||      d}~ww xY ww)aK  Asynchronously retrieve a container.

    Parameters:
    - `container_id` (str): The ID of the container to retrieve
    - `timeout` (int): Request timeout in seconds
    - `custom_llm_provider` (Literal["openai"]): The LLM provider to use
    - `extra_headers` (Optional[Dict[str, Any]]): Additional headers
    - `extra_query` (Optional[Dict[str, Any]]): Additional query parameters
    - `extra_body` (Optional[Dict[str, Any]]): Additional body parameters
    - `kwargs` (dict): Additional keyword arguments

    Returns:
    - `response` (ContainerObject): The container object
    Tr3   r   r4   r-   r.   r/   r0   Nr5   r6   )r;   r<   r=   r   r'   r>   r?   r@   rA   rB   rC   rD   rE   r   r4   r-   r.   r/   r0   rF   rG   rH   rI   rJ   rK   rL   rM   rN   s                  rO   r!   r!     s     4 J 
%%'#|	
% 3'#!	
 	
 &&(#CGGT2"2249JKK}-**H  %H L +
  
$$ 3 (
 	

Y   CA/B+ =B'>B+ B)B+ "C#B+ &C'B+ )B+ +	C4CCCr!   c                     y rU   rV   r   r4   rQ   rR   rS   r-   r!   rF   s           rO   r'   r'           rY   )r!   c                     y rU   rV   r   s           rO   r'   r'   /  r   rY   c	           
         t               }
	 |	j                  d      }|	j                  d      }|	j                  dd      du }|	j                  d      }|2t        |t              rt        j                  |      }t        di |}|S t        d|||d|	}t        j                  t        j                  |      	      }|t        d
|       |j                  |	di d|i|       t        j                   j"                  |_        t'        j(                  | ||||||xs t*        |      S # t,        $ r}t        j.                  d|||
|	      d}~ww xY w)zXRetrieve a container using the OpenAI Container API.

    Currently supports OpenAI
    r\   r]   r3   FTr^   Nr_   r`   r   r5   rd   r   rb   rf   rh   r.   r/   r4   ri   r6   rV   )r;   rj   rk   rl   rm   rn   ro   r   r   r   rp   rD   rq   rr   rv   r   r'   rx   ry   r   container_retrieve_handlerr{   rC   rE   r   r4   rQ   rR   rS   r-   r.   r/   r0   rF   rG   r\   r]   ri   r^   rM   rf   rb   rN   s                      rO   r'   r'   @  s   & JB
17<Q1R)/4E)FJJ|U3t;	 

?3$-- $

= 9&77HO . 
#
 	
 "??))*=>
 	" %,DEXDYZ 
 	..!? !4 	/ 	
 )2(D(D(J(J%$??%&?)+'#66	
 		
  
$$ 3 (
 	

   A:D+ B#D+ +	E4EEc           
        K   t               }	 t        j                         }d|d<   t        t        f| |||||d|}	t        j                         }
t        |
j                  |	      }|j                  d|       d{   }t        j                  |      r| d{   }|S |}|S 7 )7 # t        $ r}t        j                  d||||      d}~ww xY ww)aL  Asynchronously delete a container.

    Parameters:
    - `container_id` (str): The ID of the container to delete
    - `timeout` (int): Request timeout in seconds
    - `custom_llm_provider` (Literal["openai"]): The LLM provider to use
    - `extra_headers` (Optional[Dict[str, Any]]): Additional headers
    - `extra_query` (Optional[Dict[str, Any]]): Additional query parameters
    - `extra_body` (Optional[Dict[str, Any]]): Additional body parameters
    - `kwargs` (dict): Additional keyword arguments

    Returns:
    - `response` (DeleteContainerResult): The deletion result
    Tr3   r   Nr5   r6   )r;   r<   r=   r   r$   r>   r?   r@   rA   rB   rC   rD   rE   r   s                  rO   r   r     s     4 J 
%%'#|	
% 3'#!	
 	
 &&(#CGGT2"2249JKK}-**H  %H L +
  
$$ 3 (
 	

r   r   c                     y rU   rV   r   r4   rQ   rR   rS   r-   r   rF   s           rO   r$   r$     r   rY   )r   c                     y rU   rV   r   s           rO   r$   r$     r   rY   c	           
         t               }
	 |	j                  d      }|	j                  d      }|	j                  dd      du }|	j                  d      }|2t        |t              rt        j                  |      }t        di |}|S t        d|||d|	}t        j                  t        j                  |      	      }|t        d
|       |j                  |	di d|i|       t        j                   j"                  |_        t'        j(                  | ||||||xs t*        |      S # t,        $ r}t        j.                  d|||
|	      d}~ww xY w)zVDelete a container using the OpenAI Container API.

    Currently supports OpenAI
    r\   r]   r3   FTr^   Nr_   r`   r   r5   rd   r   r6   rV   )r;   rj   rk   rl   rm   rn   ro   r   r   r   rp   rD   rq   rr   rv   r   r$   rx   ry   r   container_delete_handlerr{   rC   rE   r   s                      rO   r$   r$     s   & JB
17<Q1R)/4E)FJJ|U3t;	 

?3$-- $

= 9,=}=HO . 
#
 	
 "??))*=>
 	" %,DEXDYZ 
 	..!? !4 	/ 	
 )2(B(B(H(H%$==%&?)+'#66	
 		
  
$$ 3 (
 	

r   c	                   K   t               }
	 t        j                         }d|	d<   t        t        f| ||||||||d	|	}t        j                         }t        |j                  |      }|j                  d|       d{   }t        j                  |      r| d{   }|S |}|S 7 )7 # t        $ r}t        j                  d|||
|	      d}~ww xY ww)a%  Asynchronously list files in a container.

    Parameters:
    - `container_id` (str): The ID of the container
    - `after` (Optional[str]): A cursor for pagination
    - `limit` (Optional[int]): Number of items to return (1-100, default 20)
    - `order` (Optional[str]): Sort order ('asc' or 'desc', default 'desc')
    - `timeout` (int): Request timeout in seconds
    - `custom_llm_provider` (Literal["openai"]): The LLM provider to use
    - `extra_headers` (Optional[Dict[str, Any]]): Additional headers
    - `extra_query` (Optional[Dict[str, Any]]): Additional query parameters
    - `extra_body` (Optional[Dict[str, Any]]): Additional body parameters
    - `kwargs` (dict): Additional keyword arguments

    Returns:
    - `response` (ContainerFileListResponse): The list of container files
    Tr3   )	r   r|   r}   r~   r4   r-   r.   r/   r0   Nr5   r6   )r;   r<   r=   r   r%   r>   r?   r@   rA   rB   rC   rD   rE   )r   r|   r}   r~   r4   r-   r.   r/   r0   rF   rG   rH   rI   rJ   rK   rL   rM   rN   s                     rO   r   r   T  s    < J#
%%'#| 
% 3'#!
 
 &&(#CGGT2"2249JKK}-**H  %H L +
  
$$ 3 (
 	

sY   CA2B.  B*B. B, B. %C&B. )C*B. ,B. .	C7CCCr   c	                     y rU   rV   r   r|   r}   r~   r4   rQ   rR   rS   r-   r   rF   s              rO   r%   r%          rY   )r   c	                     y rU   rV   r   s              rO   r%   r%     r   rY   c                    t               }	 |j                  d      }|j                  d      }|j                  dd      du }|j                  d      }|2t        |t              rt        j                  |      }t        di |}|S t        d|||d|}t        j                  t        j                  |      	      }|t        d
|       |j                  |d| |||dd|i|       t        j                   j"                  |_        t'        j(                  | |||||||	|
|xs t*        |      S # t,        $ r}t        j.                  d||||      d}~ww xY w)z]List files in a container using the OpenAI Container API.

    Currently supports OpenAI
    r\   r]   r3   FTr^   Nr_   r`   r   r5   )r   r|   r}   r~   rd   )r   rb   rf   rh   r|   r}   r~   r.   r/   r4   ri   r6   rV   )r;   rj   rk   rl   rm   rn   ro   r   r   r   rp   rD   rq   rr   rv   r   r%   rx   ry   r   container_file_list_handlerr{   rC   rE   )r   r|   r}   r~   r4   rQ   rR   rS   r-   r.   r/   r0   rF   rG   r\   r]   ri   r^   rM   rf   rb   rN   s                         rO   r%   r%     s   ( JJ
17<Q1R)/4E)FJJ|U3t;	 

?3$-- $

= 90A=AHO . 
#
 	
 "??))*=>
 	" %,DEXDYZ 
 	.. ,	 "? !4 	/ 	
  )2(F(F(L(L%$@@%&?)+'#66
 	
  
$$ 3 (
 	

s   A:D3 B+D3 3	E<EEfilec                   K   t               }	 t        j                         }	d|d<   t        t        f| ||||||d|}
t        j                         }t        |j                  |
      }|	j                  d|       d{   }t        j                  |      r| d{   }|S |}|S 7 )7 # t        $ r}t        j                  d||||      d}~ww xY ww)a$  Asynchronously upload a file to a container.

    This endpoint allows uploading files directly to a container session,
    supporting various file types like CSV, Excel, Python scripts, etc.

    Parameters:
    - `container_id` (str): The ID of the container to upload the file to
    - `file` (FileTypes): The file to upload. Can be:
        - A tuple of (filename, content, content_type)
        - A tuple of (filename, content)
        - A file-like object with read() method
        - Bytes
        - A string path to a file
    - `timeout` (int): Request timeout in seconds
    - `custom_llm_provider` (Literal["openai"]): The LLM provider to use
    - `extra_headers` (Optional[Dict[str, Any]]): Additional headers
    - `extra_query` (Optional[Dict[str, Any]]): Additional query parameters
    - `extra_body` (Optional[Dict[str, Any]]): Additional body parameters
    - `kwargs` (dict): Additional keyword arguments

    Returns:
    - `response` (ContainerFileObject): The uploaded file object

    Example:
    ```python
    import litellm

    # Upload a CSV file
    response = await litellm.aupload_container_file(
        container_id="container_abc123",
        file=("data.csv", open("data.csv", "rb").read(), "text/csv"),
        custom_llm_provider="openai",
    )
    print(response)
    ```
    Tr3   )r   r   r4   r-   r.   r/   r0   Nr5   r6   )r;   r<   r=   r   r(   r>   r?   r@   rA   rB   rC   rD   rE   )r   r   r4   r-   r.   r/   r0   rF   rG   rH   rI   rJ   rK   rL   rM   rN   s                   rO   r"   r"   $  s     ^ J!
%%'#|!

% 3'#!

 

 &&(#CGGT2"2249JKK}-**H  %H L +
  
$$ 3 (
 	

sY   CA0B, >B(?B, B*B, #C$B, 'C(B, *B, ,	C5CCCr"   c                     y rU   rV   	r   r   r4   rQ   rR   rS   r-   r"   rF   s	            rO   r(   r(   z       rY   )r"   c                     y rU   rV   r   s	            rO   r(   r(     r   rY   c
                    ddl m} t               }	 |
j                  d      }|
j	                  d      }|
j                  dd      du }|
j	                  d      }|2t        |t              rt        j                  |      }t        di |}|S t        d|||d
|
}t        j                  t        j                  |            }|t        d|       |j!                  |
dd| id|i|       t"        j$                  j&                  |_        |j+                  d||||||xs t,        || |
      S # t.        $ r}t        j0                  d||||
      d	}~ww xY w)a  Upload a file to a container using the OpenAI Container API.

    This endpoint allows uploading files directly to a container session,
    supporting various file types like CSV, Excel, Python scripts, JSON, etc.
    This is useful when /chat/completions or /responses sends files to the
    container but the input file type is limited to PDF. This endpoint lets
    you work with other file types.

    Currently supports OpenAI

    Example:
    ```python
    import litellm

    # Upload a CSV file
    response = litellm.upload_container_file(
        container_id="container_abc123",
        file=("data.csv", open("data.csv", "rb").read(), "text/csv"),
        custom_llm_provider="openai",
    )
    print(response)

    # Upload a Python script
    response = litellm.upload_container_file(
        container_id="container_abc123",
        file=("script.py", b"print('hello world')", "text/x-python"),
        custom_llm_provider="openai",
    )
    print(response)
    ```
    r   )generic_container_handlerr\   r]   r3   FTr^   Nr_   r`   r   r5   r   rd   r(   )
endpoint_namerb   rf   rh   r.   r/   r4   ri   r   r   r6   rV   )+litellm.llms.custom_httpx.container_handlerr   r;   rj   rk   rl   rm   rn   ro   r   r   r   rp   rD   rq   rr   rv   r   r(   rx   ry   handler{   rC   rE   )r   r   r4   rQ   rR   rS   r-   r.   r/   r0   rF   r   rG   r\   r]   ri   r^   rM   rf   rb   rN   s                        rO   r(   r(     s   Z VJD
17<Q1R)/4E)FJJ|U3t;	 

?3$-- $

= 9*;];HO . 
#
 	
 "??))*=>
 	" %,DEXDYZ 
 	..+\:!? !4 	/ 	
 )2(G(G(M(M%(//1&?)+'#66% 0 
 	
  
$$ 3 (
 	

s   A:D1 B#D1 1	E:EE)NNX  r)   NNN)NNr   NNNr)   )
NNr   NNNr)   NNN)NNNr   r)   NNN)NNNr   NNNr)   )NNNr   NNNr)   NNN)r   r)   NNN)r   NNNr)   )r   NNNr)   NNN);r<   r>   rn   	functoolsr   typingr   r   r   r   r   r	   r
   r   rD   litellm.constantsr   r{   litellm.containers.utilsr   *litellm.litellm_core_utils.litellm_loggingr   LiteLLMLoggingObj/litellm.llms.base_llm.containers.transformationr   litellm.mainr   litellm.types.containers.mainr   r   r   r   r   r   r   litellm.types.llms.openair   litellm.types.routerr   litellm.types.utilsr   litellm.utilsr   r   __all__rm   r   r#   intr    r&   r!   r'   r   r$   r   r%   r"   r(   rV   rY   rO   <module>r      s       Q Q Q  H : S O .   0 5 ) 7"  /3$(-5 /3,0+/A

A
DcN+A
 tCy!A
 !*A
 DcN+A
 $sCx.)A
 c3h(A
 A
 A
N 
 /3$(!"!%-5
DcN+ tCy!
 c] sm # !* t} sC() 
  
 /3$(!"!%-5 ).
DcN+ tCy!
 c] sm # !* u~  
$  /3$(!"!%-5 /3,0+/s

s
DcN+s
 tCy!s

 c]s
 sms
 #s
 !*s
 DcN+s
 $sCx.)s
 c3h(s
 ?Ic3&?@ABs
 s
n -5 /3,0+/@
C=@
C=@
 C=@

 !*@
 DcN+@
 $sCx.)@
 c3h(@
 @
 @
J 
!"!%-5C=C= C=
 c] sm # !* dm sC../ 
  
!"!%-5 (-C=C= C=
 c] sm # !* en  
$ !"!%-5 /3,0+/a
C=a
C=a
 C=a

 c]a
 sma
 #a
 !*a
 DcN+a
 $sCx.)a
 c3h(a
  )C6K,K"LMNa
 a
J  -5 /3,0+/:
:
 !*:
 DcN+:
 $sCx.):
 c3h(:
 :
 :
~ 
 !"!%-5 c] sm	
 # !* ! sC() 
 
 !"!%-5 +0 c] sm	
 # !* !  
   !"!%-5 /3,0+/U
U
 c]U
 sm	U

 #U
 !*U
 DcN+U
 $sCx.)U
 c3h(U
 ?Ic3&?@ABU
 U
r  -5 /3,0+/:
:
 !*:
 DcN+:
 $sCx.):
 c3h(:
 :
 :
~ 
 !"!%-5 c] sm	
 # !* t} sC../ 
 
 !"!%-5 ). c] sm	
 # !* u~  
   !"!%-5 /3,0+/U
U
 c]U
 sm	U

 #U
 !*U
 DcN+U
 $sCx.)U
 c3h(U
  )C6K,K"LMNU
 U
r   -5.2,0+/A
A
C=A
 C=A
 C=	A
 !*A
 DcN+A
 $sCx.)A
 c3h(A
 A
 A
L 
  !"!%-5C= C= C=	 c] sm # !* #4= sC223 
" 
  !"!%-5 -2C= C= C=	 c] sm # !* #5>  
&   !"!%-5.2,0+/^
^
C=^
 C=^
 C=	^
 c]^
 sm^
 #^
 !*^
 DcN+^
 $sCx.)^
 c3h(^
 $iS:S0S&TUV^
 ^
D  -5.2,0+/P
P

P
 !*	P

 DcN+P
 $sCx.)P
 c3h(P
 P
 P
j 
 !"!%-5
 c]	
 sm # !* $DM sC,,- 
 
 !"!%-5 .3
 c]	
 sm # !* $EN  
"  !"!%-5.2,0+/s
s

s
 c]	s

 sms
 #s
 !*s
 DcN+s
 $sCx.)s
 c3h(s
 	#s4G*G HIJs
 s
rY   