Conversation
strix.spec excluded google.auth and google.oauth2 from the PyInstaller bundle, and the release build ran a plain `uv sync --frozen`, so google-auth was never installed there either. litellm's vertex_ai Gemini path authenticates through google.auth and google.oauth2 on every call, so every Vertex model failed on the standalone binary with "No module named 'google'" even though `pip install strix-agent[vertex]` worked. Stop excluding those two modules and install the `vertex` extra in the release build. The remaining google.* and grpc excludes stay: litellm only reaches them for legacy PaLM and Model Garden models, which need google-cloud-aiplatform, and none of those packages are in the lockfile. Fixes the Vertex half of usestrix#1256. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| sync_lines = [line.strip() for line in workflow.splitlines() if "uv sync" in line] | ||
| assert sync_lines, "the release workflow no longer runs uv sync" | ||
| assert all("--extra vertex" in line for line in sync_lines), sync_lines |
There was a problem hiding this comment.
Commented commands pass validation
This raw text check treats shell comments as executable commands. If the current command is later commented out and replaced with uv sync --frozen, the commented --extra vertex text will still satisfy the assertion even though the release build no longer installs Google Auth. Filtering out commented lines prevents this false-positive regression result.
| sync_lines = [line.strip() for line in workflow.splitlines() if "uv sync" in line] | |
| assert sync_lines, "the release workflow no longer runs uv sync" | |
| assert all("--extra vertex" in line for line in sync_lines), sync_lines | |
| sync_lines = [ | |
| line.strip() | |
| for line in workflow.splitlines() | |
| if "uv sync" in line and not line.lstrip().startswith("#") | |
| ] | |
| assert sync_lines, "the release workflow no longer runs uv sync" | |
| assert all("--extra vertex" in line for line in sync_lines), sync_lines |
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_optional_deps.py
Line: 76-78
Comment:
**Commented commands pass validation**
This raw text check treats shell comments as executable commands. If the current command is later commented out and replaced with `uv sync --frozen`, the commented `--extra vertex` text will still satisfy the assertion even though the release build no longer installs Google Auth. Filtering out commented lines prevents this false-positive regression result.
```suggestion
sync_lines = [
line.strip()
for line in workflow.splitlines()
if "uv sync" in line and not line.lstrip().startswith("#")
]
assert sync_lines, "the release workflow no longer runs uv sync"
assert all("--extra vertex" in line for line in sync_lines), sync_lines
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.…heck A commented-out `uv sync ... --extra vertex` would satisfy the assertion even if the real command stopped installing the extra. Only read uncommented lines, and add a test for that case. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Valid — fixed in |
Fixes the Vertex half of #1256. The Bedrock half is #1049 (see Overlap below).
Root cause
The report installs with both
curl … | bashandpipx install "strix-agent[vertex]". Thevertexextra is declared correctly (google-auth>=2.0.0), so the pipx install has the module — but the curl-installed binary in~/.strix/binwins onPATH, and the binary can never run Vertex, for two compounding reasons:strix.speclistsgoogle.authandgoogle.oauth2in PyInstaller'sexcludes.uv sync --frozen, sogoogle-authisn't installed in the build environment either.litellm's Gemini path needs exactly those modules. Every import of them under
litellm/llms/vertex_ai/is on the credential path invertex_llm_base.py:So
vertex_ai/gemini-*fails on every binary install withNo module named 'google'.Change
strix.spec: stop excludinggoogle.authandgoogle.oauth2.build-release.yml:uv sync --frozen --extra vertex, so the build actually installsgoogle-auth.The other
google.*/grpcexcludes are kept on purpose. litellm only importsgoogle.cloudandgoogle.protobufinside atry:invertex_ai_non_gemini.py, for legacy PaLM and Model Garden models that needgoogle-cloud-aiplatform. None ofprotobuf,grpcio,googleapis-common-protosorgoogle-cloud-aiplatformare inuv.lock, so those excludes remove nothing today and there's no reason to widen the bundle.google-auth's own runtime dependencies (
cryptography,pyasn1-modules) aren't excluded, andrequests— whichgoogle.auth.transport.requestsneeds — is already inhiddenimports.Tests
Two regression tests in
tests/test_optional_deps.py, alongside the existing extras tests:test_binary_keeps_the_google_auth_modules_vertex_needs— parsesstrix.specwithast(executing it imports PyInstaller) and asserts none of the credential modules litellm imports are excluded, honouring PyInstaller's rule that excluding a parent package drops its children.test_release_build_installs_the_vertex_extra— asserts everyuv syncin the release workflow selects--extra vertex, since keeping the modules in the bundle only helps if the build installs them.Both fail against
mainand pass here. Each was checked separately, swapping inmain's file:ruff checkandruff formatclean; the workflow YAML parses.What I could not verify
I don't have PyInstaller in my environment, so this is not build-verified — I haven't run a release build and started a Vertex scan against the resulting binary. The evidence is static: the spec excludes, the lockfile contents, and the imports litellm actually makes. PyInstaller's module graph traces the lazy imports in the collected
litellmsubmodules, so dropping the excludes should be sufficient, but a release smoke test (#1261) would be the real confirmation.Overlap with #1049
#1049 changes the same line to
uv sync --frozen --extra bedrock. The two compose cleanly — whichever lands second should resolve to:Both PRs also add tests to
tests/test_optional_deps.py. My test only asserts--extra vertexis present, so it doesn't conflict with a--extra bedrockassertion.🤖 Generated with Claude Code