Skip to content

Commit d383fcd

Browse files
ambiorix2099claude
andcommitted
Use claude-sonnet-4-6 in 59, 60 and 60a, and keep extended thinking
Reverts the previous commit's removal of thinking_budget_tokens and picks a model that accepts it instead. These three set thinking_budget_tokens, which the SDK serializes as {"enabled": true, "budgetTokens": N}. Claude 4.7+ models reject that shape, and the SDK has no way to emit the adaptive form the API asks for: reasoning_effort is set on the agent config but never reaches the LLM_CHAT_COMPLETE task, so it is silently dropped rather than acting as a substitute. Dropping thinking to stay on claude-sonnet-5 therefore traded away a demonstrated feature for no gain. claude-sonnet-4-6 accepts thinking_budget_tokens and still fixes the 404 from the retired id, which is what #480 is about. It is also registered on more deployments: 59_coding_agent.py now passes against both Conductor OSS 3.32.0 (302s) and Orkes 5.5.0 (301s), where under claude-sonnet-5 the Orkes leg failed outright. The rule this leaves: examples that set thinking_budget_tokens pin claude-sonnet-4-6; everything else stays on claude-sonnet-5, matching #494. 60 and 60a were not run, as both act on a real GitHub repository. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent eabe829 commit d383fcd

3 files changed

Lines changed: 19 additions & 10 deletions

File tree

examples/agents/59_coding_agent.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Coder writes code, transfers to QA when ready
66
- QA tester reviews and runs tests, transfers back if bugs found
77
- Natural back-and-forth until QA approves the code
8+
- Extended thinking for step-by-step reasoning
89
910
Flow (swarm — LLM-driven handoffs):
1011
1. coder writes the solution, executes it, transfers to qa_tester
@@ -25,7 +26,7 @@
2526

2627
qa_tester = Agent(
2728
name="qa_tester",
28-
model="anthropic/claude-sonnet-5",
29+
model="anthropic/claude-sonnet-4-6",
2930
instructions=(
3031
"You are a meticulous QA engineer. Review the code written by the "
3132
"coder for correctness, edge cases, and bugs. Write and execute test "
@@ -36,14 +37,15 @@
3637
"provide your final QA report. Do NOT transfer back if all tests pass."
3738
),
3839
local_code_execution=True,
40+
thinking_budget_tokens=4096,
3941
max_tokens=16384,
4042
)
4143

4244
# ── Coder: writes code, hands off to QA for review ──────────────────
4345

4446
coder = Agent(
4547
name="coder",
46-
model="anthropic/claude-sonnet-5",
48+
model="anthropic/claude-sonnet-4-6",
4749
instructions=(
4850
"You are an expert Python developer. Write clean, well-structured "
4951
"Python code to solve the given problem. Always execute your code to "
@@ -54,6 +56,7 @@
5456
"to qa_tester for verification."
5557
),
5658
local_code_execution=True,
59+
thinking_budget_tokens=4096,
5760
max_tokens=16384,
5861
# Swarm: coder starts, can hand off to qa_tester and back
5962
agents=[qa_tester],

examples/agents/60_github_coding_agent.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def create_pull_request(title: str, body: str, issue_number: int = 0) -> str:
249249

250250
github_agent = Agent(
251251
name="github_agent",
252-
model="anthropic/claude-sonnet-5",
252+
model="anthropic/claude-sonnet-4-6",
253253
instructions=(
254254
"You are a GitHub operations specialist. You handle all git and "
255255
"GitHub CLI interactions.\n\n"
@@ -274,14 +274,15 @@ def create_pull_request(title: str, body: str, issue_number: int = 0) -> str:
274274
"transfer tool after this — the workflow ends automatically."
275275
),
276276
tools=github_tools,
277+
thinking_budget_tokens=4096,
277278
max_tokens=16384,
278279
)
279280

280281
# ── Coder: implements the fix ────────────────────────────────────────
281282

282283
coder = Agent(
283284
name="coder",
284-
model="anthropic/claude-sonnet-5",
285+
model="anthropic/claude-sonnet-4-6",
285286
instructions=(
286287
"You are an expert developer. Write clean, well-structured code.\n\n"
287288
"WHEN YOU RECEIVE A TASK:\n"
@@ -302,14 +303,15 @@ def create_pull_request(title: str, body: str, issue_number: int = 0) -> str:
302303
),
303304
tools=coding_tools,
304305
local_code_execution=True,
306+
thinking_budget_tokens=4096,
305307
max_tokens=16384,
306308
)
307309

308310
# ── QA Tester: reviews code and runs tests ───────────────────────────
309311

310312
qa_tester = Agent(
311313
name="qa_tester",
312-
model="anthropic/claude-sonnet-5",
314+
model="anthropic/claude-sonnet-4-6",
313315
instructions=(
314316
"You are a meticulous QA engineer. Review the code written by the "
315317
"coder for correctness, edge cases, and bugs.\n\n"
@@ -330,14 +332,15 @@ def create_pull_request(title: str, body: str, issue_number: int = 0) -> str:
330332
),
331333
tools=qa_tools,
332334
local_code_execution=True,
335+
thinking_budget_tokens=4096,
333336
max_tokens=16384,
334337
)
335338

336339
# ── Coding Team: swarm coordinator ───────────────────────────────────
337340

338341
coding_team = Agent(
339342
name="coding_team",
340-
model="anthropic/claude-sonnet-5",
343+
model="anthropic/claude-sonnet-4-6",
341344
instructions=(
342345
"You are a coding team coordinator. Delegate the incoming request "
343346
"to github_agent to get started — it will pick an issue and set "

examples/agents/60a_github_coding_agent_simple.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
github_agent = Agent(
4343
name="github_agent",
44-
model="anthropic/claude-sonnet-5",
44+
model="anthropic/claude-sonnet-4-6",
4545
instructions=(
4646
"You are a GitHub operations specialist. You handle all git and "
4747
"GitHub CLI interactions.\n\n"
@@ -69,14 +69,15 @@
6969
"transfer tool — the workflow ends automatically."
7070
),
7171
local_code_execution=True,
72+
thinking_budget_tokens=4096,
7273
max_tokens=16384,
7374
)
7475

7576
# ── Coder: implements the fix ────────────────────────────────────────
7677

7778
coder = Agent(
7879
name="coder",
79-
model="anthropic/claude-sonnet-5",
80+
model="anthropic/claude-sonnet-4-6",
8081
instructions=(
8182
"You are an expert developer. You write clean, well-structured code.\n\n"
8283
f"The repo is cloned at {WORK_DIR}.\n\n"
@@ -100,14 +101,15 @@
100101
"every code block runs in an isolated environment."
101102
),
102103
local_code_execution=True,
104+
thinking_budget_tokens=4096,
103105
max_tokens=16384,
104106
)
105107

106108
# ── QA Tester: reviews code and runs tests ───────────────────────────
107109

108110
qa_tester = Agent(
109111
name="qa_tester",
110-
model="anthropic/claude-sonnet-5",
112+
model="anthropic/claude-sonnet-4-6",
111113
instructions=(
112114
"You are a meticulous QA engineer. Review the code written by the "
113115
"coder for correctness, edge cases, and bugs.\n\n"
@@ -124,14 +126,15 @@
124126
" NEVER call transfer_to_coding_team (it will be rejected)\n"
125127
),
126128
local_code_execution=True,
129+
thinking_budget_tokens=4096,
127130
max_tokens=16384,
128131
)
129132

130133
# ── Coding Team: swarm coordinator ───────────────────────────────────
131134

132135
coding_team = Agent(
133136
name="coding_team",
134-
model="anthropic/claude-sonnet-5",
137+
model="anthropic/claude-sonnet-4-6",
135138
instructions=(
136139
"You are a coding team coordinator. Delegate the incoming request "
137140
"to github_agent to get started — it will pick an issue and set "

0 commit comments

Comments
 (0)