Repository navigation
build(deps): bump pyasn1, pypdf and minimatch to clear osv-scan - #49362
Conversation
Bumps [pyasn1](https://github.com/pyasn1/pyasn1) from 0.6.4 to 0.6.5. - [Release notes](https://github.com/pyasn1/pyasn1/releases) - [Changelog](https://github.com/pyasn1/pyasn1/blob/main/CHANGES.rst) - [Commits](pyasn1/pyasn1@v0.6.4...v0.6.5) --- updated-dependencies: - dependency-name: pyasn1 dependency-version: 0.6.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will not alter performance1 warning
Comparing |
pyasn1 0.6.4 -> 0.6.5 and pypdf 6.21.2 -> 6.21.4 in uv.lock, with a dated exclude-newer-package cutoff that admits pypdf 6.21.4 before it clears the 3-day window. minimatch has no fixed 10.x release, so the dashboard's override and a new vscode-extension override move it to 11.0.2.
[Medium impact] The PR appears safe to merge, with no new blocking issues found SummaryUpdates locked dependencies to clear the reported security advisories
Reviews (2) · Last reviewed commit: "build(deps): bump pyasn1, pypdf and mini..." · Reviewed by 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 df2a2cb. Configure here.
mateo-berri
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the contribution!
osv-scan has been red on every PR since Oct 30 23:15 UTC because new advisories came out for three packages in our lockfiles. This bumps pyasn1 to 0.6.5 and pypdf to 6.21.4 in uv.lock, which the proxy Docker image installs from, and moves the dev-only minimatch in the dashboard and the VS Code extension to 11.0.2. That clears all 13 findings. It builds on dependabot's pyasn1 commit here, so one PR covers all three packages
pypdf 6.21.4 is still inside our 3-day uv cooldown until Oct 31 17:01 UTC, so pyproject.toml carries a dated cutoff for it with a TODO, the same way the brotli entry does. That entry can go once the window passes
Details
TLDR
Problem this solves:
How it solves it:
uv lock --upgrade-packagefor pyasn1 0.6.5 and pypdf 6.21.4exclude-newer-packagecutoff admits pypdf 6.21.4 todayUser Flow
Before: a contributor's PR shows a red osv-scan check they did not cause
gpt-6.1-soland 14135 forclaude-sonnet-5-5After: the same PR's osv-scan check passes, and the same PDF counts the same
Relevant issues
This is dependabot's pyasn1 PR with the pypdf and minimatch bumps added on top, since the pyasn1 bump alone stayed red on the other two
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or moreNo new tests: a version bump adds no behavior to test, so the existing pypdf tests and the live A/B below cover it
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
No E2E exception. pypdf is a runtime library the proxy reads for PDF token counts, so it gets a live base and tip A/B. pyasn1 is reached only through google-auth's pure-Python RSA fallback, which never loads when
cryptographyis installed (it always is). minimatch is dev-only, so the dashboard and extension builds prove that partShared setup: base worktree at the merge base a9b1814 (pyasn1 0.6.4, pypdf 6.21.2), tip worktree at df2a2cb (pyasn1 0.6.5, pypdf 6.21.4), osv-scanner v2.3.8 (checksum checked against the release's SHA256SUMS), and one proxy per worktree with no database and this config:
The PDF is 6 pages of plain text, and every request sends it as a base64
filepartHow each leg runs
Each leg prints its commit and the pypdf and pyasn1 its proxy's venv loads, boots the proxy, and runs this script
Request script
The legs ran one after the other. A first run with both at once showed the base's gpt cost at 0.0125 because OpenAI's prompt cache was still cold, so this run prints
cached_tokensBefore (a9b1814)
osv-scan
osv-scanner scan source --config osv-scanner.toml -L uv.lock -L ui/litellm-dashboard/package-lock.json -L vscode-extension/package-lock.json(the workflow's own command)The 13 findings
Exit code 1
PDF token count and chat through the proxy
POST /utils/token_counterandPOST /v1/chat/completions("How many pages does this PDF have?") for each modelOutput
After (df2a2cb)
osv-scan
Output (no issues found)
Exit code 0
PDF token count and chat through the proxy
Output
minimatch 11.0.2 in the dev toolchains
Steps and results (pass)
Run at 7d402036f7, the same change on main 02a6a96. Its six dependency files are byte-identical to df2a2cb's, and nothing under
ui/litellm-dashboardorvscode-extensiondiffers between the two basesmake bootstrap, then inui/litellm-dashboard: installed minimatch is 11.0.2,npm run lintpasses,npm run buildpassesvscode-extension:npm ci, installed minimatch is 11.0.2,npm run typecheck && npm run buildpasses,npm run package(vsce package) writeslitellm-vscode-0.1.0.vsixmakeReexport and theMMRegExptype. The lint, build, and package runs above are where the dev parents (@typescript-eslint/typescript-estreeand@vscode/vsce) call itUnit tests and lock checks
Steps and results (pass)
uv run pytest tests/unit/litellm_core_utils/test_token_counter.pywith pypdf 6.21.4 installed: 463 passed, 1 skippeduv lock --checkwith CI's uv 0.10.9 passes on the new lock (run at 7d402036f7, same uv.lock and pyproject.toml bytes)Dependents nobody tests (/live-pr-risk)
Nothing breaks beyond the CID-font caveat. RAG ingestion's local PDF extraction was not run live
Report
Only pyasn1 and pypdf differ between the base and tip environments. pypdf is read by PDF token counting (
/utils/token_counter,/v1/responses/input_tokens, pre-call token checks, the rate limiter's token estimate, and PDF page pricing) and by RAG ingestion's local PDF text extraction. pyasn1 is imported only by google-auth's pure-Python RSA signer, and after the proxy and google-auth's signing modules load on the tip, nopyasn1module is loadedBreaking: none found. Each side ran one proxy with 2 workers and no database. Six PDF shapes went to
/utils/token_counterfor both models, and all 12 cells gave the same status and count on both sidesBackward incompatible: none beyond the CID-font change in Caveats
Regression risk: RAG ingestion into S3 Vectors, Vertex, and Bedrock knowledge bases runs the same
PdfReaderandextract_textcalls as the Claude count cells, but driving it needs a vector store. OpenAI RAG ingestion uploads the raw file and never reads pypdf outputNot verified: those RAG ingestion paths, live.
/v1/responses/input_tokenswith aninput_filePDF answers 400 on both sides from a known, unrelated bug in how Claude count routes convert file partsstartxrefEvery cell is the same at a9b1814 and df2a2cb
/utils/token_counter/v1/responses/input_tokensType
🚄 Infrastructure
Caveats (if any)
Medium
/utils/token_countergoes from 95 or 92 to 69 forgpt-6.1-soland from 95 or 1562 to 1605 forclaude-sonnet-5-5. The plain-text PDF above counts the samepypdf>=6.21.2,<7.0floors stay, so a pip install over an existing 6.21.2 or 6.21.3 keeps it. The ask scoped this PR to the lock, which osv-scan and the Docker image read. Raising the floors to 6.21.4, as build(deps): bump mlflow, pypdf and setuptools to clear osv-scan #48110 did, is the alternativepypdfcutoff lets the lock take 6.21.4 before it clears the 3-day window at Oct 31 17:01 UTC, so a merge before then ships a release under 3 days old. After that the cutoff holds pypdf at its Oct 28 releases until it is removed. The brotli entry is still there 6 days past its TODO date, so a tracked follow-up removes both after 17:01 UTC todayLow
docker/build_from_pipstill pinspypdf==6.7.5, and open fix(docker): update PDF parser and CA bundle requirements #47920 moves it only to 6.21.2. osv-scan does not read it, so a follow-up bumps that pinpackage.jsonstill forces minimatch 10.2.5. Nothing installs that lock and osv-scan does not read itbudgetsfails from an Oct 31 date bug that test(budgets): age the monthly window past any calendar month so the reset test passes on the 31st #49372 fixed on main after this branch's base. It is not requiredBugbot summary