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]

chore(types): drop redundant comments around the bedrock batch params

mateo-berri71d951bfc0e9
diff --git a/litellm/types/router.py b/litellm/types/router.py
index e0ab40b6973..f3f9276e6ba 100644
--- a/litellm/types/router.py
+++ b/litellm/types/router.py
@@ -266,16 +266,7 @@ class CredentialLiteLLMParams(BaseModel):
s3_region_name: str | None = None
s3_encryption_key_id: str | None = None
aws_batch_role_arn: str | None = None
- # Same reason as ``azure_ad_token`` above: this model is a whitelist, so a
- # managed-batch field it does not declare is silently dropped by
- # ``get_deployment_credentials_with_provider`` before the batch and files
- # transformations that read it ever run. ``s3_bucket_name`` /
- # ``s3_region_name`` / ``aws_batch_role_arn`` were added for #25104; these two
- # are the remainder of the same deployment config.
s3_output_bucket_name: str | None = None
- # A list of {"key": str, "value": str}; the batch transformation validates the
- # shape itself via _validate_bedrock_tags, so this stays a plain list to keep
- # that error message rather than failing earlier with a Pydantic one.
bedrock_tags: list | None = None
## IBM WATSONX ##
watsonx_region_name: str | None = None
diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py
index a8640e252bb..661b6ed7244 100644
--- a/tests/test_litellm/test_utils.py
+++ b/tests/test_litellm/test_utils.py
@@ -4768,8 +4768,6 @@ def test_bedrock_batch_params_never_reach_the_provider():
is extra="allow" and preserves them into litellm_params for the batch and files
transformations that read them.
"""
- # bedrock_tags is a list of {"key", "value"} dicts; the rest are plain strings, so
- # give each field a value of its real shape rather than one string for all of them.
configured = {
field: ([{"key": "team", "value": "configured-value"}] if field == "bedrock_tags" else "configured-value")
for field in bedrock_batch_litellm_params
@@ -4790,12 +4788,6 @@ def test_bedrock_batch_params_never_reach_the_provider():
f"{sorted(f for f in bedrock_batch_litellm_params if batch_params.get(f) != configured[f])}"
)
- # GenericLiteLLMParams is extra="allow", so the assertion above would hold even for a
- # field nothing declares. The proxy's files/batch/passthrough callers do not see that
- # dict: get_deployment_credentials_with_provider round-trips the deployment through
- # CredentialLiteLLMParams, which is a whitelist, so an undeclared field is dropped
- # before the batch transformation reads it. Reproduce that round-trip here so the
- # preservation claim covers the path the proxy actually takes.
normalized = CredentialLiteLLMParams.model_validate(
GenericLiteLLMParams(**kwargs).model_dump(exclude_none=True)
).model_dump(exclude_none=True)