Skip to content

AzureOpenAIOptions

Namespace: Vercel.AI.Azure

public sealed class AzureOpenAIOptions

Azure OpenAI settings.

Inheritance: object

View source

public string? ApiKey { get; set; }

Explicit key. Falls back to AZURE_API_KEY.

Value: string

View source

public string ApiVersion { get; set; }

API version query parameter. Defaults to v1, also when set to null or empty.

Value: string

View source

public string? BaseUrl { get; set; }

Resource host, for example https://my-resource.openai.azure.com.

Value: string

View source

public Dictionary<string, string> Headers { get; }

Headers copied onto every request.

Value: Dictionary<string, string>

View source

public string? ResourceName { get; set; }

Resource name used when BaseUrl is empty. Must be a single DNS label (letters, digits, and hyphens).

Value: string

View source

public Func<string>? TokenProvider { get; set; }

Microsoft Entra token provider. Each call receives a fresh bearer token.

Value: Func<string>

View source

public bool UseDeploymentBasedUrls { get; set; }

Uses the legacy /openai/deployments/{deploymentId}{path} routes instead of /openai/v1{path}.

Value: bool

View source

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