Skip to content

adk eval help message loses newlines in docstring formatting #4257

@ftnext

Description

@ftnext

Describe the bug

Docstrings containing structured/formatted text (such as tree diagrams or lists) lose their newlines when rendered in --help output. This is because Click's help formatter rewraps text by default, collapsing intentional line breaks into spaces.
See https://click.palletsprojects.com/en/8.1.x/documentation/#preventing-rewrapping

To Reproduce

  1. adk eval --help

Expected behavior

The help output should preserve the newlines and indentation of the tree diagram:

sample_eval_set_file.json:
    |....... eval_1
    |....... eval_2
    |....... eval_3
    |....... eval_4
    |....... eval_5

Screenshots

Image

Desktop (please complete the following information):

  • OS: macOS
  • Python version(python -V): Python 3.13.8
  • ADK version(pip show google-adk): 1.23.0

Model Information:

  • Are you using LiteLLM: -
  • Which model is being used: -

Additional context

The fix is straightforward: add \b on a line by itself before the formatted block

TEST MODES:
\b
replay : Verifies agent interactions match previously recorded behaviors
exactly. Compares LLM requests/responses and tool calls/results.
live : Runs evaluation-based verification (not yet implemented)
DIRECTORY STRUCTURE:
Test cases must follow this structure:
\b
category/
test_name/
spec.yaml # Test specification
generated-recordings.yaml # Recorded interactions (replay mode)
generated-session.yaml # Session data (replay mode)
EXAMPLES:
\b
# Run all tests in current directory's 'tests' folder
adk conformance test
\b
# Run tests from specific folders
adk conformance test tests/core tests/tools
\b
# Run a single test case
adk conformance test tests/core/description_001
\b
# Run in live mode (when available)
adk conformance test --mode=live tests/core

Metadata

Metadata

Assignees

Labels

eval[Component] This issue is related to evaluation

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions