Documentation
¶
Overview ¶
Package anthropicthinking holds native Anthropic Messages thinking policy: which model ids require thinking.type=adaptive, and the in-place rewrite from classic thinking.type=enabled. It is not a protocol converter; pkgs/anthropic2openai imports it when the Responses bridge needs the same model classification.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdaptiveThinkingIsDefault ¶
AdaptiveThinkingIsDefault reports whether the model thinks adaptively even when the client omits an effort.
func RewriteEnabledThinking ¶
func RewriteEnabledThinking(body map[string]any, model string, force bool, defaultEffort string) bool
RewriteEnabledThinking converts a native Anthropic Messages thinking.type=enabled payload into adaptive thinking when the model (or force) requires it. budget_tokens is dropped; output_config.effort is kept when already set, otherwise derived from the budget or defaultEffort. It returns whether the body changed.
func ThinkingCannotBeDisabled ¶
ThinkingCannotBeDisabled reports whether the model rejects thinking.type=disabled.
func UsesAdaptiveThinking ¶
UsesAdaptiveThinking reports whether this model id requires thinking.type=adaptive plus output_config.effort instead of classic thinking.type=enabled with a token budget.
Types ¶
This section is empty.