What happened?
When creating an agent via the agents-cli create command and setting the default region to a multi-region endpoint like "eu" to use Gemini 3.X models, the agents cli deploy command for cloud run deployments fails. It tries to deploy the cloud run resource to the "eu" regionm but Cloud run cannot be deployed to the multi-region locations like "eu". The error users get is non-intuitive
Steps to Reproduce
- Run
agents-cli create. Select deployment target as "cloud run" and default region as "eu"
- Deploy the agent via
agents-cli deploy
What did you expect to happen?
The agents-cli command should give the user an error message that it cannot deploy cloud run to a multi-region location and that they should specify the single region they want cloud run to be deployed to.
Client information
Client Information
CLI version: 1.3.1
CLI install path: REDACTED
OS info: macOS-15.7.7-x86_64-i386-64bit-Mach-O
Installed skills: none
Project root: REDACTED
Project name: REDACTED
Deployment target: cloud_run
Agent directory: app
Region: eu
A2A: yes
Command Output / Logs
Deploying to Google Cloud project 'REDACTED'. Proceed? [Y/n]:
▸ gcloud run deploy agents-cli-poc --project REDACTED --region eu --source . --memory 4Gi --cpu 1 --min-instances 1 --max-instances 10 --concurrency 8 --no-allow-unauthenticated --no-cpu-throttling --update-env-vars 'GOOGLE_GENAI_USE_VERTEXAI=***,GOOGLE_CLOUD_PROJECT=***,GOOGLE_CLOUD_LOCATION=***,AGENT_VERSION=***,ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=***,APP_URL=***' --labels 'created-by=***'
ERROR: Error in retrieving repository from Artifact Registry.
ERROR: (gcloud.run.deploy) INVALID_ARGUMENT: Request contains an invalid argument.
agents-cli v1.3.1
Error: Cloud Run deployment failed (exit code 1)
Anything else we need to know?
Prompting the deploy command with a single region works
agents-cli deploy --region europe-west4
Proposal is to verify the region variable in cmd_deploy and throw a click.ClickException when the there is multi-region location set as default.
|
region = region or cfg.region |
I am open to make this change in a PR to agents-cli
What happened?
When creating an agent via the
agents-cli createcommand and setting the default region to a multi-region endpoint like "eu" to use Gemini 3.X models, theagents cli deploycommand for cloud run deployments fails. It tries to deploy the cloud run resource to the "eu" regionm but Cloud run cannot be deployed to the multi-region locations like "eu". The error users get is non-intuitiveSteps to Reproduce
agents-cli create. Select deployment target as "cloud run" and default region as "eu"agents-cli deployWhat did you expect to happen?
The
agents-clicommand should give the user an error message that it cannot deploy cloud run to a multi-region location and that they should specify the single region they want cloud run to be deployed to.Client information
Client Information
CLI version: 1.3.1
CLI install path: REDACTED
OS info: macOS-15.7.7-x86_64-i386-64bit-Mach-O
Installed skills: none
Project root: REDACTED
Project name: REDACTED
Deployment target: cloud_run
Agent directory: app
Region: eu
A2A: yes
Command Output / Logs
Anything else we need to know?
Prompting the deploy command with a single region works
Proposal is to verify the
regionvariable incmd_deployand throw a click.ClickException when the there is multi-region location set as default.agents-cli/src/google/agents/cli/deploy/cmd_deploy.py
Line 493 in 5a306f8
I am open to make this change in a PR to agents-cli