Skip to content

[Bug Fix] Invite links email should contain the correct invite id #12130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 28, 2025

Conversation

ishaan-jaff
Copy link
Contributor

@ishaan-jaff ishaan-jaff commented Jun 28, 2025

[Bug Fix] Invite links email should contain the correct invite id

Fixes #11978

Ensure the correct email / invite link is sent when using tf providers or API for inviting users to LiteLLM.

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix
✅ Test

Changes

Copy link

vercel bot commented Jun 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2025 4:17pm

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the bug where invite links in emails were using an incorrect invite ID. It also enhances test coverage for invitation link generation and refactors invitation creation logic across proxy components.

  • Added tests to validate both new and existing invitation handling.
  • Refactored invitation creation in proxy server and email modules.
  • Updated cost configurations to support additional fields.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_litellm/enterprise/enterprise_callbacks/send_emails/test_base_email.py Added tests to verify correct invitation link generation under various scenarios.
litellm/proxy/proxy_server.py Modified invitation creation to leverage a helper and wrapped exceptions with a handler.
litellm/proxy/management_helpers/user_invitation.py Added new helper function for creating invitations with proper error handling.
litellm/model_prices_and_context_window_backup.json Expanded cost configuration fields for new features.
enterprise/litellm_enterprise/enterprise_callbacks/send_emails/base_email.py Refactored invitation link generation with early validations, client availability checks, and improved asynchronous handling.

@ishaan-jaff ishaan-jaff merged commit cfc07f3 into main Jun 28, 2025
14 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: /user/new API doesn't send the correct invitation URL via email
1 participant