What's Changed
* [Docs] Show how to use litellm GHCR as a base image by ishaan-jaff in https://github.com/BerriAI/litellm/pull/2019
* ✨ Allow to configure scopes in generic SSO by Lunik in https://github.com/BerriAI/litellm/pull/2020
* [FEAT] Generic SSO - allow user to specify attribute names by ishaan-jaff in https://github.com/BerriAI/litellm/pull/2021
* fix(utils.py): support image gen logging to langfuse by krrishdholakia in https://github.com/BerriAI/litellm/pull/2025
* [FEAT] Track spend per tag by ishaan-jaff in https://github.com/BerriAI/litellm/pull/2004
* [FEAT] View spend per tag by ishaan-jaff in https://github.com/BerriAI/litellm/pull/2012
![Group 202 (1)](https://github.com/BerriAI/litellm/assets/29436595/1deb1a09-9478-4c44-85be-add180dd20b5)
Usage - Tracking Spend Per Tag
Step 1. Tag your /chat/completions request to litellm proxy
curl
curl --location 'http://0.0.0.0:8000/chat/completions' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "what llm are you"
}
],
"metadata": {"tags": ["model-anthropic-claude-v2.1", "app-ishaan-prod"]}
}'
Step 2. View spend per tag
curl
curl -X GET "http://0.0.0.0:4000/spend/tags" \
-H "Authorization: Bearer sk-1234"
json
[
{
"individual_request_tag": "model-anthropic-claude-v2.1",
"log_count": 6,
"total_spend": 0.000672
},
{
"individual_request_tag": "app-ishaan-local",
"log_count": 4,
"total_spend": 0.000448
},
{
"individual_request_tag": "app-ishaan-prod",
"log_count": 2,
"total_spend": 0.000224
}
]
New Contributors
* Lunik made their first contribution in https://github.com/BerriAI/litellm/pull/2020
**Full Changelog**: https://github.com/BerriAI/litellm/compare/v1.24.5...v1.24.6