Skip to content

Commit 99ea228

Browse files
DeanChensjcopybara-github
authored andcommitted
fix: Fix InputTokensDetails validation in OpenAI responses test and formatting in a2a_agent_executor
- Add missing `cache_write_tokens=0` to `InputTokensDetails` in `test_openai_responses_llm.py` to fix validation error with newer openai SDK versions. - Remove extra empty line after `END_INTERNAL` in `a2a_agent_executor.py` to prevent double empty lines after Copybara export. Co-authored-by: Shangjie Chen <deanchen@google.com> PiperOrigin-RevId: 945326642
1 parent 2e2ec09 commit 99ea228

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/google/adk/a2a/executor/a2a_agent_executor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
from .utils import execute_after_event_interceptors
4545
from .utils import execute_before_agent_interceptors
4646

47-
4847
logger = logging.getLogger('google_adk.' + __name__)
4948

5049

tests/unittests/labs/openai/test_openai_responses_llm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,9 @@ def test_response_parsing_accepts_openai_sdk_response_types():
672672
status='completed',
673673
usage=ResponseUsage(
674674
input_tokens=3,
675-
input_tokens_details=InputTokensDetails(cached_tokens=1),
675+
input_tokens_details=InputTokensDetails(
676+
cached_tokens=1, cache_write_tokens=0
677+
),
676678
output_tokens=5,
677679
output_tokens_details=OutputTokensDetails(reasoning_tokens=2),
678680
total_tokens=8,

0 commit comments

Comments
 (0)