mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
test(proxy): pass the read response to the non-inference predicate
The poller test called is_unbilled_non_inference_call with the pre-background signature, so it broke when the predicate gained the response it classifies. It now hands the predicate a foreground read, and asserts that the same read is free without the origin stamp, so the stamp is what the test proves.
This commit is contained in:
parent
093bb642cf
commit
d77825bfa8
1 changed files with 3 additions and 1 deletions
|
|
@ -787,5 +787,7 @@ class TestCheckResponsesCost:
|
|||
await check_responses_cost_instance.check_responses_cost()
|
||||
|
||||
metadata = mock_aget.call_args[1]["litellm_metadata"]
|
||||
foreground_read = {"background": False}
|
||||
assert metadata[INTERNAL_CALL_ORIGIN_METADATA_KEY] == "background_response_cost_poll"
|
||||
assert is_unbilled_non_inference_call("aget_responses", metadata) is False
|
||||
assert is_unbilled_non_inference_call("aget_responses", metadata, foreground_read) is False
|
||||
assert is_unbilled_non_inference_call("aget_responses", None, foreground_read) is True
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue