spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / plugins / claude-opus-4-5-migration / skills / claude-opus-4-5-migration / references / effort.md
70 lines · 1.7 KBPreviewCodeRaw

Effort Parameter (Beta)

Add effort set to "high" during migration. This is the default configuration for best performance with Opus 4.5.

Overview

Effort controls how eagerly Claude spends tokens. It affects all tokens: thinking, text responses, and function calls.

EffortUse Case
highBest performance, deep reasoning (default)
mediumBalance of cost/latency vs. performance
lowSimple, high-volume queries; significant token savings

Implementation

Requires beta flag effort-2025-11-24 in API calls.

Python SDK:

response = client.messages.create(
    model="claude-opus-4-5-20251101",
    max_tokens=1024,
    betas=["effort-2025-11-24"],
    output_config={
        "effort": "high"  # or "medium" or "low"
    },
    messages=[...]
)

TypeScript SDK:

const response = await client.messages.create({
  model: "claude-opus-4-5-20251101",
  max_tokens: 1024,
  betas: ["effort-2025-11-24"],
  output_config: {
    effort: "high"  // or "medium" or "low"
  },
  messages: [...]
});

Raw API:

{
  "model": "claude-opus-4-5-20251101",
  "max_tokens": 1024,
  "anthropic-beta": "effort-2025-11-24",
  "output_config": {
    "effort": "high"
  },
  "messages": [...]
}

Effort vs. Thinking Budget

Effort is independent of thinking budget:

  • High effort + no thinking = more tokens, but no thinking tokens
  • High effort + 32k thinking = more tokens, but thinking capped at 32k

Recommendations

  1. First determine effort level, then set thinking budget
  2. Best performance: high effort + high thinking budget
  3. Cost/latency optimization: medium effort
  4. Simple high-volume queries: low effort