Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(guardrails): drop regression docstrings from the api_version tests

mateo-berrie327a6ae7652
diff --git a/tests/test_litellm/proxy/guardrails/guardrail_hooks/azure/test_azure_prompt_shield.py b/tests/test_litellm/proxy/guardrails/guardrail_hooks/azure/test_azure_prompt_shield.py
index 0e7bf72706c..f4af4b5ead7 100644
--- a/tests/test_litellm/proxy/guardrails/guardrail_hooks/azure/test_azure_prompt_shield.py
+++ b/tests/test_litellm/proxy/guardrails/guardrail_hooks/azure/test_azure_prompt_shield.py
@@ -640,9 +640,6 @@ def test_update_in_memory_litellm_params_dead_env_credential_rejected_untouched(
@pytest.mark.asyncio
async def test_config_without_api_version_calls_documented_azure_api_version():
- """A config.yaml entry that omits api_version must reach Azure at the documented
- default. LitellmParams inherits every provider's config model, so a sibling
- provider's api_version default used to leak into the Azure URL and 404."""
handler = InMemoryGuardrailHandler()
registered = handler.initialize_guardrail(
guardrail={
@@ -670,9 +667,6 @@ async def test_config_without_api_version_calls_documented_azure_api_version():
@pytest.mark.asyncio
async def test_update_without_api_version_keeps_documented_azure_api_version():
- """The DB update path copies every LitellmParams attribute onto the live
- instance, api_version included, so an update that omits it must still leave
- the request on the documented default rather than a None or leaked value."""
guardrail = _shield_guardrail()
guardrail.update_in_memory_litellm_params(
LitellmParams(
diff --git a/tests/test_litellm/proxy/guardrails/guardrail_hooks/azure/test_azure_text_moderation.py b/tests/test_litellm/proxy/guardrails/guardrail_hooks/azure/test_azure_text_moderation.py
index acb15b4d869..4fbc33edcd6 100644
--- a/tests/test_litellm/proxy/guardrails/guardrail_hooks/azure/test_azure_text_moderation.py
+++ b/tests/test_litellm/proxy/guardrails/guardrail_hooks/azure/test_azure_text_moderation.py
@@ -468,9 +468,6 @@ async def test_apply_guardrail_handles_missing_texts_key():
@pytest.mark.asyncio
async def test_config_without_api_version_calls_documented_azure_api_version():
- """A config.yaml entry that omits api_version must reach Azure at the documented
- default. LitellmParams inherits every provider's config model, so a sibling
- provider's api_version default used to leak into the Azure URL and 404."""
handler = InMemoryGuardrailHandler()
registered = handler.initialize_guardrail(
guardrail={
@@ -502,10 +499,6 @@ async def test_config_without_api_version_calls_documented_azure_api_version():
)
@pytest.mark.asyncio
async def test_guardrail_loaded_with_stored_api_version_calls_azure_at(stored_api_version, expected_api_version):
- """Releases before the api_version default fix saved every guardrail created
- through the API or dashboard with Javelin's "v1", which Azure always answers
- with 404. A row like that must reach Azure at the documented default, while a
- real Azure version an admin chose is sent as written."""
handler = InMemoryGuardrailHandler()
registered = handler.initialize_guardrail(
guardrail={
diff --git a/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_javelin.py b/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_javelin.py
index b5283255eb2..dc58b67e3f8 100644
--- a/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_javelin.py
+++ b/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_javelin.py
@@ -9,9 +9,6 @@ from litellm.types.guardrails import GuardrailEventHooks
@pytest.mark.asyncio
async def test_config_without_api_version_calls_javelin_v1():
- """Javelin's v1 default no longer lives in the shared LitellmParams model (it
- leaked into every other provider), so the Javelin initializer has to supply
- it itself when the config omits api_version."""
handler = InMemoryGuardrailHandler()
registered = handler.initialize_guardrail(
guardrail={