diff --git a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py index ff50a526b0f..5510fbfff4d 100644 --- a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py +++ b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py @@ -1542,8 +1542,10 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig): for part in parts: if "text" in part: text_content = part["text"] + if text_content is None: + continue # Check if text content contains audio data URI - if text_content is not None and text_content.startswith("data:audio") and ";base64," in text_content: + if text_content.startswith("data:audio") and ";base64," in text_content: try: if is_base64_encoded(text_content): media_type, audio_data = text_content.split("data:")[1].split(";base64,") diff --git a/litellm/proxy/guardrails/guardrail_hooks/bias_hallucination_estimator/__init__.py b/litellm/proxy/guardrails/guardrail_hooks/bias_hallucination_estimator/__init__.py index 8473cb97591..74db43ccd1f 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/bias_hallucination_estimator/__init__.py +++ b/litellm/proxy/guardrails/guardrail_hooks/bias_hallucination_estimator/__init__.py @@ -51,6 +51,9 @@ def initialize_guardrail( end_session_after_n_fails=getattr(litellm_params, "end_session_after_n_fails", None), on_violation=getattr(litellm_params, "on_violation", None), realtime_violation_message=getattr(litellm_params, "realtime_violation_message", None), + on_sensitive_data=getattr(litellm_params, "on_sensitive_data", None), + sensitive_data_route_to_model=getattr(litellm_params, "sensitive_data_route_to_model", None), + sticky_session_routing=getattr(litellm_params, "sticky_session_routing", True), ), ), )