chore: Improve error handling for LiteLlm import in gemma_llm.py

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 865010258
This commit is contained in:
George Weale
2026-02-03 13:04:27 -08:00
committed by Copybara-Service
parent ce07cd8144
commit 574ec43a17
+2 -2
View File
@@ -356,8 +356,8 @@ def _get_last_valid_json_substring(text: str) -> tuple[bool, str | None]:
try:
from google.adk.models.lite_llm import LiteLlm # noqa: F401
except Exception:
# LiteLLM not available, Gemma3Ollama will not be defined
except ImportError as e:
logger.debug('LiteLlm not available; Gemma3Ollama will not be defined: %s', e)
LiteLlm = None
if LiteLlm is not None: