forked from phoenix/litellm-mirror
add testing for spend logs payload
This commit is contained in:
parent
43d483db5b
commit
46d5aae2ae
2 changed files with 6 additions and 0 deletions
|
@ -118,6 +118,8 @@ class AnthropicPassthroughLoggingHandler:
|
|||
|
||||
# set litellm_call_id to logging response object
|
||||
litellm_model_response.id = logging_obj.litellm_call_id
|
||||
litellm_model_response.model = model
|
||||
logging_obj.model_call_details["model"] = model
|
||||
return kwargs
|
||||
|
||||
@staticmethod
|
||||
|
|
|
@ -150,6 +150,8 @@ async def test_anthropic_basic_completion_with_headers():
|
|||
"user_api_key" in log_entry["metadata"]
|
||||
), "Should have user API key in metadata"
|
||||
|
||||
assert "claude" in log_entry["model"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_anthropic_streaming_with_headers():
|
||||
|
@ -257,3 +259,5 @@ async def test_anthropic_streaming_with_headers():
|
|||
assert (
|
||||
"user_api_key" in log_entry["metadata"]
|
||||
), "Should have user API key in metadata"
|
||||
|
||||
assert "claude" in log_entry["model"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue