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

Aperta
#8,322 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@sanketpatil06 ci sta già lavorando.

Dal 24/11/2026.

  • #8323 di @feiiiiii5 — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
Python
Stelle
22.3k
Fork
4.4k
Merge medio
1g 2h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google/adk-python

Tutte le issue di google/adk-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.