AI News Daily한국어
← AI tool tips
Codex✓ Confirmed in official docsAdded Nov 10

How to run Codex on Google Cloud Vertex AI models with the gcp provider

Codex has a built-in gcp provider for Google Cloud Vertex AI. Use it when you want Codex to run on a model your own Google Cloud project can access.

  1. Install the Google Cloud CLI on the machine running Codex and sign in with Application Default Credentials (ADC). Codex runs gcloud auth application-default print-access-token to get access tokens.
gcloud auth application-default login
  1. Add the provider to ~/.codex/config.toml.
model_provider = "gcp"

[model_providers.gcp]
project_id = "my-project"
location = "global"

If you omit project_id or location, Codex reads GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_LOCATION respectively, and location defaults to global. To use a specific ADC file, set credential_file under [model_providers.gcp] to its absolute path.

  1. Starting with 0.167.0, you can also connect through a setup wizard on the sign-in screen instead of editing the config file. It's off by default, so turn the feature on first.
codex features enable gcp_setup_wizard

On the sign-in screen, choose "Sign in another way" and Google Cloud Vertex AI appears next to API key and Amazon Bedrock. Enter a project ID, a location and a credential file. Location and credential file are optional; leave the credential file blank to use ADC.

  1. Starting with 0.167.2, Codex sends tool updates incrementally by default on Vertex AI. To opt out, add one line under [features] in config.toml.
[features]
incremental_tools_legacy_gcp = false

Get notified when a new tip lands

Tip alerts only go out in the app. Install it and turn notifications on.

Get the app

All tips →