Skip to content

Add google-vertex-openapi provider for third-party models (GLM) #10304

@leehack

Description

@leehack

Problem

The existing google-vertex provider uses the official SDK and only supports Google's native models (Gemini). Third-party models like GLM-4.7 from ZhipuAI are available on Vertex AI but require access through the OpenAPI-compatible endpoint with different authentication (gcloud ADC or service account instead of the official SDK).

Requested Solution

Add a new google-vertex-openapi provider that:

  1. Uses the OpenAPI-compatible endpoint on Vertex AI
  2. Supports Application Default Credentials (ADC) via google-auth-library
  3. Works with "gcloud auth application-default login" or service account authentication
  4. Allows configuring project ID and location via config or environment variables
  5. Is configurable for third-party models like GLM-4.7

Use Cases

  • Users with GLM-4.7 models deployed on Vertex AI
  • Other third-party models available via Vertex Model Garden
  • Users who prefer gcloud ADC authentication over service account management

Alternative Solutions Considered

  • Use the existing google-vertex provider: Does not work for third-party models
  • Add models directly to models.dev API: Requires API access
  • Create an auth plugin: Plugins cannot add new providers, only modify existing ones

Additional Context

This follows the existing custom loader pattern in provider.ts.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions