From 71d951bfc0e9bbeb552009e9c1a9756a62100a71 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Sat, 15 Aug 2026 11:56:04 -0700 Subject: [PATCH] chore(types): drop redundant comments around the bedrock batch params --- litellm/types/router.py | 9 --------- tests/test_litellm/test_utils.py | 8 -------- 2 files changed, 17 deletions(-) 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)