Skip to content

Commit 28085f3

Browse files
fix: only send reasoning.effort to models that support it
Each harness-engineering-bench target agent builds its Responses API request with a hard-coded "reasoning": {"effort": ...} on every call, regardless of the configured model. Reasoning models (gpt-5.x, o-series, *-codex) accept it, but gpt-4o and other non-reasoning models reject the whole request with HTTP 400: "Unsupported parameter: 'reasoning.effort' is not supported with this model". On a swe-atlas-qna run pointed at a gpt-4o agent model this produced a wall of 400s (60 cases died with BadRequestError). The gaia and tau3 configs point their agent model at gpt-4o in the same setup, so they share the latent bug. Gate reasoning.effort on the model family: send it only when the resolved model is a reasoning model (gpt-5.x / o1 / o3 / o4 / *-codex), otherwise omit it. Each agent keeps its own effort level (high for atlas and swe-bench-pro, medium for gaia, officeqa and tau3). No behavior change for reasoning models; gpt-4o stops 400ing. Applied uniformly to all five bench agents. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ccc7d07 commit 28085f3

5 files changed

Lines changed: 25 additions & 5 deletions

File tree

  • harness-engineering-bench
    • gaia/baseline/target/src/gaia_agent
    • officeqa/baseline/target/src/officeqa_agent
    • swe-atlas-qna/baseline/target/src/atlas_agent
    • swe-bench-pro/baseline/target/src/swebench_pro_agent
    • tau3/baseline/target/src/tau3_agent

harness-engineering-bench/gaia/baseline/target/src/gaia_agent/agent.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,14 @@ async def run(
185185
"instructions": INSTRUCTIONS,
186186
"input": next_input,
187187
"tools": TOOLS,
188-
"reasoning": {"effort": "medium"},
189188
"max_output_tokens": 8000,
190189
"parallel_tool_calls": False,
191190
}
191+
# gpt-4o and other non-reasoning models reject `reasoning.effort`
192+
# with HTTP 400; only send it to reasoning-capable models.
193+
_model = self._api_model.lower()
194+
if _model.startswith(("gpt-5", "o1", "o3", "o4")) or "codex" in _model:
195+
request["reasoning"] = {"effort": "medium"}
192196
if previous_response_id is not None:
193197
request["previous_response_id"] = previous_response_id
194198
response = await self._client.responses.create(**request)

harness-engineering-bench/officeqa/baseline/target/src/officeqa_agent/agent.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,14 @@ async def run(
189189
"instructions": INSTRUCTIONS,
190190
"input": next_input,
191191
"tools": TOOLS,
192-
"reasoning": {"effort": "medium"},
193192
"max_output_tokens": 8000,
194193
"parallel_tool_calls": False,
195194
}
195+
# gpt-4o and other non-reasoning models reject `reasoning.effort`
196+
# with HTTP 400; only send it to reasoning-capable models.
197+
_model = self._api_model.lower()
198+
if _model.startswith(("gpt-5", "o1", "o3", "o4")) or "codex" in _model:
199+
request["reasoning"] = {"effort": "medium"}
196200
if previous_response_id is not None:
197201
request["previous_response_id"] = previous_response_id
198202
response = await self._client.responses.create(**request)

harness-engineering-bench/swe-atlas-qna/baseline/target/src/atlas_agent/agent.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,14 @@ async def run(
150150
"instructions": INSTRUCTIONS,
151151
"input": next_input,
152152
"tools": TOOLS,
153-
"reasoning": {"effort": "high"},
154153
"max_output_tokens": 12_000,
155154
"parallel_tool_calls": False,
156155
}
156+
# gpt-4o and other non-reasoning models reject `reasoning.effort`
157+
# with HTTP 400; only send it to reasoning-capable models.
158+
_model = self._api_model.lower()
159+
if _model.startswith(("gpt-5", "o1", "o3", "o4")) or "codex" in _model:
160+
request["reasoning"] = {"effort": "high"}
157161
if previous_response_id is not None:
158162
request["previous_response_id"] = previous_response_id
159163
response = await self._client.responses.create(**request)

harness-engineering-bench/swe-bench-pro/baseline/target/src/swebench_pro_agent/agent.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,14 @@ async def run(
382382
"instructions": INSTRUCTIONS,
383383
"input": next_input,
384384
"tools": TOOLS,
385-
"reasoning": {"effort": "high"},
386385
"max_output_tokens": 12_000,
387386
"parallel_tool_calls": False,
388387
}
388+
# gpt-4o and other non-reasoning models reject `reasoning.effort`
389+
# with HTTP 400; only send it to reasoning-capable models.
390+
_model = self._api_model.lower()
391+
if _model.startswith(("gpt-5", "o1", "o3", "o4")) or "codex" in _model:
392+
request["reasoning"] = {"effort": "high"}
389393
if previous_response_id is not None:
390394
request["previous_response_id"] = previous_response_id
391395
response = await self._responses_create(**request)

harness-engineering-bench/tau3/baseline/target/src/tau3_agent/agent.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,14 @@ async def run(
298298
"instructions": INSTRUCTIONS,
299299
"input": next_input,
300300
"tools": openai_tools,
301-
"reasoning": {"effort": "medium"},
302301
"max_output_tokens": 8_000,
303302
"parallel_tool_calls": False,
304303
}
304+
# gpt-4o and other non-reasoning models reject `reasoning.effort`
305+
# with HTTP 400; only send it to reasoning-capable models.
306+
_model = self._api_model.lower()
307+
if _model.startswith(("gpt-5", "o1", "o3", "o4")) or "codex" in _model:
308+
request["reasoning"] = {"effort": "medium"}
305309
if previous_response_id is not None:
306310
request["previous_response_id"] = previous_response_id
307311
response = await client.responses.create(**request)

0 commit comments

Comments
 (0)