From 219212f7532165a3a579de9cb930b634b3ea9055 Mon Sep 17 00:00:00 2001 From: Tanishq <74068132+tanishqbaweja@users.noreply.github.com> Date: Sun, 25 Oct 2026 19:47:53 +0530 Subject: [PATCH 1/2] fix(guardrails): expose connection settings in the dashboard --- .../guardrail_hooks/generic_guardrail_api.py | 9 +++++++++ .../proxy/guardrails/test_guardrail_endpoints.py | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/litellm/types/proxy/guardrails/guardrail_hooks/generic_guardrail_api.py b/litellm/types/proxy/guardrails/guardrail_hooks/generic_guardrail_api.py index d38e54986b9..7594c9f0528 100644 --- a/litellm/types/proxy/guardrails/guardrail_hooks/generic_guardrail_api.py +++ b/litellm/types/proxy/guardrails/guardrail_hooks/generic_guardrail_api.py @@ -130,6 +130,15 @@ class GenericGuardrailAPIConfigModel( ): """Configuration parameters for the Generic Guardrail API guardrail""" + api_base: str | None = Field( + default=None, + description="Base URL of the guardrail service. Defaults to GENERIC_GUARDRAIL_API_BASE when omitted", + ) + api_key: str | None = Field( + default=None, + description="API key sent to the guardrail service in the x-api-key header", + ) + optional_params: GenericGuardrailAPIOptionalParams | None = Field( default_factory=GenericGuardrailAPIOptionalParams, description="Optional parameters for the Generic Guardrail API guardrail", diff --git a/tests/unit/proxy/guardrails/test_guardrail_endpoints.py b/tests/unit/proxy/guardrails/test_guardrail_endpoints.py index 6807a4fb569..7d44ece0d9e 100644 --- a/tests/unit/proxy/guardrails/test_guardrail_endpoints.py +++ b/tests/unit/proxy/guardrails/test_guardrail_endpoints.py @@ -956,6 +956,18 @@ async def test_provider_specific_params_includes_embedding_toggle(): assert field["default_value"] is False +@pytest.mark.asyncio +@pytest.mark.parametrize("field_name", ("api_base", "api_key")) +async def test_provider_specific_params_exposes_generic_guardrail_connection_fields(field_name: str) -> None: + from litellm.proxy.guardrails.guardrail_endpoints import get_provider_specific_params + + provider_params: Final = await get_provider_specific_params() + field: Final = provider_params["generic_guardrail_api"][field_name] + + assert field["type"] == "string" + assert field["required"] is False + + @pytest.mark.asyncio async def test_provider_specific_params_offers_forward_messages_as_sent_off_by_default(): from litellm.proxy.guardrails.guardrail_endpoints import get_provider_specific_params From 81a5dc0ae2e18cb19e9f9f29a8a92d8e723bd533 Mon Sep 17 00:00:00 2001 From: Tanishq <74068132+tanishqbaweja@users.noreply.github.com> Date: Sun, 25 Oct 2026 20:26:00 +0530 Subject: [PATCH 2/2] ci: retry the existing tokenizer timing failure