openclaw - ✅(Solved) Fix [Feature]: Add google-vertex as a supported api type for Vertex AI Express (API key auth) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#55572Fetched 2026-04-08 01:37:48
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
referenced ×2cross-referenced ×1

Support google-vertex as a valid api type in MODEL_APIS to enable Vertex AI Express authentication via API key.

Root Cause

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.

Fix Action

Fixed

PR fix notes

PR #55576: feat(config): add google-vertex as a supported api type

Description (problem / solution / changelog)

Summary

Add "google-vertex" to MODEL_APIS and the two corresponding JSON schema enum arrays, enabling providers to use Vertex AI Express with API key authentication.

What changed

  • src/config/types.models.ts — added "google-vertex" to MODEL_APIS array
  • src/config/schema.base.generated.ts — added "google-vertex" to both api type enum arrays

3 lines total, purely additive.

Why

The pi-ai library already registers streamGoogleVertex under the "google-vertex" api type in register-builtins.js. OpenClaw's config validation was the only thing blocking its use — MODEL_APIS didn't include it, so any provider with "api": "google-vertex" failed validation.

This enables Vertex AI Express: users can authenticate with a plain API key instead of a service account or ADC.

Backward compatibility

No existing config keys are affected. Fully additive change.

Closes #55572

Changed files

  • src/config/schema.base.generated.ts (modified, +2/-0)
  • src/config/types.models.ts (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

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).

extent analysis

Fix Plan

To support Google Vertex AI Express authentication via API key, we need to add "google-vertex" to the MODEL_APIS array and the corresponding enum arrays. Here are the steps:

  • Add "google-vertex" to the MODEL_APIS array in src/config/types.models.ts:
export const MODEL_APIS = [
  // ... existing api types ...
  'google-vertex',
];
  • Add "google-vertex" to the enum arrays in src/config/schema.base.generated.ts:
export enum ApiType {
  // ... existing api types ...
  GoogleVertex = 'google-vertex',
}
  • Ensure the google-vertex provider is configured with an apiKey field and the Vertex AI Express endpoint (https://aiplatform.googleapis.com/v1).

Verification

To verify the fix, create a provider with "api": "google-vertex" and an apiKey field, and check that config validation passes. Then, test the provider by making a request to the Vertex AI Express endpoint using the apiKey for authentication.

Extra Tips

  • Make sure to update the documentation to reflect the new supported API type.
  • Consider adding error handling for cases where the apiKey is invalid or missing.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Feature]: Add google-vertex as a supported api type for Vertex AI Express (API key auth) [1 pull requests, 1 participants]