agents-cli icon indicating copy to clipboard operation
agents-cli copied to clipboard

When setting default region to eu, infrastructure deployment fails

Open avinashpancham opened this issue 3 months ago • 2 comments

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" region but Cloud run cannot be deployed to multi-region locations like "eu". The error users get is non-intuitive

Steps to Reproduce

  1. Run agents-cli create. Select deployment target as "cloud run" and default region as "eu"
  2. 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 there is a multi-region location set as default. https://github.com/google/agents-cli/blob/5a306f8956cb1eeae69f9709de0e4d61b44e11e7/src/google/agents/cli/deploy/cmd_deploy.py#L493

I am open to make this change in a PR to agents-cli

avinashpancham avatar Aug 16 '26 18:08 avinashpancham

Thanks for flagging this @avinashpancham , we will look into it and update you

asrujana-44 avatar Aug 21 '26 19:08 asrujana-44

Thanks once again for flagging this @avinashpancham, this will be fixed in the next release.

pwkowalski avatar Sep 01 '26 16:09 pwkowalski