AnthropicBackend class

Anthropic (Claude) via stock dartantic AnthropicChatModel.

The Anthropic chat model uses the supplied/native HTTP client directly (it does NOT wrap it in dartantic's RetryHttpClient), so the loop driver keeps full retry ownership — lenny's SchemaRejection contract is preserved.

Inheritance

Constructors

AnthropicBackend({required String apiKey, Uri? baseUrl, Map<String, String>? headers, bool enableThinking = true, AnthropicChatOptions? options})
Creates an Anthropic backend spec.
const

Properties

apiKey → String
Anthropic API key (sent as x-api-key). For an Anthropic-compatible gateway needing Authorization: Bearer, set it via headers instead.
final
baseUrl → Uri?
Override endpoint (bare origin); defaults to api.anthropic.com.
final
enableThinking → bool
Whether extended thinking is enabled.
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>?
Extra headers (override internal headers on conflict).
final
options → AnthropicChatOptions?
Anthropic sampling options.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited