Summary
Support google-vertex as a valid api type in MODEL_APIS to enable Vertex AI Express authentication via API key.
Problem to solve
The pi-ai library already ships a google-vertex provider with streamGoogleVertex and createClientWithApiKey, which supports Vertex AI Express using a simple API key (no service account or ADC required). However, OpenClaw's MODEL_APIS array and JSON schema do not include "google-vertex" as a valid api type, so any provider configured with "api": "google-vertex" fails config validation and is rejected.
Proposed solution
Add "google-vertex" to the MODEL_APIS array in src/config/types.models.ts and to the two corresponding enum arrays in src/config/schema.base.generated.ts. This allows users to configure a provider with "api": "google-vertex" and an apiKey field to use Vertex AI Express without service account credentials.
Alternatives considered
Using google-generative-ai api type instead — does not work because it calls GoogleGenAI without vertexai: true, so the SDK uses AI Studio URLs instead of Vertex AI endpoints.
Impact
Affected: Any user wanting to use Google Vertex AI Express (API key-based auth)
Severity: Blocks workflow — config validation rejects the provider entirely
Frequency: Always
Consequence: Users cannot use Vertex AI Express models (Gemini 2.5 Pro, 3.1 Pro, etc.) via API key auth
Evidence/examples
The google-vertex provider is already registered in pi-ai's register-builtins.js (line 246: api: "google-vertex", stream: streamGoogleVertex). The fix is purely additive — 3 lines across 2 files.
Additional information
The change is fully backward-compatible. No existing config keys are affected. A provider using this api type requires an apiKey field and the Vertex AI Express endpoint (https://aiplatform.googleapis.com/v1).
Summary
Support google-vertex as a valid api type in MODEL_APIS to enable Vertex AI Express authentication via API key.
Problem to solve
The pi-ai library already ships a
google-vertexprovider withstreamGoogleVertexandcreateClientWithApiKey, which supports Vertex AI Express using a simple API key (no service account or ADC required). However, OpenClaw'sMODEL_APISarray and JSON schema do not include"google-vertex"as a valid api type, so any provider configured with"api": "google-vertex"fails config validation and is rejected.Proposed solution
Add
"google-vertex"to theMODEL_APISarray insrc/config/types.models.tsand to the two corresponding enum arrays insrc/config/schema.base.generated.ts. This allows users to configure a provider with"api": "google-vertex"and anapiKeyfield to use Vertex AI Express without service account credentials.Alternatives considered
Using
google-generative-aiapi type instead — does not work because it calls GoogleGenAI withoutvertexai: true, so the SDK uses AI Studio URLs instead of Vertex AI endpoints.Impact
Affected: Any user wanting to use Google Vertex AI Express (API key-based auth)
Severity: Blocks workflow — config validation rejects the provider entirely
Frequency: Always
Consequence: Users cannot use Vertex AI Express models (Gemini 2.5 Pro, 3.1 Pro, etc.) via API key auth
Evidence/examples
The google-vertex provider is already registered in pi-ai's
register-builtins.js(line 246:api: "google-vertex", stream: streamGoogleVertex). The fix is purely additive — 3 lines across 2 files.Additional information
The change is fully backward-compatible. No existing config keys are affected. A provider using this api type requires an
apiKeyfield and the Vertex AI Express endpoint (https://aiplatform.googleapis.com/v1).