fix(deps): bundle boto3 in release binaries and unbreak Bedrock tool_choice - #1049
Open
pavel-brousek-at-usu wants to merge 1 commit into
Open
Conversation
…choice Standalone release binaries never installed boto3, since the `bedrock` extra added in usestrix#588 declares it but the release workflow only ran plain `uv sync --frozen`. Every Bedrock user on a downloaded binary hits `ModuleNotFoundError: No module named 'boto3'` at LLM warm-up with no way to `pip install` into a frozen executable (usestrix#574). Select the extra in the release build so boto3 ships by default. Separately, litellm <1.95.0 maps Bedrock's `parallel_tool_calls` to a `tool_choice` object missing the required `type` discriminator, so every Bedrock Claude request 400s before the agent can even start (usestrix#644, BerriAI/litellm#34347). Bump the floor past the upstream fix. Adds regression tests asserting the release workflow selects the `bedrock` extra and that the litellm floor stays past 1.95.0.
Contributor
Greptile SummaryThis PR enables the Bedrock optional dependency during release builds and raises the LiteLLM minimum version to include the upstream Bedrock tool-choice fix.
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The release workflow, dependency declaration, lockfile, and regression tests consistently implement the intended Bedrock packaging and LiteLLM compatibility fixes. Important Files Changed
Reviews (1): Last reviewed commit: "fix(deps): bundle boto3 in release binar..." | Re-trigger Greptile |
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.
Summary
uv sync --frozen --extra bedrockin the release build so standalone binaries actually bundleboto3. Thebedrockextra was added by fix(providers): declare bedrock + vertex extras and add provider import-error hints #588 but the release workflow only ever ran plainuv sync --frozen, so it was never selected — every Bedrock user on a downloaded binary hitsModuleNotFoundError: No module named 'boto3'at LLM warm-up with no way topip installinto a frozen executable (closes [BUG] ImportError: Missing boto3 to call bedrock. Run 'pip install boto3'. #574, which was closed by fix(providers): declare bedrock + vertex extras and add provider import-error hints #588 without actually fixing the binary-distribution path).litellmfloor to>=1.95.0. Versions below that map Bedrock'sparallel_tool_callsto atool_choiceobject missing the requiredtypediscriminator, so every Bedrock Claude request 400s withtool_choice.type: Field requiredbefore the agent can even start ([BUG] When using Bedrock and Claude fails to start with tool_choice.type: Field required #644). The fix landed upstream in BerriAI/litellm#34347, first released in litellm 1.95.0 — no strix-side patch needed, just a version floor.Related
ModuleNotFoundError: No module named 'boto3') for the standalone-binary install path specifically; fix(providers): declare bedrock + vertex extras and add provider import-error hints #588 fixed it forpip install "strix-agent[bedrock]"but not forstrix -linux-x86_64etc.tool_choicecrash (Fix Bedrock/Claude startup crash from forced parallel_tool_calls (#644) + ruff lint cleanup #649, fix(core): ensure tool_choice maps to structured object for AWS Bedrock compliance #668) — those work around it by having strix omitparallel_tool_calls/tool_choicefor Bedrock-Claude. This PR takes the alternative fix of pulling in the litellm version that already handles it correctly upstream, so no strix-side Bedrock-detection branch is needed. Either approach fixes the crash; happy to close this in favor of Fix Bedrock/Claude startup crash from forced parallel_tool_calls (#644) + ruff lint cleanup #649/fix(core): ensure tool_choice maps to structured object for AWS Bedrock compliance #668 if you'd rather keep the fix in strix's own code.Testing
uv sync --frozen --extra bedrock --python 3.12installsboto3==1.43.36andlitellm==1.96.0(the latest release satisfying the new floor at lock time).uv run --no-sync pyinstaller strix.spec --noconfirm) and confirmed viapyi-archive_viewer -lthat bothlitellm-1.96.0.dist-infoandboto3/botocore(includingbotocore/data/bedrock*) are bundled;dist/strix --version/--helprun correctly.uv run --no-sync pytest tests/— 883 passed, including two new regression tests (test_release_build_selects_bedrock_extra,test_litellm_pinned_past_bedrock_tool_choice_fix) that fail against the pre-fix workflow/pyproject.toml and pass with the fix.ruff check/ruff format --check— clean.Test plan
uv sync --frozen --extra bedrockinstalls boto3--version,--help)