Using GCP Vertex AI With Kilo Code
Kilo Code supports accessing models through Google Cloud Platform's Vertex AI, a managed machine learning platform that provides access to various foundation models, including Anthropic's Claude family.
Website: https://cloud.google.com/vertex-ai
Prerequisites
- Google Cloud Account: You need an active Google Cloud Platform (GCP) account.
- Project: You need a GCP project with the Vertex AI API enabled.
- Model Access: You must request and be granted access to the specific Claude models on Vertex AI you want to use. See the Google Cloud documentation for instructions.
- Application Default Credentials (ADC): Kilo Code uses Application Default Credentials to authenticate with Vertex AI. The easiest way to set this up is to:
- Install the Google Cloud CLI: https://cloud.google.com/sdk/docs/install
- Authenticate using:
gcloud auth application-default login
- Service Account Key (Alternative): Alternatively, you can authenticate using a Google Cloud Service Account key file. You'll need to generate this key in your GCP project. See the Google Cloud documentation on creating service account keys.
Configuration in Kilo Code
Open Settings (gear icon) and go to the Providers tab to add GCP Vertex AI. The extension uses Google Application Default Credentials (ADC) for authentication — run gcloud auth application-default login before adding the provider. Set your project ID and region in the provider settings.
The extension stores this in your kilo.json config file. You can also edit the config file directly — see the CLI tab for the file format.
Tips and Notes
- Permissions: Ensure your Google Cloud account has the necessary permissions to access Vertex AI and the specific models you want to use.
- Prompt caching: Claude models served through Vertex AI support Kilo prompt caching. Kilo applies Anthropic cache controls and tracks cache write/read tokens when Vertex reports them. Native Vertex Gemini models use Google's implicit server-side caching; no extra Kilo configuration is required, and Gemini may not report cache write tokens.
- Pricing: Refer to the Vertex AI pricing page for details.