From 62325467f58c79b406bbfeb6f50192f6707e580d Mon Sep 17 00:00:00 2001 From: Conduct AI Date: Fri, 11 Sep 2026 19:32:57 -0500 Subject: [PATCH] fix: pass unreachable_fallback directly, bump conduct-litellm-guard pin to >=0.2.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit conduct-litellm-guard 0.2.5 (released 2026-09-12, tag litellm-guard/v0.2.5) renamed the ``ConductGuard`` constructor kwarg ``fail_mode`` → ``unreachable_fallback`` per this PR's review (yucheng-berri, 2026-09-10). The old ``fail_mode`` kwarg is kept as a deprecated alias in 0.2.5+ but emits a ``DeprecationWarning`` on every guardrail init. Two-line change: - initialize_guardrail: swap ``fail_mode=unreachable_fallback`` for ``unreachable_fallback=unreachable_fallback`` — direct pass-through since both sides now share the name. No more silent deprecation warning on every proxy startup. - conduct.py: bump the pip install pin from ``>=0.2.4`` to ``>=0.2.5`` (both in the module docstring and the import-error message shown when the standalone package is missing). Signed-off-by: Sudhi Seshachala Signed-off-by: Conduct AI --- .../proxy/guardrails/guardrail_hooks/conduct/__init__.py | 8 +++++--- .../proxy/guardrails/guardrail_hooks/conduct/conduct.py | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/litellm/proxy/guardrails/guardrail_hooks/conduct/__init__.py b/litellm/proxy/guardrails/guardrail_hooks/conduct/__init__.py index 09dbcfba76b..822c2df3225 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/conduct/__init__.py +++ b/litellm/proxy/guardrails/guardrail_hooks/conduct/__init__.py @@ -53,9 +53,11 @@ def initialize_guardrail(litellm_params: "LitellmParams", guardrail: "Guardrail" api_url=getattr(litellm_params, "api_base", None), agent_token=getattr(litellm_params, "api_key", None), workspace_id=getattr(litellm_params, "workspace_id", None), - # Conduct's constructor argument is still ``fail_mode`` — mapped - # from the typed LiteLLM field above. - fail_mode=unreachable_fallback, + # Direct pass-through since conduct-litellm-guard 0.2.5 — the + # standalone package renamed ``fail_mode`` to ``unreachable_fallback`` + # so the shim no longer needs to name-map (which would trigger the + # plugin's DeprecationWarning on every init in 0.2.5+). + unreachable_fallback=unreachable_fallback, timeout=timeout, guardrail_name=guardrail.get("guardrail_name", ""), event_hook=litellm_params.mode, diff --git a/litellm/proxy/guardrails/guardrail_hooks/conduct/conduct.py b/litellm/proxy/guardrails/guardrail_hooks/conduct/conduct.py index a0cbbf4bd67..b2911ac2dcb 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/conduct/conduct.py +++ b/litellm/proxy/guardrails/guardrail_hooks/conduct/conduct.py @@ -13,7 +13,7 @@ BerriAI/litellm#38143 CI regression: registry iteration expects every registered class to expose the hooks classmethod). Instantiation of the stub raises ``ImportError`` via ``raise_if_missing_package``. -Install: ``pip install "conduct-litellm-guard>=0.2.4"`` +Install: ``pip install "conduct-litellm-guard>=0.2.5"`` Source: https://github.com/sseshachala/conductai/tree/main/packages/conduct-litellm-guard Docs: https://conductai.ai/guard """ @@ -27,7 +27,7 @@ from litellm.types.guardrails import GuardrailEventHooks _import_error_message = ( "conduct-litellm-guard is required for the Conduct guardrail. " - 'Install it with: pip install "conduct-litellm-guard>=0.2.4"' + 'Install it with: pip install "conduct-litellm-guard>=0.2.5"' )