fix(deps): ship boto3 with the base SDK so bedrock works out of the box - #36568
Conversation
Greptile SummaryThe PR makes boto3 a core LiteLLM dependency so Bedrock works with a base SDK installation while retaining boto3 in the proxy extra.
Confidence Score: 5/5The PR appears safe to merge, with no concrete correctness, security, or packaging failure identified. The dependency metadata and lockfile consistently make boto3 available to base installations, and the added smoke check exercises a deterministic local credential path without contacting AWS or exposing usable credentials.
|
| Filename | Overview |
|---|---|
| pyproject.toml | Adds the existing boto3 version range to core dependencies without introducing a conflicting package constraint. |
| tests/base_sdk_tests/check_base_sdk_install.py | Updates the base-only dependency expectation and adds a local Bedrock credential-resolution smoke check using invalid synthetic credentials. |
| uv.lock | Reflects boto3 as both an unconditional requirement and a proxy-extra declaration, with compatible transitive dependencies resolved. |
Reviews (1): Last reviewed commit: "scrub ambient AWS env vars in the base S..." | Re-trigger Greptile
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c4163e8. Configure here.
19c9140
into
litellm_internal_staging
TLDR
fixes #36550
Problem this solves:
pip install litellmcannot call Bedrock at all[proxy]shipped itHow it solves it:
User Flow
Before: a developer installs the SDK and their first Bedrock call crashes
pip install litellmin a fresh environmentlitellm.completion(model="bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0", ...)with AWS keys setAPIConnectionError: No module named 'boto3'instead of reaching AWSpip install boto3, and retryAfter: the same install works on the first try
pip install litellmin a fresh environmentlitellm.completion(model="bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0", ...)with AWS keys setlitellm.completion_cost(...)prices the callRelevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Before (published litellm 1.96.0, base install, no extras):
After (this branch at 0964368, base install from the repo, no extras, real Bedrock call against AWS):
The base SDK smoke check also passes in that same venv at 0964368 and its new bedrock check fails against 1.96.0:
Type
🐛 Bug Fix
Caveats (if any)
Final Attestation
Note
Medium Risk
Adds a large transitive dependency (
boto3/botocore, ~80MB) to every base install, affecting all SDK consumers even if they never use Bedrock. No auth or runtime logic changes beyond dependency availability.Overview
Makes Bedrock usable after a plain
pip install litellmby movingboto3into core dependencies instead of only the[proxy]extra.Also updates the base SDK smoke check:
boto3is no longer treated as extras-only, and a new check exercisesBaseAWSLLM.get_credentialsso missing Bedrock deps fail CI.Reviewed by Cursor Bugbot for commit c4163e8. Bugbot is set up for automated code reviews on this repo. Configure here.