Replay rejects a no-argument tool call when recording omits args

Đang mở
#8,322 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@sanketpatil06 đang làm issue này rồi.

Từ ngày 24/11/2026.

  • #8323 của @feiiiiii5 — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

tools

Bug

ReplayPlugin._verify_tool_call_match compares recorded_call.args != tool_args directly. A replay recording that omits args for a no-argument tool loads as FunctionCall.args=None, while the runtime callback receives tool_args={}. The raw comparison rejects a legitimate no-argument tool call with "Tool args mismatch".

Commit 6e448cf5 already fixed the same None-vs-{} class in trajectory_evaluator.py via (call.args or {}), and the two sibling sites (_tool_parameter_match_evaluator.py, _confirmation.py) are correct. This call site was missed.

Repro

On main, offline with a real Recordings/ToolRecording, InvocationContext and fake tool:

recorded args omitted in YAML -> None
runtime tool_args            -> {}
before_tool_callback -> success=False, "Tool args mismatch ... recorded: None current: {}"
same with recorded args={}   -> success=True

Expected

None and {} mean the same thing for a no-argument tool call. A one-line normalization plus regression tests will follow in a PR, per the repository's issue-first policy.

Ngôn ngữ chính
Python
Star
22.3k
Fork
4.4k
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google/adk-python

Tất cả issue của google/adk-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.