mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-11 08:38:24 +00:00
test(responses): assert deduplication preserves the input list
This commit is contained in:
parent
561e0f4d1d
commit
b52585e276
1 changed files with 5 additions and 1 deletions
|
|
@ -192,6 +192,8 @@ class TestRestoreDropsDuplicateReplayedCopies:
|
|||
{"role": "user", "content": "again"},
|
||||
]
|
||||
result = ResponsesAPIRequestUtils.restore_encrypted_content_item_ids_in_input(request_input)
|
||||
assert result is not request_input
|
||||
assert len(request_input) == 4
|
||||
reasoning = [i for i in result if isinstance(i, dict) and i.get("type") == "reasoning"]
|
||||
assert len(reasoning) == 1
|
||||
assert reasoning[0]["id"] == "rs_dup"
|
||||
|
|
@ -515,7 +517,9 @@ async def test_encrypted_content_affinity_bypasses_rpm_limits():
|
|||
|
||||
# Extract the replayable item from the first response output
|
||||
replayed_item = _extract_encrypted_item(first_response)
|
||||
assert replayed_item["id"] == "rs_encrypted_must_pin", f"Expected the provider's item ID, got {replayed_item['id']!r}"
|
||||
assert replayed_item["id"] == "rs_encrypted_must_pin", (
|
||||
f"Expected the provider's item ID, got {replayed_item['id']!r}"
|
||||
)
|
||||
assert replayed_item["encrypted_content"].startswith("litellm_enc:")
|
||||
|
||||
# Follow-up replaying the wrapped item — should pin to same deployment
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue