Skip to content

AnthropicReasoning

Namespace: Vercel.AI.Anthropic

public static class AnthropicReasoning

Maps SDK reasoning levels onto Anthropic thinking and effort.

Inheritance: object

View source

public static bool IsCustom(string? reasoning)

True when reasoning asks for a concrete mode rather than the provider default.

Parameters

Name Type Description
reasoning string

Returns: bool

View source

MapBudget(string, int, IList<AnthropicWarning>)

Section titled “MapBudget(string, int, IList<AnthropicWarning>)”
public static int? MapBudget(string reasoning, int maxOutputTokens, IList<AnthropicWarning> warnings)

Token budget for budget-based thinking. Clamped to at least 1024.

Parameters

Name Type Description
reasoning string
maxOutputTokens int
warnings IList<AnthropicWarning>

Returns: int?

View source

Resolve(string?, string, AnthropicModelCapabilities, IList<AnthropicWarning>)

Section titled “Resolve(string?, string, AnthropicModelCapabilities, IList<AnthropicWarning>)”
public static AnthropicReasoningConfig? Resolve(string? reasoning, string modelId, AnthropicModelCapabilities capabilities, IList<AnthropicWarning> warnings)

Maps a reasoning level. Returns null for provider-default.

Parameters

Name Type Description
reasoning string
modelId string
capabilities AnthropicModelCapabilities
warnings IList<AnthropicWarning>

Returns: AnthropicReasoningConfig

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product