Skip to content

fix(deps): bundle boto3 in release binaries and unbreak Bedrock tool_choice - #1049

Open
pavel-brousek-at-usu wants to merge 1 commit into
usestrix:mainfrom
pavel-brousek-at-usu:fix/frozen-release-boto3-litellm
Open

fix(deps): bundle boto3 in release binaries and unbreak Bedrock tool_choice#1049
pavel-brousek-at-usu wants to merge 1 commit into
usestrix:mainfrom
pavel-brousek-at-usu:fix/frozen-release-boto3-litellm

Conversation

@pavel-brousek-at-usu

Copy link
Copy Markdown

Summary

Related

Testing

  • uv sync --frozen --extra bedrock --python 3.12 installs boto3==1.43.36 and litellm==1.96.0 (the latest release satisfying the new floor at lock time).
  • Built the full frozen binary (uv run --no-sync pyinstaller strix.spec --noconfirm) and confirmed via pyi-archive_viewer -l that both litellm-1.96.0.dist-info and boto3/botocore (including botocore/data/bedrock*) are bundled; dist/strix --version / --help run 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 bedrock installs boto3
  • Frozen binary bundles litellm 1.96.0 and boto3/botocore bedrock data files
  • Frozen binary runs (--version, --help)
  • Full test suite passes (883 passed)
  • New regression tests fail pre-fix, pass post-fix

…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.
@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR enables the Bedrock optional dependency during release builds and raises the LiteLLM minimum version to include the upstream Bedrock tool-choice fix.

  • Selects the bedrock extra when synchronizing release-build dependencies so frozen binaries include boto3.
  • Requires LiteLLM 1.95.0 or newer and refreshes the lockfile.
  • Adds regression tests for the release workflow and LiteLLM version floor.

Confidence Score: 5/5

The 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

Filename Overview
.github/workflows/build-release.yml Selects the Bedrock extra before building release artifacts so boto3 is available to frozen binaries.
pyproject.toml Raises the LiteLLM dependency floor to the version containing the upstream Bedrock tool-choice fix.
tests/test_optional_deps.py Adds focused regression checks for Bedrock release dependencies and the LiteLLM minimum version.
uv.lock Refreshes resolved dependencies consistently with the new LiteLLM floor; no changed-code security issue was established.

Reviews (1): Last reviewed commit: "fix(deps): bundle boto3 in release binar..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ImportError: Missing boto3 to call bedrock. Run 'pip install boto3'.

1 participant