Skip to content

AnthropicModelOptions

Namespace: E2E

public sealed class AnthropicModelOptions

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 ANTHROPIC_API_KEY.

Value: string

View source

public string BaseUrl { get; init; }

The API root; requests go to {BaseUrl}/messages.

Value: string

View source

public bool CacheBreakpoints { get; init; }

Marks the system prompt and the newest message as cache breakpoints. On by default, as upstream.

Value: bool

View source

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

Value: IReadOnlyDictionary<string, string>

View source

public int MaxTokens { get; init; }

The output cap each call sends. The Messages API requires one.

Value: int

View source

public required string Model { get; init; }

Value: string

View source

public string Provider { get; init; }

The key this client reads in ProviderOptions. Its fields are added to the body as given.

Value: string

View source

public string Version { get; init; }

The anthropic-version header.

Value: string

View source

public string? ResolveApiKey()

Returns: string

View source