Skip to content

GoogleVertexMaasProvider

Namespace: Vercel.AI.Google

public sealed class GoogleVertexMaasProvider

Vertex MaaS OpenAI-compatible endpoint.

Inheritance: object

View source

GoogleVertexMaasProvider(string, string?, string?, HttpMessageHandler?)

Section titled “GoogleVertexMaasProvider(string, string?, string?, HttpMessageHandler?)”
public GoogleVertexMaasProvider(string project, string? location, string? baseUrl = null, HttpMessageHandler? handler = null)

Creates a provider. The OpenAI-compatible client is created on first use.

Parameters

Name Type Description
project string
location string
baseUrl string
handler HttpMessageHandler

View source

GoogleVertexMaasProvider(GoogleVertexPartnerOptions, HttpMessageHandler?)

Section titled “GoogleVertexMaasProvider(GoogleVertexPartnerOptions, HttpMessageHandler?)”
public GoogleVertexMaasProvider(GoogleVertexPartnerOptions options, HttpMessageHandler? handler = null)

Creates a provider. <code class=“paramref”>handler</code> sends the request after the auth headers are added.

Parameters

Name Type Description
options GoogleVertexPartnerOptions
handler HttpMessageHandler

View source

public string BaseUrl { get; }

OpenAI-compatible base URL.

Value: string

View source

public bool ClientCreated { get; }

True after LanguageModel(string) has created the inner provider.

Value: bool

View source

public string Location { get; }

Location. Defaults to global.

Value: string

View source

public string Project { get; }

Project id.

Value: string

View source

public ILanguageModel LanguageModel(string modelId)

Returns a chat model and caches the inner provider.

Parameters

Name Type Description
modelId string

Returns: ILanguageModel

View source

public static JsonObject TransformBody(string modelId, JsonObject body)

Sets Llama 4 max_tokens when the caller did not.

Parameters

Name Type Description
modelId string
body JsonObject

Returns: JsonObject

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product