OpenAiCompatibleModelOptions
Namespace: E2E
public sealed class OpenAiCompatibleModelOptionsInheritance: object
Properties
Section titled “Properties”ApiKey
Section titled “ApiKey”public string? ApiKey { get; init; }Value: string
ApiKeyEnv
Section titled “ApiKeyEnv”public string ApiKeyEnv { get; init; }Environment variable read when ApiKey is empty. Defaults to OPENAI_API_KEY.
Value: string
ApiKeyFallbackEnv
Section titled “ApiKeyFallbackEnv”public string? ApiKeyFallbackEnv { get; init; }A second environment variable read when the first is unset, such as the Vercel OIDC token.
Value: string
ApiKeyHeader
Section titled “ApiKeyHeader”public string? ApiKeyHeader { get; init; }The header that carries the key. Null (the default) sends Authorization: Bearer; Azure OpenAI
takes api-key.
Value: string
BaseUrl
Section titled “BaseUrl”public string BaseUrl { get; init; }Value: string
Headers
Section titled “Headers”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>
public required string Model { get; init; }Value: string
PromptCacheHints
Section titled “PromptCacheHints”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?
Provider
Section titled “Provider”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
QueryParameters
Section titled “QueryParameters”public IReadOnlyDictionary<string, string>? QueryParameters { get; init; }Query parameters added to every request URL, such as Azure’s api-version.
Value: IReadOnlyDictionary<string, string>
Methods
Section titled “Methods”ResolveApiKey()
Section titled “ResolveApiKey()”public string? ResolveApiKey()Returns: string