mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(test) setting model in SpendTable logs
This commit is contained in:
parent
5e8a6fd80e
commit
a842e6520c
2 changed files with 6 additions and 0 deletions
|
@ -892,6 +892,10 @@ def get_logging_payload(kwargs, response_obj, start_time, end_time):
|
|||
from pydantic import Json
|
||||
import uuid
|
||||
|
||||
verbose_proxy_logger.debug(
|
||||
f"SpendTable: get_logging_payload - kwargs: {kwargs}\n\n"
|
||||
)
|
||||
|
||||
if kwargs == None:
|
||||
kwargs = {}
|
||||
# standardize this function to be used across, s3, dynamoDB, langfuse logging
|
||||
|
|
|
@ -735,6 +735,7 @@ def test_call_with_key_over_budget(prisma_client):
|
|||
)
|
||||
await track_cost_callback(
|
||||
kwargs={
|
||||
"model": "chatgpt-v-2",
|
||||
"stream": False,
|
||||
"litellm_params": {
|
||||
"metadata": {
|
||||
|
@ -759,6 +760,7 @@ def test_call_with_key_over_budget(prisma_client):
|
|||
|
||||
assert spend_log.request_id == request_id
|
||||
assert spend_log.spend == float("2e-05")
|
||||
assert spend_log.model == "chatgpt-v-2"
|
||||
|
||||
# use generated key to auth in
|
||||
result = await user_api_key_auth(request=request, api_key=bearer_token)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue