anthropicthinking

package
v0.0.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func AdaptiveThinkingIsDefault(model string) bool

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

func ThinkingCannotBeDisabled(model string) bool

ThinkingCannotBeDisabled reports whether the model rejects thinking.type=disabled.

func UsesAdaptiveThinking

func UsesAdaptiveThinking(model string) bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL