Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions python/packages/core/agent_framework/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,9 @@ def _has_reasoning_text_marker(additional_properties: Mapping[str, Any]) -> bool
def add_usage_details(usage1: UsageDetails | None, usage2: UsageDetails | None) -> UsageDetails:
"""Add two UsageDetails dictionaries by summing all numeric values.

If any of the two usage details contains a key with a non-int value, it will be skipped,
even if the other contains a int-value on that key.
Missing keys and ``None`` values contribute zero. If either dictionary contains
a non-integer value other than ``None`` for a key, that key is skipped even if
the other value is an integer. Boolean values are also skipped.

Args:
usage1: First usage details dictionary.
Expand Down
Loading