mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
fix: pass unreachable_fallback directly, bump conduct-litellm-guard pin to >=0.2.5
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 <sudhi@b2bsphere.com> Signed-off-by: Conduct AI <Sudhi@b2bsphere.com>
This commit is contained in:
parent
e054c6c785
commit
62325467f5
2 changed files with 7 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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"'
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue