litellm - 💡(How to fix) Fix Bedrock batch inference broken via proxy: credential fields and model silently dropped [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#25104Fetched 2026-04-08 02:45:04
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

Error Message

Error 1 — S3/batch credential fields silently dropped

Error 2 — model not included in credentials dict

  1. POST /v1/files with a batch JSONL file → fails with S3 bucket error
  2. Even if you work around that, POST /v1/batches → fails with unsupported provider error

Fix Action

Fix

A fix with unit tests is available in #24548 (open since March 25, Greptile 5/5 confidence, no regressions). Requesting maintainer review.

Code Example

S3 bucket_name is required. Set 's3_bucket_name' in litellm_params or AWS_S3_BUCKET_NAME env var

---

LiteLLM doesn't support custom_llm_provider=bedrock for 'create_batch'
RAW_BUFFERClick to expand / collapse

Bug Report

Bedrock batch inference (POST /v1/files, POST /v1/batches) fails through the LiteLLM proxy with two distinct errors.

Error 1 — S3/batch credential fields silently dropped

S3 bucket_name is required. Set 's3_bucket_name' in litellm_params or AWS_S3_BUCKET_NAME env var

CredentialLiteLLMParams is a plain BaseModel (no extra="allow") that acts as a credential whitelist. When get_deployment_credentials_with_provider() casts deployment.litellm_params through it, any field not explicitly declared is silently dropped.

The following fields are missing from CredentialLiteLLMParams:

  • s3_bucket_name
  • s3_region_name
  • s3_encryption_key_id
  • aws_batch_role_arn

The same issue affects Vertex AI — gcs_bucket_name only exists on GenericLiteLLMParams, not CredentialLiteLLMParams, so it's also lost during credential filtering.

Error 2 — model not included in credentials dict

LiteLLM doesn't support custom_llm_provider=bedrock for 'create_batch'

get_deployment_credentials_with_provider() doesn't return the deployment's model. The proxy batch endpoint merges credentials into _create_batch_data via prepare_data_with_credentials(), then passes it to acreate_batch(**_create_batch_data). Without model, create_batch() gets kwargs.get("model", None)None, skipping the ProviderConfigManager.get_provider_batches_config() path that would return BedrockBatchesConfig.

Reproduction

  1. Configure a LiteLLM proxy with a Bedrock batch model including s3_bucket_name and aws_batch_role_arn in litellm_params
  2. POST /v1/files with a batch JSONL file → fails with S3 bucket error
  3. Even if you work around that, POST /v1/batches → fails with unsupported provider error

Fix

A fix with unit tests is available in #24548 (open since March 25, Greptile 5/5 confidence, no regressions). Requesting maintainer review.

LiteLLM Version

1.83.1+

extent analysis

TL;DR

Update CredentialLiteLLMParams to include missing fields like s3_bucket_name and ensure model is included in the credentials dict to fix Bedrock batch inference issues.

Guidance

  • Verify that CredentialLiteLLMParams includes all necessary fields such as s3_bucket_name, s3_region_name, s3_encryption_key_id, and aws_batch_role_arn to prevent silent dropping of credentials.
  • Ensure get_deployment_credentials_with_provider() returns the deployment's model to correctly configure the batch endpoint.
  • Review the proposed fix in #24548, which includes unit tests, to address both error cases.
  • Consider updating to a version where the fix is merged, if available, to resolve the issue.

Example

No explicit code example is provided due to the lack of specific code snippets in the issue, but updating CredentialLiteLLMParams might look something like adding missing fields to its definition.

Notes

The issue seems to be specific to versions 1.83.1+ of LiteLLM, and the fix is pending review. Applying the fix from #24548 should resolve the issues with S3/batch credential fields being silently dropped and the model not being included in the credentials dict.

Recommendation

Apply the workaround by updating CredentialLiteLLMParams and ensuring model is included in the credentials dict, as a fix is not yet merged into the main version. This approach allows for a temporary resolution until the official fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING