@chinmaymk/aikit / AnthropicOptions
Interface: AnthropicOptions
Defined in: types.ts:669
Anthropic-specific configuration and generation options. These can be provided at construction time or generation time. Generation time options will override construction time options.
Extends
Properties
model?
optional
model:string
Defined in: types.ts:305
The specific model you want to use. e.g., 'gpt-4o' or 'claude-3-5-sonnet-20240620'.
Inherited from
maxOutputTokens?
optional
maxOutputTokens:number
Defined in: types.ts:307
The maximum number of output tokens to generate. Don't want it to ramble on forever, do you?
Inherited from
ProviderOptions
.maxOutputTokens
temperature?
optional
temperature:number
Defined in: types.ts:313
The sampling temperature. Higher values (e.g., 0.8) make the output more random, while lower values (e.g., 0.2) make it more focused and deterministic. A bit like adjusting the chaos knob.
Inherited from
topP?
optional
topP:number
Defined in: types.ts:318
Top-p sampling. It's a way to control the randomness of the output by only considering the most likely tokens. It's like telling the AI to only pick from the top of the deck.
Inherited from
stopSequences?
optional
stopSequences:string
[]
Defined in: types.ts:325
A list of sequences that will stop the generation. A safe word, if you will.
Inherited from
tools?
optional
tools:Tool
[]
Defined in: types.ts:327
The list of tools you're making available to the model.
Inherited from
toolChoice?
optional
toolChoice: {name
:string
; } |"auto"
|"required"
|"none"
Defined in: types.ts:335
How the model should choose which tool to use. 'auto': The model decides. 'required': The model must use a tool. 'none': The model can't use any tools. { name: 'my_tool' }: Force the model to use a specific tool.
Inherited from
apiKey?
optional
apiKey:string
Defined in: types.ts:344
API key for authentication with the provider.
Inherited from
baseURL?
optional
baseURL:string
Defined in: types.ts:346
Custom base URL for the API endpoint.
Inherited from
timeout?
optional
timeout:number
Defined in: types.ts:348
Request timeout in milliseconds.
Inherited from
maxRetries?
optional
maxRetries:number
Defined in: types.ts:350
Maximum number of retry attempts for failed requests.
Inherited from
mutateHeaders()?
optional
mutateHeaders: (headers
) =>void
Defined in: types.ts:356
A function that allows you to modify the headers before a request is sent. This is useful for adding custom headers or modifying existing ones.
Parameters
headers
Record
<string
, string
>
The original headers object to mutate directly.
Returns
void
Inherited from
beta?
optional
beta:string
[]
Defined in: types.ts:671
For enabling beta features. Live on the edge.
topK?
optional
topK:number
Defined in: types.ts:676
Top-k sampling. See GenerationOptions
for the juicy gossip. It's here because Anthropic supports it too.
Overrides
container?
optional
container:string
Defined in: types.ts:678
Container identifier for reuse across requests.
mcpServers?
optional
mcpServers:object
[]
Defined in: types.ts:680
MCP servers to be utilized in this request.
name
name:
string
url
url:
string
authorization_token?
optional
authorization_token:string
tool_configuration?
optional
tool_configuration:object
tool_configuration.enabled?
optional
enabled:boolean
tool_configuration.allowed_tools?
optional
allowed_tools:string
[]
metadata?
optional
metadata:object
Defined in: types.ts:690
An object describing metadata about the request.
user_id?
optional
user_id:string
serviceTier?
optional
serviceTier:"auto"
|"standard_only"
Defined in: types.ts:697
Determines whether to use priority capacity (if available) or standard capacity for this request. 'auto' | 'standard_only'
thinking?
optional
thinking: {type
:"enabled"
;budget_tokens
:number
; } | {type
:"disabled"
; }
Defined in: types.ts:703
Configuration for enabling Claude's extended thinking. When enabled, responses include thinking content blocks showing Claude's thinking process. Requires a minimum budget of 1,024 tokens.
anthropicVersion?
optional
anthropicVersion:string
Defined in: types.ts:715
The version of the Anthropic API you want to use. Read more about versioning and version history at https://docs.anthropic.com/en/api/versioning
system?
optional
system:string
|object
[]
Defined in: types.ts:721
System prompt content. Can be a string or an array of text blocks. Provides context and instructions to Claude, such as specifying a particular goal or role. See the guide to system prompts: https://docs.anthropic.com/en/docs/system-prompts