Skip to content
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

Update lago.py to accomodate API change #5495

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

rawwerks
Copy link
Contributor

@rawwerks rawwerks commented Sep 4, 2024

external_customer_id is deprecated.

external_subscription_id is the replacement.

closes #5477

Title

Relevant issues

Type

πŸ†• New Feature
πŸ› Bug Fix
🧹 Refactoring
πŸ“– Documentation
πŸš„ Infrastructure
βœ… Test

Changes

[REQUIRED] Testing - Attach a screenshot of any new tests passing locall

If UI changes, send a screenshot/GIF of working UI fixes

external_customer_id is deprecated. 

external_subscription_id is the replacement.
Copy link

vercel bot commented Sep 4, 2024

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 Sep 4, 2024 0:16am

@krrishdholakia
Copy link
Contributor

Hi @rawwerks can you share a screenshot of this working as expected.

My understanding of this doc is that you need to pass in external_subscription_id in addition to external_customer_id

Screenshot 2024-09-03 at 5 31 51 PM

@rawwerks
Copy link
Contributor Author

rawwerks commented Sep 4, 2024

nope, instead of, not in addition to. see the minus sign in that image of the diff?

as @jdenquin wrote here: #5477 (comment) - this is to be used instead of. he can confirm if you don't believe me.

look at https://docs.getlago.com/api-reference/events/usage#send-usage-event, no sign of external_customer_id.

read this thread: https://lago-community.slack.com/archives/C03MCH55EL8/p1725409719662939?thread_ts=1725407568.186619&cid=C03MCH55EL8

external_customer_id is, in @jdenquin 's words "forever null" on new lago installs. this is why i had such a hard time catching it. the field is fully deprecated.

@krrishdholakia
Copy link
Contributor

Got it. Can you confirm the change works for you as expected (screenshot would be great)

@sarkissianraffi
Copy link

Lago founder here. Indeed, the external customer id is no longer supported. To ingest high volume usage and enable multiple subscriptions for the same customer, we ask our users to send the external subscription id instead. Happy to help and guide you if needed

@rawwerks
Copy link
Contributor Author

rawwerks commented Sep 5, 2024

i really need Lago to start using LiteLLM proxy in production...this is a 1 LOC change, when can we expect to be merged?

@krrishdholakia
Copy link
Contributor

Hi @rawwerks merge is blocked on this

Got it. Can you confirm the change works for you as expected (screenshot would be great)

I should've made that clearer

@krrishdholakia krrishdholakia changed the base branch from main to litellm_pr_merges September 6, 2024 00:13
@krrishdholakia krrishdholakia merged commit 14a1621 into BerriAI:litellm_pr_merges Sep 6, 2024
2 checks passed
@krrishdholakia
Copy link
Contributor

merging to a dev branch for testing

@krrishdholakia
Copy link
Contributor

will take care of pushing this pr to prod

krrishdholakia added a commit that referenced this pull request Sep 6, 2024
* Update lago.py to accomodate API change (#5495)

external_customer_id is deprecated. 

external_subscription_id is the replacement.

* fix(lago.py): fixes

\

---------

Co-authored-by: Raymond Weitekamp <19483938+rawwerks@users.noreply.github.com>
ishaan-jaff pushed a commit that referenced this pull request Sep 6, 2024
* Update lago.py to accomodate API change (#5495)

external_customer_id is deprecated. 

external_subscription_id is the replacement.

* fix(lago.py): fixes

\

---------

Co-authored-by: Raymond Weitekamp <19483938+rawwerks@users.noreply.github.com>
@rawwerks
Copy link
Contributor Author

rawwerks commented Sep 6, 2024

great, thank you so much.

i have been having a lot of trouble testing this locally, because it seems to require networking two docker containers together. (which i'm not familiar with)

related: are there specific instructions for using github actions to build the litellm docker image using GitHub Packages? specifically for the lago integration (and probably other callbacks), i think it is probably better to test it out with both the litellm proxy and lago running on separate servers.

building/publishing docker images seems fairly straightforward (https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-docker-images) - but if there are instructions specific to litellm you can provide - that would help me better contribute to the development of the proxy server. (related: https://discord.com/channels/1123360753068540065/1280869330170417243 )

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]: Lago Events Do Not Contain Customer ID
3 participants