Ë
    uPêjL  ã            	       ót   — U d dl Z d dlmZ dZeed<   	 ddedz  defd„Z	 	 	 ddedz  d	edz  d
edz  defd„Zy)é    N)ÚFinalg     À‚@Ú,DEFAULT_PASS_THROUGH_REQUEST_TIMEOUT_SECONDSÚendpoint_timeoutÚreturnc                 óæ   — | �t        | «      S 	 t        j                  j                  d«      }|�)t	        |di «      j                  d«      }|�t        |«      S t        S # t
        $ r Y t        S w xY w)aJ  
    Resolve the upstream httpx timeout for pass_through_request.

    Precedence: per-endpoint timeout -> general_settings.pass_through_request_timeout -> 600s default.

    Uses sys.modules to read general_settings only when the proxy module is already
    loaded, avoiding a fastapi transitive import in pure SDK contexts.
    zlitellm.proxy.proxy_serverÚgeneral_settingsÚpass_through_request_timeout)ÚfloatÚsysÚmodulesÚgetÚgetattrÚ	Exceptionr   )r   Úproxy_serverÚglobal_timeouts      úf/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/passthrough/timeout_utils.pyÚ$resolve_pass_through_request_timeoutr      s‚   € ð Ð#ÜÐ%Ó&Ð&ðÜ!Ÿk™kŸo™oÐ.JÓKˆØÐ#Ü$+¨LÐ:LÈbÓ$Q×$UÑ$UÐVtÓ$uˆNØÐ)Ü˜^Ó,Ð,ô 8Ð7øô ò Øä7Ð7ðús   �A	A Á	A0Á/A0ÚkwargsÚlitellm_paramsÚrouter_timeoutc                 ó¬   — | xs i } |xs i }| |fD ]+  }dD ]$  }|j                  |«      }|€Œt        |«      c c S  Œ- |�t        |«      S t        «       S )a  
    Resolve upstream httpx timeout for SDK native passthrough (e.g. Bedrock /converse).

    Precedence: kwargs timeout/request_timeout -> litellm_params timeout/request_timeout
    -> router_timeout -> general_settings.pass_through_request_timeout -> 600s default.
    )ÚtimeoutÚrequest_timeout)r   r
   r   )r   r   r   ÚsourceÚkeyÚvals         r   Úresolve_llm_passthrough_timeoutr   !   sr   € ð Š\�r€FØ#Ò) r€Nà˜>Ð*ò "ˆØ1ò 	"ˆCØ—*‘*˜S“/ˆCØ‰Ü˜S“zÔ!ñ	"ð"ð Ð!Ü�^Ó$Ð$ä/Ó1Ð1ó    )N)NNN)	r   Útypingr   r   Ú__annotations__r
   r   Údictr   © r   r   ú<module>r#      st   ðÜ 
Ý à6;Ð ,¨eÓ ;ð &*ñ8Ø˜d‘lð8à
ó8ð6 Ø"&Ø#'ñ2Ø�4‰Kð2à˜4‘Kð2ð ˜D‘Lð2ð ô	2r   