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

Offen
#8,322 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 3 Tagen

@sanketpatil06 arbeitet bereits daran.

Seit 24.11.2026.

  • #8323 von @feiiiiii5 — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
22.3k
Forks
4.4k
Ø Merge
1 T. 2 Std.
Gemergte PRs (30 T.)
6

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus google/adk-python

Alle Issues in google/adk-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.