What happened?
After upgrading from agents-cli 0.1.3 → 0.3.0 (via agents-cli scaffold upgrade), running agents-cli eval generate against a project that uses VertexAiSearchTool fails with two distinct errors, both caused by incompatibilities between the Vertex AI GenAI Eval SDK (vertexai._genai) introduced in 0.3.0 and ADK 2.x.
Steps to Reproduce
- Start from an agents-cli 0.3.0 project using
google-adk>=2.0.0 and a VertexAiSearchTool in any agent.
- Run:
agents-cli eval generate --dataset tests/eval/datasets/basic-dataset.json
What did you expect to happen?
Expected Behavior
All eval cases run successfully and a traces artifact is written.
Actual Behavior — two errors, 0/N cases succeed
Error 1 — NameError: name 'Optional' is not defined
AgentConfig._get_tool_declarations_from_agent() calls typing.get_type_hints() on every tool. For VertexAiSearchTool (a native ADK tool that exposes _get_declaration() directly) this fails because its underlying class uses from __future__ import annotations with unresolved forward references.
File "...vertexai/_genai/types/evals.py", line 100, in _get_tool_declarations_from_agent
genai_types.FunctionDeclaration.from_callable_with_api_option(
File "...google/genai/types.py", line 4422, in from_callable_with_api_option
annotation_under_future = typing.get_type_hints(callable)
NameError: name 'Optional' is not defined
Root cause: The Eval SDK tries to introspect native ADK tools (which have their own _get_declaration()) as plain Python callables. It should check for _get_declaration and skip get_type_hints in that case.
Error 2 — Invalid app name 'local agent run'
After patching Error 1, every case still fails because _evals_common.py hardcodes app_name = "local agent run" (with spaces) and passes it to ADK's Runner. ADK 2.x introduced strict name validation (^[a-zA-Z][a-zA-Z0-9_-]*$) that rejects spaces.
Value error, Invalid app name 'local agent run': must start with a letter
and can only consist of letters, digits, underscores, and hyphens.
Relevant lines in vertexai/_genai/_evals_common.py:
# line 2337
app_name = session_inputs.app_name or "local agent run"
# line 2340
app_name = "local agent run"
Root cause: The default app name in the Eval SDK pre-dates ADK 2.x's name constraints. Changing "local agent run" → "local_agent_run" would fix it.
Client information
Client Information
Run agents-cli info to output debugging information about your client.
CLI version: 0.3.0
OS info: Windows-11-10.0.26200-SP0
google-adk: 2.1.0
vertexai: 1.153.1
Command Output / Logs
No response
Anything else we need to know?
- Project was upgraded with
agents-cli scaffold upgrade (0.1.3 → 0.3.0). Upgrade itself ran cleanly.
- Both errors affect every eval case — 0/N succeed.
- Workaround for Error 1: inject a static
_get_declaration on the VertexAiSearchTool instance to skip introspection.
- Workaround for Error 2: monkey-patch
validate_app_name in app/_setup.py to sanitize spaces.
- Both workarounds are fragile; upstream fixes in either the Eval SDK or ADK are the clean solution.
What happened?
After upgrading from
agents-cli0.1.3 → 0.3.0 (viaagents-cli scaffold upgrade), runningagents-cli eval generateagainst a project that usesVertexAiSearchToolfails with two distinct errors, both caused by incompatibilities between the Vertex AI GenAI Eval SDK (vertexai._genai) introduced in 0.3.0 and ADK 2.x.Steps to Reproduce
google-adk>=2.0.0and aVertexAiSearchToolin any agent.agents-cli eval generate --dataset tests/eval/datasets/basic-dataset.jsonWhat did you expect to happen?
Expected Behavior
All eval cases run successfully and a traces artifact is written.
Actual Behavior — two errors, 0/N cases succeed
Error 1 —
NameError: name 'Optional' is not definedAgentConfig._get_tool_declarations_from_agent()callstyping.get_type_hints()on every tool. ForVertexAiSearchTool(a native ADK tool that exposes_get_declaration()directly) this fails because its underlying class usesfrom __future__ import annotationswith unresolved forward references.Root cause: The Eval SDK tries to introspect native ADK tools (which have their own
_get_declaration()) as plain Python callables. It should check for_get_declarationand skipget_type_hintsin that case.Error 2 —
Invalid app name 'local agent run'After patching Error 1, every case still fails because
_evals_common.pyhardcodesapp_name = "local agent run"(with spaces) and passes it to ADK'sRunner. ADK 2.x introduced strict name validation (^[a-zA-Z][a-zA-Z0-9_-]*$) that rejects spaces.Relevant lines in
vertexai/_genai/_evals_common.py:Root cause: The default app name in the Eval SDK pre-dates ADK 2.x's name constraints. Changing
"local agent run"→"local_agent_run"would fix it.Client information
Client Information
Run
agents-cli infoto output debugging information about your client.CLI version: 0.3.0
OS info: Windows-11-10.0.26200-SP0
google-adk: 2.1.0
vertexai: 1.153.1
Command Output / Logs
No response
Anything else we need to know?
agents-cli scaffold upgrade(0.1.3 → 0.3.0). Upgrade itself ran cleanly._get_declarationon theVertexAiSearchToolinstance to skip introspection.validate_app_nameinapp/_setup.pyto sanitize spaces.