When setting default region to eu, infrastructure deployment fails
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
- 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 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
Thanks for flagging this @avinashpancham , we will look into it and update you
Thanks once again for flagging this @avinashpancham, this will be fixed in the next release.