Skip to content

fix(web): avoid eval history crash when toolUses is null#4660

Open
pandego wants to merge 1 commit intogoogle:mainfrom
pandego:fix/4657-eval-history-tooluses-null-guard
Open

fix(web): avoid eval history crash when toolUses is null#4660
pandego wants to merge 1 commit intogoogle:mainfrom
pandego:fix/4657-eval-history-tooluses-null-guard

Conversation

@pandego
Copy link

@pandego pandego commented Feb 28, 2026

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

2. Or, if no issue exists, describe the change:

Problem:
Failed eval history entries can crash the web UI when intermediateData.toolUses is missing/null. formatToolUses currently iterates directly over that value and throws TypeError: e is not iterable.

Solution:
Add a null guard in formatToolUses so missing toolUses is treated as an empty list.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Passed locally:

  • .venv/bin/pytest tests/unittests/evaluation/test_eval_config.py
  • Result: 7 passed

Manual End-to-End (E2E) Tests:

Not run in this environment. This patch is a minimal defensive guard on the affected formatter path.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

This is intentionally minimal (1-line behavior change) to reduce risk and keep review focused.

@gemini-code-assist
Copy link
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@adk-bot adk-bot added the web [Component] This issue will be transferred to adk-web label Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

web [Component] This issue will be transferred to adk-web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Playground eval history: clicking failed eval result crashes with 'e is not iterable' in formatToolUses

2 participants