Summary
agents-cli deploy to --deployment-target agent_runtime (Vertex AI Agent Engine) determines the build/runtime Python version from the interpreter that runs the CLI itself, not from the target project's Python. When agents-cli is installed as a uv tool under a Python that some required dependency doesn't support yet, the server-side build fails with only a generic error. Concretely, with the CLI running on Python 3.14, the build fails because litellm (a transitive dependency of google-adk) has no 3.14-compatible release. This also builds on a Python version that the generated project's own pyproject.toml requires-python = ">=3.11,<3.14" excludes.
Environment
agents-cli v0.5.0 (installed as a uv tool; uv 0.11.14)
- CLI tool environment interpreter: Python 3.14.5 (machine default)
- Project: scaffolded
adk template, --deployment-target agent_runtime, requires-python = ">=3.11,<3.14"
Repro
- Have
agents-cli installed under Python 3.14 (e.g. uv tool install google-agents-cli on a machine whose default Python is 3.14).
- Scaffold an
adk agent targeting agent_runtime.
agents-cli deploy --project <PROJECT_ID> --update-env-vars "GOOGLE_CLOUD_LOCATION=global,GOOGLE_GENAI_USE_VERTEXAI=True"
Actual
Error: Deployment failed: {'code': 3, 'message': 'Build failed. The issue might be caused by incorrect code, requirements.txt file or other dependencies. ...'}
The real error is only visible server-side in Cloud Logging (resource.type="aiplatform.googleapis.com/ReasoningEngine"):
ERROR: Ignored the following versions that require a different python version: ... 1.85.4 Requires-Python >=3.10,<3.14 ...
ERROR: Could not find a version that satisfies the requirement litellm==1.85.4
ERROR: No matching distribution found for litellm==1.85.4
Build install paths confirm the builder ran on 3.14 (.venv/lib/python3.14/..., cp314 wheels).
Expected
The deploy should build on a Python compatible with the project (its .venv / requires-python), or fail fast with a clear message instead of a generic server-side build failure.
Root cause
The Agent Engine SDK derives the build version from the calling interpreter when no override is passed — vertexai/_genai/agent_engines.py:
if python_version:
sys_version = python_version
else:
sys_version = f"{sys.version_info.major}.{sys.version_info.minor}"
agents-cli does not pass python_version, so the build inherits the CLI's own interpreter (3.14). There is no --python-version flag to override it.
Likely a regression in v0.5.0
The same project deployed successfully on agents-cli v0.3.0, with the CLI on the same Python 3.14 tool environment, even though litellm has never supported 3.14. That implies v0.3.0 derived the build Python from the project (≤3.13), and v0.5.0 changed to the sys.version_info fallback. (Stated as an inference from observed behavior, not a code diff.)
Suggested fixes (in order of preference)
- Set the deploy
python_version from the Python the requirements were resolved against (the project .venv / uv.lock).
- Otherwise honor the project's
requires-python upper bound (don't build on an excluded version).
- At minimum, add a
--python-version flag and warn when the build Python differs from the resolution Python.
Workaround
Run the CLI under a supported Python: uvx --python 3.13 --from google-agents-cli agents-cli deploy ..., or durably uv tool install google-agents-cli --python 3.13.
Summary
agents-cli deployto--deployment-target agent_runtime(Vertex AI Agent Engine) determines the build/runtime Python version from the interpreter that runs the CLI itself, not from the target project's Python. Whenagents-cliis installed as auvtool under a Python that some required dependency doesn't support yet, the server-side build fails with only a generic error. Concretely, with the CLI running on Python 3.14, the build fails becauselitellm(a transitive dependency ofgoogle-adk) has no 3.14-compatible release. This also builds on a Python version that the generated project's ownpyproject.tomlrequires-python = ">=3.11,<3.14"excludes.Environment
agents-cliv0.5.0 (installed as auvtool;uv0.11.14)adktemplate,--deployment-target agent_runtime,requires-python = ">=3.11,<3.14"Repro
agents-cliinstalled under Python 3.14 (e.g.uv tool install google-agents-clion a machine whose default Python is 3.14).adkagent targetingagent_runtime.agents-cli deploy --project <PROJECT_ID> --update-env-vars "GOOGLE_CLOUD_LOCATION=global,GOOGLE_GENAI_USE_VERTEXAI=True"Actual
The real error is only visible server-side in Cloud Logging (
resource.type="aiplatform.googleapis.com/ReasoningEngine"):Build install paths confirm the builder ran on 3.14 (
.venv/lib/python3.14/...,cp314wheels).Expected
The deploy should build on a Python compatible with the project (its
.venv/requires-python), or fail fast with a clear message instead of a generic server-side build failure.Root cause
The Agent Engine SDK derives the build version from the calling interpreter when no override is passed —
vertexai/_genai/agent_engines.py:agents-clidoes not passpython_version, so the build inherits the CLI's own interpreter (3.14). There is no--python-versionflag to override it.Likely a regression in v0.5.0
The same project deployed successfully on
agents-cliv0.3.0, with the CLI on the same Python 3.14 tool environment, even thoughlitellmhas never supported 3.14. That implies v0.3.0 derived the build Python from the project (≤3.13), and v0.5.0 changed to thesys.version_infofallback. (Stated as an inference from observed behavior, not a code diff.)Suggested fixes (in order of preference)
python_versionfrom the Python the requirements were resolved against (the project.venv/uv.lock).requires-pythonupper bound (don't build on an excluded version).--python-versionflag and warn when the build Python differs from the resolution Python.Workaround
Run the CLI under a supported Python:
uvx --python 3.13 --from google-agents-cli agents-cli deploy ..., or durablyuv tool install google-agents-cli --python 3.13.