fix(gateway): install bedrock-realtime extra for Nova Sonic realtime - #34426
Merged
mubashir1osmani merged 1 commit intoJul 24, 2026
Merged
Conversation
The gateway image installed --extra proxy/proxy-runtime/extra_proxy/semantic-router but not bedrock-realtime, so aws-sdk-bedrock-runtime was absent. Bedrock Nova Sonic speech-to-speech uses InvokeModelWithBidirectionalStream (which boto3 cannot do) via that package, so realtime requests failed at startup with 'Missing aws_sdk_bedrock_runtime'. Add the extra to both uv sync stages; it is already in uv.lock so --frozen resolves, and the package/marker (python>=3.12) matches the python3.13 image.
Contributor
Greptile SummaryAdds the Bedrock realtime dependency extra to the gateway image installation.
Confidence Score: 5/5The PR appears safe to merge. No blocking failures remain.
|
| Filename | Overview |
|---|---|
| gateway/Dockerfile | Adds the existing locked bedrock-realtime extra consistently to the dependency and project installation stages. |
Reviews (2): Last reviewed commit: "fix(gateway): install bedrock-realtime e..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
yuneng-berri
approved these changes
Jul 24, 2026
Ericcwang23
pushed a commit
to Ericcwang23/litellm
that referenced
this pull request
Jul 27, 2026
…erriAI#34426) The gateway image installed --extra proxy/proxy-runtime/extra_proxy/semantic-router but not bedrock-realtime, so aws-sdk-bedrock-runtime was absent. Bedrock Nova Sonic speech-to-speech uses InvokeModelWithBidirectionalStream (which boto3 cannot do) via that package, so realtime requests failed at startup with 'Missing aws_sdk_bedrock_runtime'. Add the extra to both uv sync stages; it is already in uv.lock so --frozen resolves, and the package/marker (python>=3.12) matches the python3.13 image.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
Missing aws_sdk_bedrock_runtimebedrock-realtimeextraHow it solves it:
--extra bedrock-realtimeto bothuv syncstages ingateway/DockerfileRelevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
Screenshots / Proof of Fix
Captured at 14b81bb. This is an image-dependency fix, so the proof is the missing package on the live gateway plus the lock already carrying it; the end-to-end Nova Sonic pass follows the image rebuild + deploy.
Gateway log (the realtime request that failed):
Confirmed absent on the running gateway:
Already locked, so
uv sync --frozen --extra bedrock-realtimeresolves without a relock:Type
🐛 Bug Fix
Changes
gateway/Dockerfileinstalled--extra proxy,proxy-runtime,extra_proxy, andsemantic-router, but notbedrock-realtime. Bedrock Nova Sonic speech-to-speech uses theInvokeModelWithBidirectionalStreamAPI, which boto3 cannot do; litellm drives it throughaws-sdk-bedrock-runtime(with its transitive smithy-* deps), imported lazily in the realtime handler. Without the extra the import fails and every Nova Sonic realtime request errors at startup. Added--extra bedrock-realtimeto bothuv syncstages (builder and final). The extra is already inuv.lock, and itsaws-sdk-bedrock-runtime>=0.7.0,<0.8.0; python_version >= '3.12'marker matches the python3.13 image.Scope note: the monolith proxy images (
Dockerfile,docker/Dockerfile.non_root,docker/Dockerfile.database) serve/v1/realtimetoo and have the same gap; this PR fixes only the componentized gateway that's deployed and erroring. Happy to extend to those in this PR or a follow-up if preferred. The backend and migrations images do not serve realtime, so they are intentionally untouched.QA runbook
docker run --rm --entrypoint python <image> -c "import aws_sdk_bedrock_runtime; print('ok')"tests/e2e/llm_translation/realtime/test_realtime_bedrock_e2e.py::TestNovaSonicRealtime::test_nova_sonic_response_create_completes; expect it to pass rather than error withMissing aws_sdk_bedrock_runtimeFinal Attestation