Repository navigation
fix(responses): type the cold storage helpers' spend log as a mapping - #53430
Merged
yujonglee-berri merged 1 commit intoNov 21, 2026
Merged
Conversation
Contributor
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
yujonglee-berri
force-pushed
the
litellm_fix_session_handler_spend_logs_import
branch
from
November 21, 2026 21:39
8a3df27 to
e47d756
Compare
yujonglee-berri
enabled auto-merge (squash)
November 21, 2026 21:41
yujonglee-berri
deleted the
litellm_fix_session_handler_spend_logs_import
branch
November 21, 2026 21:44
5 of 7 tasks
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.
Handwritten 1-3 sentence description
[insert handwritten description here]
Details
TLDR
Problem this solves:
How it solves it:
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 moreDelays 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
E2E exception at e47d756. The change only edits two type annotations, so nothing changes at runtime. #50768 added two helpers annotated with
"SpendLogsPayload"after #52768 had removed that import, and both merged cleanly on their own. The helpers only call.get()on the spend log and their one caller passes aMapping[str, object], so they take that type. No test is added since ruff F821 and the basedpyright gate in CI already catch this exact defect.At main (03fd3d7),
cd litellm && uv run --no-sync ruff check .reportsF821 Undefined name SpendLogsPayloadat session_handler.py:445 and :452,Found 2 errors.At e47d756 the same command printsAll checks passed!. Running.venv-typecheck/bin/basedpyrighton the file shows one fewer reportArgumentType and one fewer reportUnknownMemberType than main, and no rule grows.Type
🐛 Bug Fix
Final Attestation