claude

package
v6.9.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package claude implements thinking configuration scaffolding for Claude models.

Claude models support two thinking control styles:

  • Manual thinking: thinking.type="enabled" with thinking.budget_tokens (token budget)
  • Adaptive thinking (Claude 4.6): thinking.type="adaptive" with output_config.effort (low/medium/high/max)

Some Claude models support ZeroAllowed (sonnet-4-5, opus-4-5), while older models do not. See: _bmad-output/planning-artifacts/architecture.md#Epic-6

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applier

type Applier struct{}

Applier implements thinking.ProviderApplier for Claude models. This applier is stateless and holds no configuration.

func NewApplier

func NewApplier() *Applier

NewApplier creates a new Claude thinking applier.

func (*Applier) Apply

func (a *Applier) Apply(body []byte, config thinking.ThinkingConfig, modelInfo *registry.ModelInfo) ([]byte, error)

Apply applies thinking configuration to Claude request body.

IMPORTANT: This method expects config to be pre-validated by thinking.ValidateConfig. ValidateConfig handles:

  • Mode conversion (Level→Budget, Auto→Budget)
  • Budget clamping to model range
  • ZeroAllowed constraint enforcement

Apply processes:

  • ModeBudget: manual thinking budget_tokens
  • ModeLevel: adaptive thinking effort (Claude 4.6)
  • ModeAuto: provider default adaptive/manual behavior
  • ModeNone: disabled

Expected output format when enabled:

{
  "thinking": {
    "type": "enabled",
    "budget_tokens": 16384
  }
}

Expected output format for adaptive:

{
  "thinking": {
    "type": "adaptive"
  },
  "output_config": {
    "effort": "high"
  }
}

Expected output format when disabled:

{
  "thinking": {
    "type": "disabled"
  }
}

Jump to

Keyboard shortcuts

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