Skip to content

v1.24.6

Compare
Choose a tag to compare
@github-actions github-actions released this 17 Feb 05:28
· 7502 commits to main since this release

What's Changed

Group 202 (1)

Usage - Tracking Spend Per Tag

Step 1. Tag your /chat/completions request to litellm proxy

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 -X GET "http://0.0.0.0:4000/spend/tags" \
-H "Authorization: Bearer sk-1234"
[
  {
    "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

Full Changelog: v1.24.5...v1.24.6