diff --git a/litellm/litellm_core_utils/get_litellm_params.py b/litellm/litellm_core_utils/get_litellm_params.py index b12c715c9f5..588356b0178 100644 --- a/litellm/litellm_core_utils/get_litellm_params.py +++ b/litellm/litellm_core_utils/get_litellm_params.py @@ -43,6 +43,7 @@ OPTIONAL_KWARGS_KEYS: Final = ( "azure_scope", "timeout", "gcs_bucket_name", + "s3_bucket_name", "bucket_name", "vertex_credentials", "vertex_project", diff --git a/tests/test_litellm/litellm_core_utils/test_get_litellm_params.py b/tests/test_litellm/litellm_core_utils/test_get_litellm_params.py index 956da571d43..e86608aa6d0 100644 --- a/tests/test_litellm/litellm_core_utils/test_get_litellm_params.py +++ b/tests/test_litellm/litellm_core_utils/test_get_litellm_params.py @@ -73,6 +73,17 @@ class TestGetLitellmParamsKwargsExtraction: for key in _OPTIONAL_KWARGS_KEYS: assert result[key] == f"val_{key}" + def test_s3_bucket_name_survives_extraction(self): + """s3_bucket_name reaches litellm_params, like its gcs_bucket_name counterpart. + + Bedrock file retrieval resolves the bucket from litellm_params or the + AWS_S3_BUCKET_NAME environment variable. Dropping the key here left the + environment variable as the only way to configure it. + """ + result = get_litellm_params(s3_bucket_name="my-bucket", gcs_bucket_name="my-gcs-bucket") + assert result["s3_bucket_name"] == "my-bucket" + assert result["gcs_bucket_name"] == "my-gcs-bucket" + class TestGetLitellmParamsBaseModel: """Verify base_model resolution precedence."""