test(bedrock): drop the leftover set_verbose from the embedding tests - #37844
Merged
yuneng-berri merged 2 commits intoAug 22, 2026
Merged
Conversation
Fifteen tests opened with litellm.set_verbose = True and never put it back, so the flag stayed on for everything that ran after them in the same process. Nothing in the file reads the output it produces: there is no caplog, no capsys and no assertion on a log line, so the flag was left over from debugging. Deleting it beats restoring it, since restoring keeps the noise.
Contributor
Greptile SummaryRemoves fifteen leftover verbose-logging mutations from Bedrock embedding tests so they no longer leak global logging state into later tests.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness, security, or test-coverage issues identified. The removed flag assignments only controlled diagnostic output, and the quality-budget reduction exactly matches the fifteen eliminated TQ005 violations.
|
| Filename | Overview |
|---|---|
| tests/test_litellm/llms/bedrock/embed/test_bedrock_embedding.py | Removes global verbose-logging mutations that only enabled diagnostic output and leaked state across tests. |
| test-quality-budget.json | Correctly lowers the TQ005 ceiling by fifteen to match the removed global-mutation violations. |
Reviews (1): Last reviewed commit: "test(bedrock): drop the leftover set_ver..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ryan-crabbe-berri
approved these changes
Aug 22, 2026
yucheng-berri
approved these changes
Aug 22, 2026
…itellm_bedrock_embedding_drop_set_verbose # Conflicts: # test-quality-budget.json
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.
TLDR
Problem this solves:
litellm.set_verboseand leave it onHow it solves it:
User Flow
Before: a maintainer running the unit tier gets a wall of provider debug logging from tests that never asked for it
litellm.set_verboseon and never turns it back offAfter: the same run stays quiet, and a real failure is the loudest thing on screen
litellm.set_verboseRelevant issues
Linear ticket
Pre-Submission checklist
uv run pytest tests/test_litellm/<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 more@greptileaito re-request a review after pushing changes)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
litellm.set_verboseis not in the save/restore conftest snapshot, so nothing else puts it back. The probe sets it False, runs the file in the same interpreter, and reads it back.Before (ff02d5c)
After (324e1d8)
uv run python scripts/test_quality_gate.py --base origin/litellm_internal_stagingType
🧹 Refactoring
✅ Test
Caveats (if any)
sys.path.insert, left for its own changeFinal Attestation