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< dZd=eJdh< dZd=eJdi< dZd=eJdj< dZd=eJdk< dZd=eJdl< dZd=eJdm< dZd=eJdn< g dog dpdqZdreJds< d$Zd7eJdt< d$Zd7eJdu< d@ZdveJdw< dZd=eJdx< dZd=eJdy< dZd=eJdz< d$Zd7eJd{< d$Zd7eJd|< d$Zd7eJd}< d$Zd7eJd~< d$Zd7eJd< dZd eJd< deJd< d$Zd7eJd< d$Zd%eJd< dZdeJd< dZdZdZdeJd< g ZdeJd< dZd=eJd< dZd=eJd< dZd=eJd< dZdeJd< dZd=eJd< dZdeJd< dZdeJd< dZdeJd< i ZdeJd< d$Zd7eJd< d$Zd7eJd< d dlmZ i ZdeJd< d$Zd7eJd< d$Zd7eJd< d$Zd7eJd< d$Zd7eJd< d@Zd7eJd< dZd%eJd< d$Zd7eJd< d$Zd7eJd< d$Zd7eJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< i ZdeJd< dZdeJd< dZdeJd< dZd=eJd< eCZdeJd< d$Zd7eJd< dZi ZdeJd< d$Zd7eJd< dZdeJd< dZdeJd< dZdeJd< eddáZdeJd< eddǡZdeJd< eddʡZdeJd< d$ZdZd=eJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZdeJd< dZd=eJd< dZdeJd< dZdeJd< dZd=eJd< dZd%eJd< dZd%eJd< dZd%eJd< g ZdeJd< g ZdeJd< dZdeJd< d$Zd7eJd< d$Zd7eJd< d$Zd7eJd< dZd eJd< dZd eJd< dZd eJd< i ZdeJd< dZdeJd< erdZdeJd< d@Z d7eJd< d$Zd7eJd< d$Zd7eJd< d$Zd7eJd< d$Zd7eJd< d$Zd7eJd < d$Zd7eJd< dZd"eJd< dZd"eJd< dZ	deJd< dZ
deJd< dZdeJd< dZdeJd< dZdeJd	< d@Zd7eJd
< dZd"eJd< dZdeJd< dZd=eJd< dZdeJd< d$Zd7eJ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e' Zud"eJdp< e' Zvd"eJdq< e' Zwd"eJdr< e' Zxd"eJds< e' Zyd"eJdt< e' Zzd"eJdu< e' Z{d"eJdv< e' Z|d"eJdw< e' Z}d"eJdx< e' Z~d"eJdy< e' Zd"eJdz< e'e8Zd"eJd{< e' Zd"eJd|< e' Zd"eJd}< e' Zd"eJd~< e' Zd"eJd< e' Zd"eJd< e' Zd"eJd< e' Zd"eJd< e' Zd"eJd< e' Zd"eJd< e' Zd"eJd< e' Zd"eJd< e' Zd"eJd< e' Zd"eJd< duddZduddZdvdwddZe  dddddddZddiZdgZdgZdgZeQe(e)B e*B e+B e.B e'e2B e/B e0B e'e4B e3B e7B eCB eDB e'e6B e'e7B eFB eEB e'eB eGB eLB eMB e'eB eSB e1B eNB eOB e-B ePB eQB eIB eRB eTB eVB eWB eYB eZB e[B e\B e^B e_B e`B eaB ecB edB eeB efB egB ebB eiB ejB eUB ekB elB emB e]B enB erB esB etB euB evB ewB exB eyB e{B e|B e}B eXB e~B eB eB eB eB eB eB e'e3B Ze'eZi de(e)B de)de*e+B de+de.de2de4de6de7de/de~de0de3e7B e:B e2B e1B e<B e@B eAB eBB deCdeGeHB dedei dedeLdeMdedeNdeOdeJeKB deFde-dePdeQdeIdeRdeSde,deTdeVi deWdeYdeZde[dÐeEdĐe\dŐe^dƐe_dǐe`ebB dȐeadɐebdʐecdːedd̐eed͐efdΐegehB dϐeii dАeoepB dѐeqdҐejdӐeUdԐekdՐeld֐emdאendؐe]dِerdڐesdېeXdܐetdݐeudސevdߐewdexi deydezde{de|de}dededeeB dede3dededededededeeedZdreJd< dddddddddddddddZdreJd < e;e'e<B e'e=B e9B eKB epB ehB eB ZddgZdgZd dlmZ e ZdeJd< ddlmZ dd	lmZ dd
lmZ ddlmZmZ ddlmZ ddlmZ ddlmZ ddlmZ e ZddlmZ ddlmZ ddlmZ d dlmZ ddlT ddlmZmZmZmZmZmZmZmÐZ ddlĐmŐZŐmƐZƐmǐZǐmȐZȐmɐZɐmʐZ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d!lƐmǐZ dd"lȐmɐZ dd#lʐmːZ dd$l̐m͐Z dd%lΐmϐZ dd&lАmѐZ dd'lҐmӐZ dd(lԐmՐZ d d)l֐mאZ d d*lؐmِZ d d+lmڐZڐmېZېmܐZܐmݐZ d d,lސmߐZ d d-lmZmZ d.eJd/< d0eJd1< d2eJd3< d2eJd4< d5eJd6< d7eJd8< d7eJd9< d7eJd:< d7eJd;< d7eJd<< d7eJd=< d7eJd>< d7eJd?< d7eJd@< d7eJdA< dBeJdC< dDeJdE< dFeJdG< dHeJdI< dJeJdK< d7eJdL< dHeJdM< dNeJdO< d5eJdP< d0eJdQ< d7eJdR< dSeJdT< dUeJdV< d5eJdW< dXeJdY< dNeJdZ< dHeJd[< d\eJd]< d^eJd_< d`eJda< d dblImZ dceJdd< d delmZ d dflmZmZ d dglmZ d dhlmZ d dilmZ djeJdk< d dlmZ dleJdm< d$aedndo dpv rڐddqlmZ dydsdtZdS (z      )annotationsNignorez%.*conflict with protected namespace.*)messagez:.*Accessing the.*attribute on the instance is deprecated.*ZLITELLM_MODEZDEV)CallableListOptionalDictUnionAnyLiteralget_argsTYPE_CHECKINGTupleoverloadType)DatadogInitParams)set_verbose_turn_on_debugverbose_logger	json_logs_turn_on_json	log_level)#DEFAULT_BATCH_SIZEDEFAULT_FLUSH_INTERVAL_SECONDSROUTER_MAX_FALLBACKSDEFAULT_MAX_RETRIES!DEFAULT_REPLICATE_POLLING_RETRIES'DEFAULT_REPLICATE_POLLING_DELAY_SECONDSLITELLM_CHAT_PROVIDERS"HUMANLOOP_PROMPT_CACHE_TTL_SECONDSOPENAI_CHAT_COMPLETION_PARAMSr    OPENAI_FINISH_REASONSr!   openai_compatible_endpointsopenai_compatible_providers+openai_text_completion_compatible_providers_openai_like_providersreplicate_modelsclarifai_modelshuggingface_modelsempower_modelstogether_ai_modelsbaseten_modelsWANDB_MODELSREPEATED_STREAMING_CHUNK_LIMITrequest_timeoutopen_ai_embedding_modelscohere_embedding_modelsbedrock_embedding_modelsknown_tokenizer_config BEDROCK_INVOKE_PROVIDERS_LITERAL#BEDROCK_EMBEDDING_PROVIDERS_LITERALBEDROCK_CONVERSE_MODELSDEFAULT_MAX_TOKENSDEFAULT_SOFT_BUDGETDEFAULT_ALLOWED_FAILSCustomLoggerzList[CALLBACK_TYPES]input_callbacksuccess_callbackfailure_callbackservice_callback)/ZlagoZ	openmeterZlogfireZ	literalaiZlitellm_agentZdynamic_rate_limiterZdynamic_rate_limiter_v3Z	langsmithZ
prometheusZotelZdatadogZdatadog_metricsZdatadog_llm_observabilityZgalileoZ
braintrustZarizeZarize_phoenixZ	langtraceZ
gcs_bucketZazure_storageZopikZargillaZmlflowZlangfuseZlangfuse_otelZ
weave_otelZ	pagerdutyZ	humanloopZazure_sentinelZ
gcs_pubsubZagentopsZanthropic_cache_control_hookZgeneric_apiZresend_emailZsendgrid_emailZ
smtp_emailZdeepevalZs3_v2Zaws_sqsZvector_store_pre_call_hookZ	dotpromptZ	bitbucketZgitlabZ	cloudzeroZfocusZposthogZlevoz5Optional[_custom_logger_compatible_callbacks_literal]cold_storage_custom_loggerz(Optional[Union[List[str], Literal['*']]]logged_real_time_event_typesr   )_known_custom_logger_compatible_callbackszRList[Union[Callable, _custom_logger_compatible_callbacks_literal, 'CustomLogger']]	callbackszDict[str, Dict[str, Any]]callback_settingsintinitialized_langfuse_clientszOptional[List[str]]langfuse_default_tagszOptional[int]langsmith_batch_sizeFzOptional[bool]$prometheus_initialize_budget_metrics!require_auth_for_metrics_endpointargilla_batch_sizedatadog_use_v1gcs_pub_sub_use_v1generic_api_use_v1zOptional[Dict[str, Any]]argilla_transformation_objectz*List[Union[str, Callable, 'CustomLogger']]_async_input_callback_async_success_callback_async_failure_callbackzList[Callable]pre_call_rulespost_call_rulesturn_off_message_logging(standard_logging_payload_excluded_fieldsboollog_raw_request_responseredact_messages_in_exceptionsredact_user_api_key_infofilter_invalid_headers#add_user_information_to_llm_headerszOptional[str]emailtokenT
max_tokensZLITELLM_DROP_PARAMSZLITELLM_MODIFY_PARAMSZ7LITELLM_USE_CHAT_COMPLETIONS_URL_FOR_ANTHROPIC_MESSAGES/use_chat_completions_url_for_anthropic_messagesapi_key
openai_keygroq_keygigachat_keydatabricks_keyopenai_like_key	azure_keyanthropic_keyreplicate_key	bytez_key
cohere_keyinfinity_keyclarifai_keymaritalk_keyai21_key
ollama_keyopenrouter_keydatarobot_keypredibase_keyhuggingface_keyvertex_projectvertex_locationpredibase_tenant_idtogetherai_api_keycloudflare_api_keyvercel_ai_gateway_keybaseten_keyllama_api_keyaleph_alpha_keynlp_cloud_keynovita_api_keysnowflake_keygradient_ai_api_key
nebius_key	wandb_key
heroku_keycometapi_keyovhcloud_keylemonade_keysap_service_keyamazon_nova_api_key)projectZregion_namer\   )	vertex_aibedrockwatsonxazureZvertex_ai_beta)params	providersdict!common_cloud_provider_auth_paramsuse_litellm_proxy
use_clientzUnion[str, bool]
ssl_verifyssl_security_levelssl_certificatessl_ecdh_curvedisable_streaming_loggingdisable_token_counter(disable_add_transform_inline_image_block&disable_add_user_agent_to_request_tags2disable_anthropic_gemini_context_caching_transformextra_spend_tag_headersz'LLMClientCache'Zin_memory_llm_clients_cachesafe_memory_modeenable_azure_ad_token_refreshzOptional[Any]
proxy_authz2025-02-01-previewz
2024-03-13Zsearch_documentz'COHERE_EMBEDDING_INPUT_TYPES'#COHERE_DEFAULT_EMBEDDING_INPUT_TYPEzList['CredentialItem']credential_listllamaguard_model_nameopenai_moderations_model_namepresidio_ad_hoc_recognizerszOptional[float]&google_moderation_confidence_threshold$llamaguard_unsafe_content_categorieszOptional[Union[str, List]]blocked_user_listbanned_keywords_listallz2Literal['all', 'key-specific', 'request-specific']llm_guard_modezDict[str, GuardrailItem]guardrail_name_config_mapinclude_cost_in_streaming_usagereasoning_auto_summary)
PromptSpeczDict[str, PromptSpec]prompt_name_config_mapenable_preview_featuresreturn_response_headersenable_json_schema_validation"enable_key_alias_format_validationlogging'enable_loadbalancing_on_batch_endpoints3enable_caching_on_provider_specific_optional_paramscachingcaching_with_modelszOptional['Cache']cachedefault_in_memory_ttldefault_redis_ttl default_redis_batch_cache_expiryzDict[str, str]model_alias_mapzOptional['ModelGroupSettings']model_group_settingsg        float
max_budgetbudget_durationdefault_soft_budget#forward_traceparent_to_llm_providerr   
error_logsadd_function_to_promptzOptional[httpx.Client]client_sessionzOptional[httpx.AsyncClient]aclient_sessionzOptional[List]model_fallbacksZLITELLM_MODEL_COST_MAP_URLz[https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.jsonstrmodel_cost_map_urlZLITELLM_BLOG_POSTS_URLzNhttps://raw.githubusercontent.com/BerriAI/litellm/main/litellm/blog_posts.jsonblog_posts_urlZ"LITELLM_ANTHROPIC_BETA_HEADERS_URLzahttps://raw.githubusercontent.com/BerriAI/litellm/main/litellm/anthropic_beta_headers_config.jsonanthropic_beta_headers_urldynamodb_table_nameOptional[Dict]s3_callback_paramsz.Optional[Union[DatadogLLMObsInitParams, Dict]] datadog_llm_observability_paramsz(Optional[Union[DatadogInitParams, Dict]]datadog_paramsaws_sqs_callback_paramsgeneric_logger_headersdefault_key_generate_paramsz-Optional[LiteLLM_UpperboundKeyGenerateParams]upperbound_key_generate_paramsz'Optional['StandardKeyGenerationConfig']key_generation_settingsdefault_internal_user_paramsz+Optional[Union[DefaultTeamSSOParams, Dict]]default_team_paramsdefault_team_settingsmax_user_budget default_max_internal_user_budgetmax_internal_user_budgetg      ?max_ui_session_budgetinternal_user_budget_durationz#Optional[Dict[str, 'BudgetConfig']]tag_budget_configmax_end_user_budgetmax_end_user_budget_iddisable_end_user_cost_tracking.disable_end_user_cost_tracking_prometheus_only-enable_end_user_cost_tracking_prometheus_onlyz	List[str]!custom_prometheus_metadata_labelscustom_prometheus_tagsprometheus_metrics_configprometheus_emit_stream_labeldisable_add_prefix_to_prompt#disable_copilot_system_to_assistantpublic_mcp_serverspublic_model_groupspublic_agent_groupsz%Dict[str, Union[str, Dict[str, Any]]]public_model_groups_linksz<Optional[Dict[str, Union[float, 'PriorityReservationDict']]]priority_reservationz'Optional['PriorityReservationSettings']priority_reservation_settingsuse_aiohttp_transportaiohttp_trust_envdisable_aiohttp_transportdisable_aiohttp_trust_env
force_ipv4network_mockdisable_stop_sequence_limitnum_retriesmax_fallbacksdefault_fallbacks	fallbackscontext_window_fallbackscontent_policy_fallbacks   allowed_fails allow_dynamic_callback_disablingnum_retries_per_requestsecret_manager_client_google_kms_resource_namezOptional['KeyManagementSystem']_key_management_systemoutput_parse_pii)get_model_cost_map)urlzDict[str, float]cost_discount_configz)Dict[str, Union[float, Dict[str, float]]]cost_margin_configzDict[str, dict]custom_prompt_dictc                   @  s   e Zd Zdd ZdS )MyLocalc                 C  s
   d| _ d S )NzHello World)user)self r  G/home/app/Keep/.python/lib/python3.10/site-packages/litellm/__init__.py__init__  s   
zMyLocal.__init__N)__name__
__module____qualname__r  r  r  r  r  r    s    r  c                 C  s   d| v r| d t _d S d S )Nr  )_thread_contextr  )Zevent_detailsr  r  r  identify  s   r  api_baseapi_versionzOptional[dict]vertex_ai_safety_settings)Setr  open_ai_chat_completion_modelsopen_ai_text_completion_modelscohere_modelscohere_chat_modelsmistral_chat_models text_completion_codestral_modelsanthropic_modelsopenrouter_modelsdatarobot_modelsvertex_language_modelsvertex_vision_modelsvertex_chat_modelsvertex_code_chat_modelsvertex_ai_image_modelsvertex_ai_video_modelsvertex_text_modelsvertex_code_text_modelsvertex_embedding_modelsvertex_anthropic_modelsvertex_llama3_modelsvertex_deepseek_modelsvertex_ai_ai21_modelsvertex_mistral_modelsvertex_openai_modelsvertex_minimax_modelsvertex_moonshot_modelsvertex_zai_modelsai21_modelsai21_chat_modelsnlp_cloud_modelsaleph_alpha_modelsbedrock_modelsbedrock_converse_modelsfal_ai_modelsfireworks_ai_modelsfireworks_ai_embedding_modelsdeepinfra_modelsperplexity_modelswatsonx_modelsgemini_models
xai_models
zai_modelsdeepseek_modelsrunwayml_modelsazure_ai_modelsjina_ai_modelsvoyage_modelsinfinity_modelsheroku_modelsdatabricks_modelscloudflare_modelscodestral_modelsfriendliai_modelsfeatherless_ai_modelspalm_modelsgroq_modelsazure_modelsazure_anthropic_modelsazure_text_modelsanyscale_modelscerebras_modelsgaladriel_modelsnvidia_nim_modelssambanova_modelssambanova_embedding_modelsnovita_modelsassemblyai_modelssnowflake_modelsgradient_ai_modelsllama_modelsnscale_modelsnebius_modelsnebius_embedding_modelsaiml_modelsdeepgram_modelselevenlabs_modelsdashscope_modelsmoonshot_modelspublicai_models	v0_modelsmorph_modelslambda_ai_modelshyperbolic_modelsrecraft_modelscometapi_models
oci_modelsvercel_ai_gateway_modelsvolcengine_modelswandb_modelsovhcloud_modelsovhcloud_embedding_modelslemonade_modelsdocker_model_runner_modelsamazon_nova_modelsstability_modelsgithub_copilot_modelschatgpt_modelsminimax_modelsaws_polly_modelsgigachat_modelsllamagate_modelsbedrock_mantle_modelskeyreturnc                 C  s(   t d}d| v rdS || }|duS )a#  
    Excludes keys with the pattern 'bedrock/<region>/<model>'. These are in the model_prices_and_context_window.json file for pricing purposes only.

    Args:
        key (str): A key to filter.

    Returns:
        bool: True if the key matches the Bedrock pattern, False otherwise.
    z^bedrock/[a-zA-Z0-9_-]+/.+$zmonth-commitmentTN)recompilematch)r  Zbedrock_patternZis_matchr  r  r  is_bedrock_pricing_only_modelZ  s
   

r  c                 C  s   |  do| ddk S )a(  
    Excludes model cost keys with the pattern 'ft:<model>'. These are in the model_prices_and_context_window.json file for pricing purposes only.

    Args:
        key (str): A key to filter.

    Returns:
        bool: True if the key matches the OpenAI finetune pattern, False otherwise.
    zft::   )
startswithcount)r  r  r  r  is_openai_finetune_modeln  s   
r  model_cost_mapc                 C  s  | d ur| nt }| D ]\}}|ddkr"t|s"t| q|ddkr/t| q|ddkr<t| q|ddkrIt| q|ddkrVt	| q|ddkrct
| q|ddkrpt| q|dd	kr}t| q|dd
krt| q|ddkrt| q|ddkrt| q|ddkrt| q|ddkrt| q|ddkrt| q|ddkrt| q|ddkrt| q|ddkrt| q|ddkrt| q|ddkr|dd}t| q|ddkr'|dd}t| q|ddkr;|dd}t| q|ddkrO|dd}t| q|ddkrc|dd}t| q|ddkrw|dd}t| q|ddkr|dd}t| q|ddkr|dd}t| q|ddkr|dd}t | q|ddkr|dd}t!| q|dd kr|dd}t"| q|dd!kr|d"d#krt#| qt$| q|dd$krt%| q|dd%krt&| q|dd&kr&t'|s&t(| q|dd'kr4t)| q|dd(krBt*| q|dd)krPt+| q|dd*kr^t,| q|dd+krlt-| q|dd,krd-|vrd.|vrt.| q|dd/krd-|vrt/| q|dd0krt0| q|dd1krt1| q|dd2krt2| q|dd3krt3| q|dd4krt4| q|dd5krt5| q|dd6krt6| q|dd7krt7| q|dd8krt8| q|dd9kr#t9| q|dd:kr1t:| q|dd;kr?t;| q|dd<krMt<| q|dd=kr[t=| q|dd>krit>| q|dd?krwt?| q|dd@krt@| q|ddAkrtA| q|ddBkrtB| q|ddCkrtC| q|ddDkrtD| q|ddEkrtE| q|ddFkrtF| q|ddGkrtG| q|ddHkrtH| q|ddIkrtI| q|ddJkrtJ| q|ddKkrtK| q|ddLkr-tL| q|ddMkr;tM| q|ddNkrItN| q|ddOkrWtO| q|ddPkretP| q|ddQkrstQ| q|ddRkrtR| q|ddSkrtS| q|ddTkrtT| q|ddUkrtU| q|ddVkrtV| q|ddWkrtW| q|ddXkrtX| q|ddYkrtY| q|ddZkrtZ| q|dd[krt[| q|dd\krt\| q|dd]krt]| q|dd^kr)t^| q|dd_kr7t_| q|dd`krEt`| q|ddakrSta| q|ddbkratb| q|ddckrotc| q|dddkr}td| q|ddekrte| q|ddfkrtf| q|ddgkrtg| q|ddhkrth| q|ddikrti| q|ddjkrtj| q|ddkkrtk| q|ddlkrtl| q|ddmkrtm| qd S )nNZlitellm_provideropenaitext-completion-openai
azure_textcoherecohere_chatmistral	anthropicZempower
openroutervercel_ai_gateway	datarobotzvertex_ai-text-modelszvertex_ai-code-text-modelszvertex_ai-language-modelszvertex_ai-vision-modelszvertex_ai-chat-modelszvertex_ai-code-chat-modelszvertex_ai-embedding-modelszvertex_ai-anthropic_modelsz
vertex_ai/ zvertex_ai-llama_modelszvertex_ai-deepseek_modelszvertex_ai-mistral_modelszvertex_ai-ai21_modelszvertex_ai-image-modelszvertex_ai-video-modelszvertex_ai-openai_modelszvertex_ai-minimax_modelszvertex_ai-moonshot_modelszvertex_ai-zai_modelsai21modeZchat	nlp_cloudaleph_alphar   Zbedrock_converse	deepinfra
perplexityr   geminifireworks_aiz-to-zfireworks-ai-defaultzfireworks_ai-embedding-modelstext-completion-codestralxaizaifal_aideepseekrunwayml
meta_llamanscaleazure_aivoyageinfinity
databricks
cloudflare	codestral
friendliaipalmgroqr   azure_anthropicanyscalecerebras	galadriel
nvidia_nim	sambanovazsambanova-embedding-modelsnovitaznebius-chat-modelsznebius-embedding-modelsaiml
assemblyaijina_ai	snowflakegradient_aifeatherless_aideepgram
elevenlabsheroku	dashscopemoonshotpublicaiv0morph	lambda_ai
hyperbolicrecraftcometapioci
volcenginewandbovhcloudzovhcloud-embedding-modelslemonadeZdocker_model_runneramazon_nova	stabilitygithub_copilotchatgptminimax	aws_pollygigachat	llamagatebedrock_mantle)n
model_costitemsgetr  r  addr  rT  r  r  r  r   r)   r!  rp  r"  r)  r*  r#  r$  r%  r&  r+  replacer,  r-  r.  r0  r/  r'  r(  r1  r2  r3  r4  r6  r5  r7  r8  r  r9  r:  r>  r?  r@  rA  r<  r=  r  rB  rC  r;  rD  rE  r_  r`  rF  rH  rI  rK  rL  rM  rN  rP  rQ  rR  rS  rU  rV  rW  rX  rY  rZ  r[  ra  rb  rc  r\  rG  r]  r^  rO  rd  re  rJ  rf  rg  rh  ri  rj  rk  rl  rm  rn  ro  rq  rr  rs  rt  ru  rv  rw  rx  ry  rz  r{  r|  r}  r~  r  )r  _mapr  valuer  r  r  add_known_models{  s  



 r  zazure/gpt-35-turbozazure/gpt-35-turbo-16kzazure/gpt-35-turbo-instructzgpt-4.1zgpt-4.1-minizgpt-4.1-nano)zgpt-35-turbozgpt-35-turbo-16kzgpt-35-turbo-instructzazure/gpt-41zazure/gpt-41-minizazure/gpt-41-nanoadaz	azure/adazpetals-team/StableBeluga2Zllama2Zmaritalkr  r  r  r  r  Z	replicateZhuggingfaceZtogether_aiZbasetenr  r  r  r   r  r   ZpetalsZollamaZollama_chatr  r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  Znebiusr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  Zclarifair  r  r  r  r  r  r  )r  r  models_by_providerzgpt-3.5-turbo-16kzgpt-3.5-turbo-16k-0301zgpt-3.5-turbo-16k-0613z	gpt-4-32kzgpt-4-32k-0314zgpt-4-32k-0613zclaude-2zchat-bison-32kzcodechat-bison-32kz#openrouter/openai/gpt-3.5-turbo-16kzopenrouter/anthropic/claude-2)zgpt-3.5-turbozgpt-3.5-turbo-0301zgpt-3.5-turbo-0613zgpt-4z
gpt-4-0314z
gpt-4-0613zclaude-instant-1zclaude-instant-1.2z
chat-bisonzchat-bison@001zcodechat-bisonzcodechat-bison@001zopenrouter/openai/gpt-3.5-turboz&openrouter/anthropic/claude-instant-v1"longer_context_model_fallback_dictzdall-e-2zdall-e-3zsora-2)KeyManagementSettingsr  _key_management_settingsr  )client)	CustomLLM)AnthropicModelInfo)AI21ChatConfigr  )
PalmConfig)AlephAlphaConfig)GeminiModelInfo)VertexAITextEmbeddingConfig)AmazonTitanV2Config)TopazModelInfo)XAIModelInfoLlmProviders)*)create_skillacreate_skilllist_skillsalist_skills	get_skill
aget_skilldelete_skilladelete_skill)create_evalacreate_eval
list_evalsalist_evalsget_eval	aget_evaldelete_evaladelete_evalcancel_evalacancel_eval
create_runacreate_run	list_runs
alist_runsget_runaget_run
delete_runadelete_run
cancel_runacancel_run)close_litellm_async_clients)AuthenticationErrorInvalidRequestErrorBadRequestErrorImageFetchErrorNotFoundErrorPermissionDeniedErrorRateLimitErrorServiceUnavailableErrorBadGatewayErrorOpenAIErrorContextWindowExceededErrorContentPolicyViolationErrorBudgetExceededErrorAPIErrorTimeoutAPIConnectionErrorUnsupportedParamsErrorAPIResponseValidationErrorUnprocessableEntityErrorInternalServerErrorJSONSchemaValidationErrorLITELLM_EXCEPTION_TYPESMockException)BudgetManager)
run_server)Router)interactions)
_arealtime)_aresponses_websocket)acreateadeletealist	aretrievearetrieve_contentaupdatecreatedeletelistretrieveretrieve_contentupdate)AdapterItemzList[AdapterItem]adapters)VectorStoreRegistryVectorStoreIndexRegistryzOptional[VectorStoreRegistry]vector_store_registryz"Optional[VectorStoreIndexRegistry]vector_store_index_registry)rag)CustomLLMItemzList[CustomLLMItem]custom_provider_map_custom_providersdisable_hf_tokenizer_downloadglobal_disable_no_log_param)get_litellm_gateway_api_key)allm_passthrough_routellm_passthrough_route)agenerate_contentglobal_bitbucket_configconfigDict[str, Any]Nonec                 C     | a dS z9Set global BitBucket configuration for prompt management.N)rH  rI  r  r  r  set_global_bitbucket_config%     rO  global_gitlab_configc                 C  rL  rM  )rQ  rN  r  r  r  set_global_gitlab_config/  rP  rR  )	ModelInfo)PriorityReservationSettings)AsyncHTTPHandlerHTTPHandler)Cache)AmazonConverseConfig)OpenAILikeChatConfig)GaladrielChatConfig)GithubChatConfig)AzureAnthropicConfig)BytezChatConfig)CompactifAIChatConfig)EmpowerChatConfig)MinimaxChatConfig)AiohttpOpenAIChatConfig)HuggingFaceChatConfig)HuggingFaceEmbeddingConfig)OobaboogaConfig)MaritalkConfig)OpenrouterConfig)DataRobotConfig)AnthropicConfig)AnthropicTextConfig)GroqSTTConfig)TritonConfig)TritonGenerateConfig)TritonInferConfig)TritonEmbeddingConfig)HuggingFaceRerankConfig)DatabricksConfig)DatabricksEmbeddingConfig)PredibaseConfig)ReplicateConfig)SnowflakeConfig)CohereRerankConfig)CohereRerankV2Config)AzureAIRerankConfig)InfinityRerankConfig)JinaAIRerankConfig)DeepinfraRerankConfig)HostedVLLMRerankConfig)NvidiaNimRerankConfig)NvidiaNimRankingConfig)VertexAIRerankConfig)FireworksAIRerankConfig)VoyageRerankConfig)IBMWatsonXRerankConfig)ClarifaiConfig)r  )LlamaAPIConfig)TogetherAITextCompletionConfig)CloudflareChatConfig)NovitaConfig)PetalsConfig)OllamaChatConfig)OllamaConfig)SagemakerConfig)SagemakerChatConfig)CohereChatConfig)AnthropicMessagesConfig)#AmazonAnthropicClaudeMessagesConfig)TogetherAIConfig)NLPCloudConfig)VertexGeminiConfig)GoogleAIStudioGeminiConfig)VertexAIAnthropicConfig)VertexAILlama3Config)VertexAIAi21Config)AmazonCohereChatConfig)AmazonBedrockGlobalConfig)AmazonAI21Config)AmazonInvokeNovaConfig)AmazonQwen2Config)AmazonQwen3Config)AmazonAnthropicConfig)AmazonAnthropicClaudeConfig)AmazonCohereConfig)AmazonLlamaConfig)AmazonDeepSeekR1Config)AmazonMistralConfig)AmazonMoonshotConfig)AmazonTitanConfig)AmazonTwelveLabsPegasusConfig)AmazonInvokeConfig)AmazonBedrockOpenAIConfig)AmazonStabilityConfig)AmazonStability3Config)AmazonNovaCanvasConfig)AmazonTitanG1Config)&AmazonTitanMultimodalEmbeddingG1Config)CohereV2ChatConfig)BedrockCohereEmbeddingConfig) TwelveLabsMarengoEmbeddingConfig)AmazonNovaEmbeddingConfig)OpenAIConfigMistralEmbeddingConfig)OpenAIImageVariationConfig) DeepgramAudioTranscriptionConfig)TopazImageVariationConfig)OpenAITextCompletionConfig)GroqChatConfig)BedrockMantleChatConfig)	A2AConfig)VoyageEmbeddingConfig)VoyageContextualEmbeddingConfig)InfinityEmbeddingConfig)PerplexityEmbeddingConfig)AzureAIStudioConfig)MistralConfig)OpenAIResponsesAPIConfig)AzureOpenAIResponsesAPIConfig)$AzureOpenAIOSeriesResponsesAPIConfig)XAIResponsesAPIConfig)LiteLLMProxyResponsesAPIConfig)VolcEngineResponsesAPIConfig)ManusResponsesAPIConfig)PerplexityResponsesConfig)DatabricksResponsesAPIConfig)OpenRouterResponsesAPIConfig) GoogleAIStudioInteractionsConfig)OpenAIOSeriesConfigr  )AnthropicSkillsConfig)BaseSkillsAPIConfig)GradientAIConfig)OpenAIGPTConfig)OpenAIGPT5Config)%OpenAIWhisperAudioTranscriptionConfig)!OpenAIGPTAudioTranscriptionConfig)OpenAIGPTAudioConfig)NvidiaNimConfig)NvidiaNimEmbeddingConfigr  openaiOSeriesConfigr  openAIGPTConfigr  openAIGPTAudioConfigr  openAIGPT5Configr  nvidiaNimConfigr  nvidiaNimEmbeddingConfig)
VLLMConfig)DeepSeekChatConfig)GenAIHubOrchestrationConfig)GenAIHubEmbeddingConfig)AzureOpenAIO1Config)PerplexityChatConfig)NscaleConfig)IBMWatsonXChatConfig)IBMWatsonXAIConfig)LiteLLMProxyChatConfig)DeepInfraConfig)LlamafileChatConfig)LMStudioChatConfig)LmStudioEmbeddingConfig)IBMWatsonXEmbeddingConfigzType[_VLLMConfig]r  zType[_DeepSeekChatConfig]r  z"Type[_GenAIHubOrchestrationConfig]r  zType[_GenAIHubEmbeddingConfig]r  zType[_AzureOpenAIO1Config]r  zType[_PerplexityChatConfig]r  zType[_NscaleConfig]r  zType[_IBMWatsonXChatConfig]r  zType[_IBMWatsonXAIConfig]r  zType[_LiteLLMProxyChatConfig]r  zType[_DeepInfraConfig]r  zType[_LlamafileChatConfig]r  zType[_LMStudioChatConfig]r  zType[_LmStudioEmbeddingConfig]r  z Type[_IBMWatsonXEmbeddingConfig]r  zType[_VertexGeminiConfig]ZVertexAIConfig)FeatherlessAIConfig)CerebrasConfig)BasetenConfig)SambanovaConfig)SambaNovaEmbeddingConfig)FireworksAIConfig)FireworksAITextCompletionConfig)#FireworksAIAudioTranscriptionConfig)FireworksAIEmbeddingConfig)FriendliaiChatConfig)JinaAIEmbeddingConfig)XAIChatConfig)ZAIChatConfig)AIMLChatConfig)VolcEngineChatConfigr  )CodestralTextCompletionConfig)AzureOpenAIAssistantsAPIConfig)HerokuChatConfig)CometAPIConfig)AzureOpenAIConfig)AzureOpenAIGPT5Config)AzureOpenAITextConfig)HostedVLLMChatConfig)HostedVLLMEmbeddingConfig)HostedVLLMResponsesAPIConfig)GithubCopilotConfig)GithubCopilotResponsesAPIConfig)GithubCopilotEmbeddingConfig)ChatGPTConfig)ChatGPTResponsesAPIConfig)GigaChatConfig)GigaChatEmbeddingConfig)NebiusConfig)WandbConfig)DashScopeChatConfig)MoonshotChatConfig)DockerModelRunnerChatConfig)V0ChatConfig)OCIChatConfig)MorphChatConfig)RAGFlowConfig)LambdaAIChatConfig)HyperbolicChatConfig)VercelAIGatewayConfig)OVHCloudChatConfig)OVHCloudEmbeddingConfig)CometAPIEmbeddingConfig)LemonadeChatConfig)SnowflakeEmbeddingConfig)AmazonNovaChatConfig)LLMClientCache)COHERE_EMBEDDING_INPUT_TYPES)BudgetConfigCredentialItemPriorityReservationDictStandardKeyGenerationConfig)GuardrailItem)DefaultTeamSSOParams#LiteLLM_UpperboundKeyGenerateParamsz"Callable[..., Tuple[float, float]]Zcost_per_tokenzCallable[..., float]Zcompletion_costr
   Zresponse_cost_calculatorZmodify_integrationzCallable[..., str]Zget_response_stringzCallable[..., bool]Zsupports_function_callingZsupports_web_searchZsupports_url_contextZsupports_response_schemaZ"supports_parallel_function_callingZsupports_visionZsupports_audio_inputZsupports_audio_outputZsupports_system_messagesZsupports_reasoningzCallable[..., Any]r,  zCallable[..., int]Zget_max_tokenszCallable[..., _ModelInfoType]Zget_model_infozCallable[..., None]Zregister_prompt_templatezCallable[..., dict]Zvalidate_environmentZcheck_valid_keyZregister_modelzCallable[..., list]encodedecodeZ_calculate_retry_afterZ_should_retryzCallable[..., Optional[list]]Zget_supported_openai_paramszCallable[..., Optional[str]]Zget_api_baseZget_first_chars_messageszCallable[..., List]Zget_provider_fieldsZget_valid_modelsZremove_index_from_tool_callsz	Type[Any]ZModelResponseListIteratorrU  Zmodule_level_aclientrV  Zmodule_level_client)InMemoryCacher'  bedrock_tool_name_mappingsAzureOpenAIError)KeyManagementSystemr  )r9   )DatadogLLMObsInitParams)LoggingCallbackManagerr-  logging_callback_managerzList[Union[LlmProviders, str]]provider_listZLITELLM_DISABLE_LAZY_LOADINGr  )1trueyesonencodingnamec           &      C  s$  t sddlm} |  da ddlm} | }| |v r"||  }|| S | dkrAddlm} | }d|vr=ddlm} ||d< |d S | d	kr`ddlm} | }d	|vr\dd
lm	} ||d	< |d	 S | dkrddlm} | }d|vr{ddl
m}	 |	|d< |d S | dkrddlm} | }d|vrtd}
|
 |d< |d S dddddd}| |v rddlm} | }| |vrt||  }
|
 || < ||  S | dkrtdS | dkrddlm} | }d|vrddlm} t||d< |d S | dkrddlm} | }d|vr
td}| |d< |d S | dkr.ddlm} | }d|vr*td}| |d< |d S | dkrNddlm} | }d|vrJddl}|j|d< |d S | dv rddlm}m}m}m}m}m}m}m}m}m}m}m}m}m }m!}m"}m#} m$}!m%}"m&}#m'}$m(}% t) |  S t*dt+d | )!zBLazy import handler with cached registry for improved performance.r   )register_async_client_cleanupTr  )_get_lazy_import_registryr5  )_get_litellm_globalsr4  r(  )r(  r*  r)  r  r  r  r  r  r  r  )r  r  r  r  r  OpenAIO1Configr/  r  r   rT  r.  r-  _service_loggerN)r  r  r  aupdate_evalr  r  r  r  r  update_evalr   r  r  r  r	  r  r  r  r  r  r  r
  zmodule z has no attribute ), _async_client_cleanup_registeredZ.litellm.llms.custom_httpx.async_client_cleanupr7  Z_lazy_importsr8  r9  mainr5   llms.bedrock.chat.invoke_handlerr(  Zllms.azure.common_utilsr*  __getattr__litellm.types.utilsr  r4  Zlitellm._service_loggerr;  Zlitellm.evals.mainr  r  r  r<  r  r  r  r  r  r=  r   r  r  r  r	  r  r  r  r  r  r  r
  localsAttributeErrorr  )&r6  r7  r8  registryZhandler_funcr9  Z_globals	_encodingZ_bedrock_tool_name_mappingsZ_AzureOpenAIErrorZconfig_classZ_config_instancesr  rT  r-  Zlitellmr  r  r  r<  r  r  r  r  r  r=  r   r  r  r  r	  r  r  r  r  r  r  r
  r  r  r  rA    s   











`
rA  )r  r   r  rU   )N)r  r   )rI  rJ  r  rK  )r6  r   r  r
   (  
__future__r   warningsfilterwarnings	threadingosZdotenvZ_dotenvgetenvZload_dotenvtypingr   r   r   r   r	   r
   r   r   r   r   r   r   Z"litellm.types.integrations.datadogr   Zlitellm._loggingr   r   r   r   r   r   r  Zlitellm.constantsr   r   r   r   r   r   r   r   r    Z_openai_completion_paramsr!   Z_openai_finish_reasonsr"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   ZhttpxZlitellm_moder   ZCALLBACK_TYPESr:   __annotations__r;   r<   r=   Z+_custom_logger_compatible_callbacks_literalr>   r?   r4  r@   rA   rB   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rV   rW   rX   rY   rZ   Zstore_audit_logsr[   r\   Z	telemetryr]   rU   Zdrop_paramsZmodify_paramsr^   retryr_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ZAZURE_DEFAULT_API_VERSIONZWATSONX_DEFAULT_API_VERSIONr   r   r   r   r   r   r   r   r   r   r   r   r   Z"litellm.types.prompts.init_promptsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Z_current_costr   r   r   r   r   r   r   r   Zsuppress_debug_infor   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  Z-litellm.litellm_core_utils.get_model_cost_mapr  r  r  r	  r
  Zcheck_provider_endpointlocalr  r  r  r  headersr  Zorganizationr   Zconfig_pathr  r  setr  r  r  r  r  r  r   r!  r"  r#  r$  r%  r&  r'  r(  r)  r*  r+  r,  r-  r.  r/  r0  r1  r2  r3  r4  r5  r6  r7  r8  r9  r:  r;  r<  r=  r>  r?  r@  rA  rB  rC  rD  rE  rF  rG  rH  rI  rJ  rK  rL  rM  rN  rO  rP  rQ  rR  rS  rT  rU  rV  rW  rX  rY  rZ  r[  r\  r]  r^  r_  r`  ra  rb  rc  rd  re  rf  rg  rh  ri  rj  rk  rl  rm  rn  ro  rp  rq  rr  rs  rt  ru  rv  rw  rx  ry  rz  r{  r|  r}  r~  r  r  r  r  Z
azure_llmsZazure_embedding_modelsZpetals_modelsZollama_modelsZmaritalk_modelsZ
model_listZmodel_list_setr  r  Zall_embedding_modelsZopenai_image_generation_modelsZopenai_video_generation_modelsZ"litellm.types.secret_managers.mainr  r  utilsr  Zllms.custom_llmr  Zllms.anthropic.common_utilsr  Zllms.ai21.chat.transformationr  Z
AI21ConfigZllms.deprecated_providers.palmr  Z%llms.deprecated_providers.aleph_alphar  Zllms.gemini.common_utilsr  Z/llms.vertex_ai.vertex_embeddings.transformationr  ZvertexAITextEmbeddingConfigZ1llms.bedrock.embed.amazon_titan_v2_transformationr  Zllms.topaz.common_utilsr  Zllms.xai.common_utilsr  rB  r  r?  Zskills.mainr  r  r  r  r  r  r  r  Z
evals.mainr  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r	  r
  r  r  r  ZintegrationsZ&llms.custom_httpx.async_client_cleanupr  
exceptionsr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r!  r"  r#  r$  r%  Zbudget_managerr&  Zproxy.proxy_clir'  Zrouterr(  Zassistants.mainZbatches.mainZimages.mainZvideos.mainZbatch_completion.mainZrerank_api.mainZ9llms.anthropic.experimental_pass_through.messages.handlerZresponses.mainr  r)  Zcontainers.mainZocr.mainZrag.mainZsearch.mainZrealtime_api.mainr*  r+  Zfine_tuning.mainZ
files.mainZvector_store_files.mainr,  Zavector_store_file_creater-  Zavector_store_file_deleter.  Zavector_store_file_listr/  Zavector_store_file_retriever0  Zavector_store_file_contentr1  Zavector_store_file_updater2  Zvector_store_file_creater3  Zvector_store_file_deleteZvector_store_file_listr5  Zvector_store_file_retriever6  Zvector_store_file_contentr7  Zvector_store_file_updateZ	schedulerZtypes.adapterr8  Zlitellm.anthropic_interfaceZanthropic_interfacer  r9  Z#vector_stores.vector_store_registryr:  r;  r<  r=  r>  Ztypes.llms.custom_llmr?  r@  rA  rB  rC  Z*litellm.litellm_core_utils.cli_token_utilsrD  ZpassthroughrE  rF  Zgoogle_genairG  rH  rO  rQ  rR  rS  Z_ModelInfoTyperT  Z&litellm.llms.custom_httpx.http_handlerrU  rV  Zlitellm.caching.cachingrW  Z)llms.bedrock.chat.converse_transformationrX  Zllms.openai_like.chat.handlerrY  Z"llms.galadriel.chat.transformationrZ  Zllms.github.chat.transformationr[  Z&llms.azure_ai.anthropic.transformationr\  Zllms.bytez.chat.transformationr]  Z$llms.compactifai.chat.transformationr^  Z llms.empower.chat.transformationr_  Z llms.minimax.chat.transformationr`  Z'llms.aiohttp_openai.chat.transformationra  Z$llms.huggingface.chat.transformationrb  Z)llms.huggingface.embedding.transformationrc  Z"llms.oobabooga.chat.transformationrd  Zllms.maritalkre  Z#llms.openrouter.chat.transformationrf  Z"llms.datarobot.chat.transformationrg  Z"llms.anthropic.chat.transformationrh  Z(llms.anthropic.completion.transformationri  Zllms.groq.stt.transformationrj  Z%llms.triton.completion.transformationrk  rl  rm  Z$llms.triton.embedding.transformationrn  Z&llms.huggingface.rerank.transformationro  Z#llms.databricks.chat.transformationrp  Z$llms.databricks.embed.transformationrq  Z"llms.predibase.chat.transformationrr  Z"llms.replicate.chat.transformationrs  Z"llms.snowflake.chat.transformationrt  Z!llms.cohere.rerank.transformationru  Z$llms.cohere.rerank_v2.transformationrv  Z#llms.azure_ai.rerank.transformationrw  Z#llms.infinity.rerank.transformationrx  Z"llms.jina_ai.rerank.transformationry  Z$llms.deepinfra.rerank.transformationrz  Z&llms.hosted_vllm.rerank.transformationr{  Z%llms.nvidia_nim.rerank.transformationr|  Z-llms.nvidia_nim.rerank.ranking_transformationr}  Z$llms.vertex_ai.rerank.transformationr~  Z'llms.fireworks_ai.rerank.transformationr  Z!llms.voyage.rerank.transformationr  Z"llms.watsonx.rerank.transformationr  Z!llms.clarifai.chat.transformationr  Z#llms.meta_llama.chat.transformationr  Z*llms.together_ai.completion.transformationr  Z#llms.cloudflare.chat.transformationr  Zllms.novita.chat.transformationr  Z%llms.petals.completion.transformationr  Zllms.ollama.chat.transformationr  Z%llms.ollama.completion.transformationr  Z(llms.sagemaker.completion.transformationr  Z"llms.sagemaker.chat.transformationr  Zllms.cohere.chat.transformationr  Z@llms.anthropic.experimental_pass_through.messages.transformationr  ZMllms.bedrock.messages.invoke_transformations.anthropic_claude3_transformationr  Zllms.together_ai.chatr  Zllms.nlp_cloud.chat.handlerr  Z8llms.vertex_ai.gemini.vertex_and_google_ai_studio_geminir  Zllms.gemini.chat.transformationr  Z@llms.vertex_ai.vertex_ai_partner_models.anthropic.transformationr  Z=llms.vertex_ai.vertex_ai_partner_models.llama3.transformationr  Z;llms.vertex_ai.vertex_ai_partner_models.ai21.transformationr  r@  r  Zllms.bedrock.common_utilsr  ZCllms.bedrock.chat.invoke_transformations.amazon_ai21_transformationr  ZCllms.bedrock.chat.invoke_transformations.amazon_nova_transformationr  ZDllms.bedrock.chat.invoke_transformations.amazon_qwen2_transformationr  ZDllms.bedrock.chat.invoke_transformations.amazon_qwen3_transformationr  ZIllms.bedrock.chat.invoke_transformations.anthropic_claude2_transformationr  ZIllms.bedrock.chat.invoke_transformations.anthropic_claude3_transformationr  ZEllms.bedrock.chat.invoke_transformations.amazon_cohere_transformationr  ZDllms.bedrock.chat.invoke_transformations.amazon_llama_transformationr  ZGllms.bedrock.chat.invoke_transformations.amazon_deepseek_transformationr  ZFllms.bedrock.chat.invoke_transformations.amazon_mistral_transformationr  ZGllms.bedrock.chat.invoke_transformations.amazon_moonshot_transformationr  ZDllms.bedrock.chat.invoke_transformations.amazon_titan_transformationr  ZQllms.bedrock.chat.invoke_transformations.amazon_twelvelabs_pegasus_transformationr  ZCllms.bedrock.chat.invoke_transformations.base_invoke_transformationr  ZEllms.bedrock.chat.invoke_transformations.amazon_openai_transformationr  Z>llms.bedrock.image_generation.amazon_stability1_transformationr  Z>llms.bedrock.image_generation.amazon_stability3_transformationr  Z?llms.bedrock.image_generation.amazon_nova_canvas_transformationr  Z1llms.bedrock.embed.amazon_titan_g1_transformationr  Z9llms.bedrock.embed.amazon_titan_multimodal_transformationr  Z"llms.cohere.chat.v2_transformationr  Z(llms.bedrock.embed.cohere_transformationr  Z4llms.bedrock.embed.twelvelabs_marengo_transformationr  Z-llms.bedrock.embed.amazon_nova_transformationr  Zllms.openai.openair  r  Z+llms.openai.image_variations.transformationr  Z0llms.deepgram.audio_transcription.transformationr  Z*llms.topaz.image_variations.transformationr  Z-litellm.llms.openai.completion.transformationr  Zllms.groq.chat.transformationr  Z'llms.bedrock_mantle.chat.transformationr  Zllms.a2a.chat.transformationr  Z$llms.voyage.embedding.transformationr  Z/llms.voyage.embedding.transformation_contextualr  Z&llms.infinity.embedding.transformationr  Z(llms.perplexity.embedding.transformationr  Z!llms.azure_ai.chat.transformationr  Z llms.mistral.chat.transformationr  Z$llms.openai.responses.transformationr  Z#llms.azure.responses.transformationr  Z,llms.azure.responses.o_series_transformationr  Z!llms.xai.responses.transformationr  Z+llms.litellm_proxy.responses.transformationr  Z(llms.volcengine.responses.transformationr  Z#llms.manus.responses.transformationr  Z(llms.perplexity.responses.transformationr  Z(llms.databricks.responses.transformationr  Z(llms.openrouter.responses.transformationr  Z'llms.gemini.interactions.transformationr  Z(llms.openai.chat.o_series_transformationr  r:  Z$llms.anthropic.skills.transformationr  Z#llms.base_llm.skills.transformationr  Z$llms.gradient_ai.chat.transformationr  Z#llms.openai.chat.gpt_transformationr  Z%llms.openai.chat.gpt_5_transformationr  Z1llms.openai.transcriptions.whisper_transformationr  Z-llms.openai.transcriptions.gpt_transformationr  Z)llms.openai.chat.gpt_audio_transformationr  Z#llms.nvidia_nim.chat.transformationr  Zllms.nvidia_nim.embedr  Z#llms.vllm.completion.transformationr  Z_VLLMConfigZ!llms.deepseek.chat.transformationr  Z_DeepSeekChatConfigZllms.sap.chat.transformationr  Z_GenAIHubOrchestrationConfigZllms.sap.embed.transformationr  Z_GenAIHubEmbeddingConfigZ'llms.azure.chat.o_series_transformationr  Z_AzureOpenAIO1ConfigZ#llms.perplexity.chat.transformationr  Z_PerplexityChatConfigZllms.nscale.chat.transformationr  Z_NscaleConfigZ llms.watsonx.chat.transformationr  Z_IBMWatsonXChatConfigZ&llms.watsonx.completion.transformationr  Z_IBMWatsonXAIConfigZ&llms.litellm_proxy.chat.transformationr  Z_LiteLLMProxyChatConfigZ"llms.deepinfra.chat.transformationr  Z_DeepInfraConfigZ"llms.llamafile.chat.transformationr  Z_LlamafileChatConfigZ"llms.lm_studio.chat.transformationr  Z_LMStudioChatConfigZ#llms.lm_studio.embed.transformationr  Z_LmStudioEmbeddingConfigZ!llms.watsonx.embed.transformationr  Z_IBMWatsonXEmbeddingConfigZ_VertexGeminiConfigZ'llms.featherless_ai.chat.transformationr  Zllms.cerebras.chatr  Zllms.baseten.chatr  Zllms.sambanova.chatr  Z'llms.sambanova.embedding.transformationr  Z%llms.fireworks_ai.chat.transformationr  Z+llms.fireworks_ai.completion.transformationr  Z4llms.fireworks_ai.audio_transcription.transformationr  Z3llms.fireworks_ai.embed.fireworks_ai_transformationr  Z#llms.friendliai.chat.transformationr  Z%llms.jina_ai.embedding.transformationr  Zllms.xai.chat.transformationr  Zllms.zai.chat.transformationr  Zllms.aiml.chat.transformationr  Z#llms.volcengine.chat.transformationr  ZVolcEngineConfigZ(llms.codestral.completion.transformationr  Zllms.azure.azurer  Zllms.heroku.chat.transformationr  Z!llms.cometapi.chat.transformationr  Z"llms.azure.chat.gpt_transformationr  Z$llms.azure.chat.gpt_5_transformationr  Z$llms.azure.completion.transformationr  Z$llms.hosted_vllm.chat.transformationr   Z)llms.hosted_vllm.embedding.transformationr  Z)llms.hosted_vllm.responses.transformationr  Z'llms.github_copilot.chat.transformationr  Z,llms.github_copilot.responses.transformationr  Z,llms.github_copilot.embedding.transformationr  Z llms.chatgpt.chat.transformationr  Z%llms.chatgpt.responses.transformationr  Z!llms.gigachat.chat.transformationr  Z&llms.gigachat.embedding.transformationr	  Zllms.nebius.chat.transformationr
  Zllms.wandb.chat.transformationr  Z"llms.dashscope.chat.transformationr  Z!llms.moonshot.chat.transformationr  Z,llms.docker_model_runner.chat.transformationr  Zllms.v0.chat.transformationr  Zllms.oci.chat.transformationr  Zllms.morph.chat.transformationr  Z llms.ragflow.chat.transformationr  Z"llms.lambda_ai.chat.transformationr  Z#llms.hyperbolic.chat.transformationr  Z*llms.vercel_ai_gateway.chat.transformationr  Z!llms.ovhcloud.chat.transformationr  Z&llms.ovhcloud.embedding.transformationr  Z"llms.cometapi.embed.transformationr  Z!llms.lemonade.chat.transformationr  Z'llms.snowflake.embedding.transformationr  Z$llms.amazon_nova.chat.transformationr  Z#litellm.caching.llm_caching_handlerr  Zlitellm.types.llms.bedrockr  r  r  r   r!  Zlitellm.types.guardrailsr"  Z/litellm.types.proxy.management_endpoints.ui_ssor#  r$  r'  Zlitellm.llms.azure.common_utilsr*  r+  Z"litellm.integrations.custom_loggerr9   Z*litellm.types.integrations.datadog_llm_obsr,  Z3litellm.litellm_core_utils.logging_callback_managerr-  r>  lowerr5  rA  r  r  r  r  <module>   s  8 %1
























 h




	


 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKO	
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^e

N
N
l,