@nilskluewer/pi-anthropic-vertex-enterprise-agent-platform

Anthropic Claude models on Google Cloud Vertex AI / Gemini Enterprise Agent Platform for pi.

Packages

Package details

extension

Install @nilskluewer/pi-anthropic-vertex-enterprise-agent-platform from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@nilskluewer/pi-anthropic-vertex-enterprise-agent-platform
Package
@nilskluewer/pi-anthropic-vertex-enterprise-agent-platform
Version
0.1.0
Published
Jul 9, 2026
Downloads
27/mo · 27/wk
Author
nilskluewer
License
MIT
Types
extension
Size
20.8 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/anthropic-vertex-enterprise-agent-platform.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@nilskluewer/pi-anthropic-vertex-enterprise-agent-platform

npm

Overview

Use Anthropic Claude models through Google Cloud Vertex AI / Gemini Enterprise Agent Platform in pi.

The extension creates an AnthropicVertex client and delegates streaming to Pi's built-in anthropic-messages implementation, so Pi still handles tools, prompt caching, thinking blocks, partial JSON streaming, usage tracking, and cost calculation.

Getting Started

pi install npm:@nilskluewer/pi-anthropic-vertex-enterprise-agent-platform
pi
/setup-vertexai your-project-id eu
/model anthropic-vertex/claude-sonnet-5

Structure

.
├── extensions/
│   └── anthropic-vertex-enterprise-agent-platform.ts  # Pi extension entry point
├── LICENSE
├── README.md
└── package.json                                      # npm and Pi package manifest

Setup

Requirements:

  • Google Cloud project with the Vertex AI API enabled.
  • Claude models enabled in Model Garden / Gemini Enterprise Agent Platform.
  • gcloud CLI installed for Google Application Default Credentials.

Run the Pi setup command after installing the package:

/setup-vertexai <google-cloud-project> [location]

Example:

/setup-vertexai my-project-id eu

The command stores the project and location in Pi's user config directory and checks Google Application Default Credentials. If credentials are missing in interactive mode, it can run:

gcloud auth application-default login

Environment variables override the saved setup:

Name Description Default
GOOGLE_CLOUD_PROJECT Google Cloud project ID used by Vertex AI. Saved setup value
ANTHROPIC_VERTEX_PROJECT_ID Claude Code compatible fallback project ID. Optional
GCLOUD_PROJECT Fallback project ID if the values above are not set. Optional
GOOGLE_CLOUD_LOCATION Vertex AI region or multi-region. Use eu for the EU multi-region endpoint. Saved setup value or eu
CLOUD_ML_REGION Claude Code compatible fallback region. Optional
VERTEX_REGION Additional fallback region. Optional

Run

Try the package without adding it to your settings:

pi -e npm:@nilskluewer/pi-anthropic-vertex-enterprise-agent-platform

Use any Claude model exposed by Pi's built-in Anthropic model list and enabled in your Vertex AI project. These models are verified with this package:

pi --provider anthropic-vertex --model claude-fable-5
pi --provider anthropic-vertex --model claude-sonnet-5
pi --provider anthropic-vertex --model claude-opus-4-8

The extension registers Claude model metadata from Pi's built-in Anthropic provider at runtime. If Pi adds newer Claude models and they are enabled in your Vertex AI project, they can be used through this provider as well.

For the eu and us multi-regions, Vertex AI uses aiplatform.<region>.rep.googleapis.com endpoints. The package defaults to eu; set another location in /setup-vertexai or GOOGLE_CLOUD_LOCATION when you need a specific supported region such as us-east5.

License

MIT