Skip to content

OpenAiCompatibleModelOptions

Namespace: E2E

public sealed class OpenAiCompatibleModelOptions

Inheritance: object

View source

public string? ApiKey { get; init; }

Value: string

View source

public string ApiKeyEnv { get; init; }

Environment variable read when ApiKey is empty. Defaults to OPENAI_API_KEY.

Value: string

View source

public string? ApiKeyFallbackEnv { get; init; }

A second environment variable read when the first is unset, such as the Vercel OIDC token.

Value: string

View source

public string? ApiKeyHeader { get; init; }

The header that carries the key. Null (the default) sends Authorization: Bearer; Azure OpenAI takes api-key.

Value: string

View source

public string BaseUrl { get; init; }

Value: string

View source

public IReadOnlyDictionary<string, string>? Headers { get; init; }

Headers added to every request. The identity headers (User-Agent, HTTP-Referer, X-Title) replace the same names set here.

Value: IReadOnlyDictionary<string, string>

View source

public required string Model { get; init; }

Value: string

View source

public bool? PromptCacheHints { get; init; }

Whether requests carry a prompt-cache key and store: false. Null (the default) sends them only to openai/* models on the gateway, as upstream does; chat completions elsewhere get neither. Provider options win over both.

Value: bool?

View source

public string Provider { get; init; }

The key this client reads in ProviderOptions. Its fields are added to the chat-completions body as given. Defaults to openai.

Value: string

View source

public IReadOnlyDictionary<string, string>? QueryParameters { get; init; }

Query parameters added to every request URL, such as Azure’s api-version.

Value: IReadOnlyDictionary<string, string>

View source

public string? ResolveApiKey()

Returns: string

View source