Repository navigation
fix(email): apply EMAIL_SIGNATURE to budget alert emails - #31712
Merged
michelligabriele merged 1 commit intoJun 30, 2026
Merged
michelligabriele merged 1 commit into
michelligabriele merged 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Greptile SummaryThis PR makes budget alert emails use the configured email footer. The main changes are:
Confidence Score: 5/5The change is narrowly scoped to budget alert email rendering and is covered by regression tests for the affected render paths. The implementation consistently threads the existing resolved email signature into the updated templates, matching the behavior of other email types while preserving the default footer fallback.
What T-Rex did
|
yuneng-berri
approved these changes
Jun 30, 2026
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.
Relevant issues
N/A (no public GitHub issue)
Linear ticket
Resolves LIT-3748
Pre-Submission checklist
@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewScreenshots / Proof of Fix
Budget alert emails ignored
EMAIL_SIGNATURE. Rendered footer of a soft budget alert with a premium license andEMAIL_SIGNATUREset, before and after the changeBefore
After
All three budget alert types (soft, team soft, max) and both max budget code paths render the configured signature; with no
EMAIL_SIGNATUREthey fall back to the standardEMAIL_FOOTER, consistent with every other email type. A live end-to-end send needs an enterprise license plus SMTP plus an actual budget crossing, so verification asserts the rendered email body directly through the unit tests and a render harness exercising all four call sitesType
🐛 Bug Fix
Changes
The three budget alert templates (soft budget, team soft budget, max budget) hardcoded the
Best, / The LiteLLM teamsignature and had no{email_footer}placeholder, and the four budget.format()calls inbase_email.pynever passedemail_footer=email_params.signature. So theEMAIL_SIGNATUREoverride (and the defaultEMAIL_FOOTER) reached invitation and key emails but was silently dropped on every budget alertThis adds the
{email_footer}placeholder to the three budget templates and passesemail_footer=email_params.signatureat all four budget call sites; the max budget path has two branches (single recipient and multi-threshold) and both are updated.email_params.signaturealready resolves to the customEMAIL_SIGNATUREfor premium instances and the defaultEMAIL_FOOTERotherwise, so budget alerts now match the behavior of the other email types. Five regression tests cover the four paths plus the default-footer fallback; they fail on the pre-fix code and pass with it