mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
style(anthropic): apply repository conventions to the missing-usage change
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
4657d43fb9
commit
10aef224e7
2 changed files with 3 additions and 4 deletions
|
|
@ -586,7 +586,7 @@ class MessageBlockDelta(TypedDict):
|
|||
|
||||
type: Literal["message_delta"]
|
||||
delta: MessageDelta
|
||||
usage: NotRequired[UsageDelta]
|
||||
usage: NotRequired[ReadOnly[UsageDelta]]
|
||||
context_management: NotRequired[ContextManagementResponse]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -580,10 +580,9 @@ def test_text_only_streaming_has_index_zero():
|
|||
|
||||
|
||||
def test_message_delta_without_usage_returns_chunk_with_no_usage():
|
||||
"""A message_delta event may carry no usage field; it must not raise."""
|
||||
iterator = ModelResponseIterator(None, sync_stream=True)
|
||||
iterator: Final = ModelResponseIterator(None, sync_stream=True)
|
||||
|
||||
model_response = iterator.chunk_parser(
|
||||
model_response: Final = iterator.chunk_parser(
|
||||
{
|
||||
"type": "message_delta",
|
||||
"delta": {"stop_reason": "end_turn", "stop_sequence": None},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue