BerriAI / litellm

Python SDK, Proxy Server (LLM Gateway) to call 100+ LLM APIs in OpenAI format - [Bedrock, Azure, OpenAI, VertexAI, Cohere, Anthropic, Sagemaker, HuggingFace, Replicate, Groq]
https://docs.litellm.ai/docs/
Other
13.69k stars 1.61k forks source link

[Feature]: Store abbreviated string of sk-key (sk-...<last-3-digits>) like openai in db #1614

Closed krrishdholakia closed 9 months ago

krrishdholakia commented 9 months ago

The Feature

Store the abbreviated string of sk-key in db like openai does (can do this in the token and spend logs table)

Screenshot 2024-01-25 at 9 49 39 AM

Motivation, pitch

easier for app owner viewing their spend logs to know which sk-key is causing a high spend

Twitter / LinkedIn details

No response

krrishdholakia commented 9 months ago

Checking with users if this is something they'd want

krrishdholakia commented 9 months ago

Seems like this should be opt-in.

Since this is for key-owners happiness, and we already gate key-owner specific permissions behind allow_user_auth - https://docs.litellm.ai/docs/proxy/ui#step-2-enable-user-auth

We can gate this feature behind that too.

krrishdholakia commented 9 months ago

Live in v1.20.0