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

未關閉
#8,322 1 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 3 天內回覆

@sanketpatil06 已經在處理了。

開始於 2026年11月24日。

  • #8323 來自 @feiiiiii5 —— 未關閉

評估

這個 Issue 還沒有評估資料。

描述

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.

主要語言
Python
星號
22.3k
分支
4.4k
平均合併
1 天 2 小時
30 天內合併 PR
6

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

google/adk-python 的其他 Issue

查看 google/adk-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。