File size: 518 Bytes
71dc9f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
import anthropic
client = anthropic.Anthropic()
for effort in ["low", "none", "high", "xhigh"]:
    try:
        client.messages.create(
            model="claude-sonnet-4-6",
            max_tokens=2000,
            temperature=1,
            messages=[{"role": "user", "content": "hi"}],
            thinking={"type": "adaptive"},
            output_config={"effort": effort}
        )
        print(f"SUCCESS effort: {effort}")
    except Exception as e:
        print(f"Error effort {effort}: {str(e)}")