fix(llm_as_a_judge): support Pydantic object in _get_litellm_param fallback chain

This commit is contained in:
Ishaan Jaffer 2026-04-23 17:00:11 -07:00
parent 2b4a1c4f46
commit 478558b8a9
No known key found for this signature in database

View file

@ -58,6 +58,10 @@ def _get_litellm_param(
raw = guardrail.get("litellm_params")
if isinstance(raw, dict) and key in raw:
return raw[key]
if raw is not None and not isinstance(raw, dict):
attr = getattr(raw, key, None)
if attr is not None:
return attr
return default