環境変数

GOOGLE_CLOUD_PROJECT

Vertex AIのリクエスト用プロジェクトIDとして使用され、ANTHROPIC_VERTEX_PROJECT_IDよりも高い優先順位で解決されます。

使い方・用途

  • gcloudコマンドのデフォルト設定ではなく、特定のGoogle CloudプロジェクトをClaude Codeの実行時コンテキストとして強制したい場合に設定します。
  • 標準的なApplication Default Credentials(ADC)の解決プロセスの一部として利用されます。
英語原文(公式ドキュメントより)

Claude Code uses ANTHROPIC_VERTEX_PROJECT_ID as the project ID for Vertex AI requests. The GCLOUD_PROJECT and GOOGLE_CLOUD_PROJECT environment variables and the credential file referenced by GOOGLE_APPLICATION_CREDENTIALS take precedence over it. If none of these are set, the project ID is resolved from your gcloud configuration or the attached service account.