
    Mij                     	   S SK r S SKrS SKrS SKJr  S SKJrJrJrJ	r	J
r
JrJrJr  S SKrS SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S S	KJrJrJrJrJ r   S S
K!J"r"  S SK#J$r$  S SK%J&r&J'r'  / SQr(\'       S8S\)S\\\)\4      S\\	\)      S\
S   S\\\)\4      S\\\)\4      S\\\)\4      S\4S jj5       r*\       S9S\)S\\\)\4      S\\	\)      S\\)   S\\)   S\\)   S\
S   S\
S   S\\\\4   4S jj5       r+\       S9SS.S\)S\\\)\4      S\\	\)      S\\)   S\\)   S\\)   S\
S   S\
S   S\4S  jjj5       r+\'       S8S\)S\\\)\4      S\\	\)      S\
S   S\\\)\4      S\\\)\4      S\\\)\4      S\\\\\\4   4   4S! jj5       r+\'        S:S"\\)   S#\\,   S$\\)   S\
S   S\\\)\4      S\\\)\4      S\\\)\4      S\4S% jj5       r-\        S;S"\\)   S#\\,   S$\\)   S\\)   S\\)   S\\)   S\
S   S&\
S   S\\\\4   4S' jj5       r.\        S;SS(.S"\\)   S#\\,   S$\\)   S\\)   S\\)   S\\)   S\
S   S&\
S   S\4S) jjj5       r.\'        S:S"\\)   S#\\,   S$\\)   S\
S   S\\\)\4      S\\\)\4      S\\\)\4      S\\\\\\4   4   4S* jj5       r.\'     S<S+\)S\
S   S\\\)\4      S\\\)\4      S\\\)\4      S\4S, jj5       r/\     S=S+\)S\\)   S\\)   S\\)   S\
S   S-\
S   S\\\\4   4S. jj5       r0\     S=SS/.S+\)S\\)   S\\)   S\\)   S\
S   S-\
S   S\4S0 jjj5       r0\'     S<S+\)S\
S   S\\\)\4      S\\\)\4      S\\\)\4      S\\\\\\4   4   4S1 jj5       r0\'     S<S+\)S\
S   S\\\)\4      S\\\)\4      S\\\)\4      S\ 4S2 jj5       r1\     S=S+\)S\\)   S\\)   S\\)   S\
S   S3\
S   S\\\\ 4   4S4 jj5       r2\     S=SS5.S+\)S\\)   S\\)   S\\)   S\
S   S3\
S   S\ 4S6 jjj5       r2\'     S<S+\)S\
S   S\\\)\4      S\\\)\4      S\\\)\4      S\\ \\\\ 4   4   4S7 jj5       r2g)>    N)partial)Any	CoroutineDictListLiteralOptionalUnionoverload)request_timeout)ContainerRequestUtils)Logging)BaseContainerConfig)base_llm_http_handler)$ContainerCreateOptionalRequestParams"ContainerListOptionalRequestParamsContainerListResponseContainerObjectDeleteContainerResult)GenericLiteLLMParams)	CallTypes)ProviderConfigManagerclient)acreate_containeradelete_containeralist_containersaretrieve_containercreate_containerdelete_containerlist_containersretrieve_containeropenainameexpires_afterfile_idscustom_llm_providerextra_headersextra_query
extra_bodyreturnc                   #    [        5       n	 [        R                  " 5       n
SUS'   [        [        4U UUUUUUUS.UD6n[
        R                  " 5       n[        UR                  U5      nU
R                  SU5      I Sh  vN n[        R                  " U5      (       a  UI Sh  vN nU$ UnU$  N/ N! [         a  n[        R                  " SUUU	US9eSnAff = f7f)a   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(   r)   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%   r-   r&   r'   r(   r)   kwargs
local_varsloopfuncctxfunc_with_contextinit_responseresponsees                    q/var/www/eduai.edurigo.com/storigo/production/storigo_env/lib/python3.13/site-packages/litellm/containers/main.pyr   r   $   s     > J"
%%'#|
' 3'#!
 
 &&(#CGGT2"2249JKK}--**H  %H L +
  
$$ 3 (
 	

Y   CA3B5 B1$B5 &B3'B5 ,C-B5 0C1B5 3B5 5
C?CCCapi_keyapi_baseapi_versionr   Tc                    g N 
r#   r$   r%   r-   rJ   rK   rL   r&   r   r?   s
             rH   r   r   l            F)r   c                    g rN   rO   rP   s
             rH   r   r   }   rQ   rR   c                 <   [        5       n	 UR                  S5      n
UR                  S5      nUR                  SS5      SL nUR                  S5      nUb8  [        U[        5      (       a  [
        R                  " U5      n[        S0 UD6nU$ [        S0 UD6n[        R                  " [        R                  " U5      S9nUc  [        S	U 35      eU	R                  U5        [        R                   " U	5      n[        R"                  " UUS
9nU
R%                  S['        U5      SU0UEUS9  [(        R*                  R,                  U
l        [0        R2                  " U UUUU
UU=(       d    [4        US9$ ! [6         a  n[        R8                  " SUUU	US9eSnAff = f)zCreate 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_idr,   FTmock_responseNproviderz+container operations are not supported for )container_provider_config container_create_optional_paramsr.   r0   optional_paramslitellm_paramsr&   )r#   container_create_request_paramsrZ   r^   logging_objr'   r-   	_is_asyncr/   rO   )r4   popget
isinstancestrjsonloadsr   r   r   get_provider_container_configr=   LlmProviders
ValueErrorupdater   -get_requested_container_create_optional_param$get_optional_params_container_createupdate_environment_variablesdictr   r   value	call_typer   container_create_handlerDEFAULT_REQUEST_TIMEOUTr<   r>   )r#   r$   r%   r-   r&   r'   r(   r)   r?   r@   rU   rV   ra   rW   rF   r^   rZ   r[   r_   rG   s                       rH   r   r      s   @ JH
17<Q1R)/4E)FJJ|U3t;	 

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

= 9&77HO .77 "?? --.AB 	" %,JK^J_`aa&! "OOPZ[ 	) "FF*C1Q 	( 	88 !@A!?1 !4 	9 	
 )2(B(B(H(H%$==,K&?)+'66	
 		
  
$$ 3 (
 	

s   BE4 C%E4 4
F>FFafterlimitorderc                   #    [        5       n	 [        R                  " 5       n
SUS'   [        [        4U UUUUUUUS.UD6n[
        R                  " 5       n[        UR                  U5      nU
R                  SU5      I Sh  vN n[        R                  " U5      (       a  UI Sh  vN nU$ UnU$  N/ N! [         a  n[        R                  " SUUU	US9eSnAff = f7f)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
Tr,   )rt   ru   rv   r-   r&   r'   r(   r)   Nr.   r/   )r4   r5   r6   r   r    r7   r8   r9   r:   r;   r<   r=   r>   )rt   ru   rv   r-   r&   r'   r(   r)   r?   r@   rA   rB   rC   rD   rE   rF   rG   s                    rH   r   r      s     < J"
%%'#|
 3'#!
 
 &&(#CGGT2"2249JKK}--**H  %H L +
  
$$ 3 (
 	

rI   r   c                    g rN   rO   
rt   ru   rv   r-   rJ   rK   rL   r&   r   r?   s
             rH   r    r    C  rQ   rR   )r   c                    g rN   rO   ry   s
             rH   r    r    T  rQ   rR   c                    [        5       n	 UR                  S5      n
UR                  S5      nUR                  SS5      SL nUR                  S5      nUb8  [        U[        5      (       a  [
        R                  " U5      n[        S0 UD6nU$ [        S0 UD6n[        R                  " [        R                  " U5      S9nUc  [        S	U 35      e[        R                  " U	5      nU
R!                  S
[#        U5      SU0UEUS9  [$        R&                  R(                  U
l        [,        R.                  " UUU
U UUUUU=(       d    [0        US9
$ ! [2         a  n[        R4                  " S
UUU	US9eSnAff = f)zKList containers using the OpenAI Container API.

Currently supports OpenAI
rU   rV   r,   FTrW   NrX   2Container provider config not found for provider: r.   r\   )
rZ   r^   r`   rt   ru   rv   r'   r(   r-   ra   r/   rO   )r4   rb   rc   rd   re   rf   rg   r   r   r   rh   r=   ri   rj   r   +get_requested_container_list_optional_paramrn   ro   r   r    rp   rq   r   container_list_handlerrs   r<   r>   )rt   ru   rv   r-   r&   r'   r(   r)   r?   r@   rU   rV   ra   rW   rF   r^   rZ   container_list_optional_paramsrG   s                      rH   r    r    g  s   * JA
17<Q1R)/4E)FJJ|U3t;	 

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

= 9,=}=HO .77 "?? --.AB 	" %,QReQfghh "MMjY 	'
 	88 !?@!?0 !4 	9 	
 )2(A(A(G(G%$;;&?)+'#66
 	
  
$$ 3 (
 	

s   BE CE 
E7E22E7container_idc           
        #    [        5       n [        R                  " 5       nSUS'   [        [        4U UUUUUS.UD6n	[
        R                  " 5       n
[        U
R                  U	5      nUR                  SU5      I Sh  vN n[        R                  " U5      (       a  UI Sh  vN nU$ UnU$  N/ N! [         a  n[        R                  " SUUUUS9eSnAff = f7f)a  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
Tr,   r   r-   r&   r'   r(   r)   Nr.   r/   )r4   r5   r6   r   r!   r7   r8   r9   r:   r;   r<   r=   r>   r   r-   r&   r'   r(   r)   r?   r@   rA   rB   rC   rD   rE   rF   rG   s                  rH   r   r     s     4 J 
%%'#|	
% 3'#!	
 	
 &&(#CGGT2"2249JKK}--**H  %H L +
  
$$ 3 (
 	

Y   CA1B3 ?B/ $B3 $B1%B3 *C+B3 .C/B3 1B3 3
C=CCCr   c                    g rN   rO   r   r-   rJ   rK   rL   r&   r   r?   s           rH   r!   r!          rR   )r   c                    g rN   rO   r   s           rH   r!   r!     r   rR   c                    [        5       n UR                  S5      nUR                  S5      n	UR                  SS5      SL n
UR                  S5      nUb8  [        U[        5      (       a  [
        R                  " U5      n[        S0 UD6nU$ [        S0 UD6n[        R                  " [        R                  " U5      S9nUc  [        S	U 35      eUR                  S
0 SU	0US9  [        R                   R"                  Ul        [&        R(                  " U UUUUUU=(       d    [*        U
S9$ ! [,         a  n[        R.                  " S
UUUUS9eSnAff = f)zPRetrieve a container using the OpenAI Container API.

Currently supports OpenAI
rU   rV   r,   FTrW   NrX   r|   r.   r\   r   rZ   r^   r`   r'   r(   r-   ra   r/   rO   )r4   rb   rc   rd   re   rf   rg   r   r   r   rh   r=   ri   rj   rn   r   r!   rp   rq   r   container_retrieve_handlerrs   r<   r>   r   r-   r&   r'   r(   r)   r?   r@   rU   rV   ra   rW   rF   r^   rZ   rG   s                   rH   r!   r!   "  s}   & J9
17<Q1R)/4E)FJJ|U3t;	 

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

= 9&77HO .77 "?? --.AB 	" %,QReQfghh 	88!? !4 	9 	
 )2(D(D(J(J%$??%&?)+'#66	
 		
  
$$ 3 (
 	

   BD- BD- -
E7EEc           
        #    [        5       n [        R                  " 5       nSUS'   [        [        4U UUUUUS.UD6n	[
        R                  " 5       n
[        U
R                  U	5      nUR                  SU5      I Sh  vN n[        R                  " U5      (       a  UI Sh  vN nU$ UnU$  N/ N! [         a  n[        R                  " SUUUUS9eSnAff = f7f)a   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
Tr,   r   Nr.   r/   )r4   r5   r6   r   r   r7   r8   r9   r:   r;   r<   r=   r>   r   s                  rH   r   r   s  s     4 J 
%%'#|	
% 3'#!	
 	
 &&(#CGGT2"2249JKK}--**H  %H L +
  
$$ 3 (
 	

r   r   c                    g rN   rO   r   r-   rJ   rK   rL   r&   r   r?   s           rH   r   r     r   rR   )r   c                    g rN   rO   r   s           rH   r   r     r   rR   c                    [        5       n UR                  S5      nUR                  S5      n	UR                  SS5      SL n
UR                  S5      nUb8  [        U[        5      (       a  [
        R                  " U5      n[        S0 UD6nU$ [        S0 UD6n[        R                  " [        R                  " U5      S9nUc  [        S	U 35      eUR                  S
0 SU	0US9  [        R                   R"                  Ul        [&        R(                  " U UUUUUU=(       d    [*        U
S9$ ! [,         a  n[        R.                  " S
UUUUS9eSnAff = f)zNDelete a container using the OpenAI Container API.

Currently supports OpenAI
rU   rV   r,   FTrW   NrX   r|   r.   r\   r   r/   rO   )r4   rb   rc   rd   re   rf   rg   r   r   r   rh   r=   ri   rj   rn   r   r   rp   rq   r   container_delete_handlerrs   r<   r>   r   s                   rH   r   r     s}   & J9
17<Q1R)/4E)FJJ|U3t;	 

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

= 9,=}=HO .77 "?? --.AB 	" %,QReQfghh 	88!? !4 	9 	
 )2(B(B(H(H%$==%&?)+'#66	
 		
  
$$ 3 (
 	

r   )NNX  r"   NNN)NNr   NNNr"   )NNNr   r"   NNN)NNNr   NNNr"   )r   r"   NNN)r   NNNr"   )3r5   r7   rf   	functoolsr   typingr   r   r   r   r   r	   r
   r   r=   litellm.constantsr   rs   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   litellm.types.routerr   litellm.types.utilsr   litellm.utilsr   r   __all__re   r   r   intr   r    r   r!   r   r   rO   rR   rH   <module>r      s
       Q Q Q  H : S O .  6 ) 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+/h

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

 !*h
 DcN+h
 $sCx.)h
 c3h(h
 c3'(*h
 h
X -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+/V
C=V
C=V
 C=V

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