AnthropicConfig class
Anthropic provider configuration
This class contains all configuration options for the Anthropic providers. It's extracted from the main provider to improve modularity and reusability.
API Documentation:
- Models Overview: https://docs.anthropic.com/en/docs/models-overview
- Extended Thinking: https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking
- Vision: https://docs.anthropic.com/en/docs/build-with-claude/vision
- Tool Use: https://docs.anthropic.com/en/docs/tool-use
- PDF Support: https://docs.anthropic.com/en/docs/build-with-claude/pdf-support
Constructors
-
AnthropicConfig.new({required String apiKey, String baseUrl = ProviderDefaults.anthropicBaseUrl, String model = ProviderDefaults.anthropicDefaultModel, int? maxTokens, double? temperature, String? systemPrompt, Duration? timeout, bool stream = false, double? topP, int? topK, List<
Tool> ? tools, ToolChoice? toolChoice, bool reasoning = false, int? thinkingBudgetTokens, bool interleavedThinking = false, List<String> ? stopSequences, String? user, ServiceTier? serviceTier, LLMConfig? originalConfig}) -
const
- AnthropicConfig.fromLLMConfig(LLMConfig config)
-
Create AnthropicConfig from unified LLMConfig
factory
Properties
- apiKey → String
-
final
- baseUrl → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- interleavedThinking → bool
-
final
- maxThinkingBudgetTokens → int
-
Get the maximum thinking budget tokens for this model
no setter
- maxTokens → int?
-
final
- model → String
-
final
- originalConfig → LLMConfig?
-
Get the original LLMConfig for HTTP configuration
no setter
- reasoning → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceTier → ServiceTier?
-
final
-
stopSequences
→ List<
String> ? -
final
- stream → bool
-
final
- supportsInterleavedThinking → bool
-
Check if this model supports interleaved thinking
no setter
- supportsPDF → bool
-
Check if this model supports PDF documents
no setter
- supportsReasoning → bool
-
Check if this model supports reasoning/thinking
no setter
- supportsToolCalling → bool
-
Check if this model supports tool calling
no setter
- supportsVision → bool
-
Check if this model supports vision
no setter
- systemPrompt → String?
-
final
- temperature → double?
-
final
- thinkingBudgetTokens → int?
-
final
- timeout → Duration?
-
final
- toolChoice → ToolChoice?
-
final
-
tools
→ List<
Tool> ? -
final
- topK → int?
-
final
- topP → double?
-
final
- user → String?
-
final
Methods
-
copyWith(
{String? apiKey, String? baseUrl, String? model, int? maxTokens, double? temperature, String? systemPrompt, Duration? timeout, bool? stream, double? topP, int? topK, List< Tool> ? tools, ToolChoice? toolChoice, bool? reasoning, int? thinkingBudgetTokens, bool? interleavedThinking, List<String> ? stopSequences, String? user, ServiceTier? serviceTier}) → AnthropicConfig -
getExtension<
T> (String key) → T? - Get extension value from original config
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateThinkingConfig(
) → String? - Validate thinking configuration
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited