Summary
The Bedrock provider's Claude reasoning configuration only emits the legacy {"type": "enabled", "budget_tokens": N} form. It does not support the adaptive thinking configuration used by Claude Sonnet 4.6 and Claude Opus 4.7, nor the associated output_config.effort field. As a result, GenerateConfig.reasoning_effort and GenerateConfig.effortare silently ignored when targeting Claude models through Bedrock.
Current Behavior
In src/inspect_ai/model/_providers/bedrock.py:521-528, BedrockAPI.reasoning_config() handles Claude as follows:
elif self.is_claude():
if config.reasoning_tokens is not None:
return {
"reasoning_config": {
"type": "enabled",
"budget_tokens": config.reasoning_tokens,
}
}
This branch:
- Only reacts to
config.reasoning_tokens; config.reasoning_effort and config.effort are not read.
- Emits only
type: "enabled" with budget_tokens; type: "adaptive" is not supported.
- Does not emit an
output_config field.
The gpt-oss and Nova branches in the same method do consume reasoning_effort, so the omission is specific to Claude.
Expected Behavior
A request such as the following should be producible from the provider:
response = client.converse(
modelId="us.anthropic.claude-opus-4-7",
messages=[{"role": "user", "content": [{"text": "..."}]}],
inferenceConfig={"maxTokens": 128000},
additionalModelRequestFields={
"thinking": {"type": "adaptive"},
"output_config": {"effort": "high"},
},
)
Concretely, the Bedrock provider should:
- Emit
type: "adaptive" (with an output_config.effort) when config.reasoning_effort is set on a Claude model that supports adaptive thinking (4.6 and later).
- Emit
output_config.effort from config.effort independently of thinking mode, with the same version-gated adjustments applied in the native provider (e.g. xhigh -> high pre-4.7 models).
- Continue to support the existing
type: "enabled" + budget_tokens when only config.reasoning_tokens is set.
Reference Implementation
The native Anthropic provider already implements the desired semantics at src/inspect_ai/model/_providers/anthropic.py:783-805:
# effort
if config.effort is not None:
...
params["output_config"] = OutputConfigParam(effort=effort)
# some thinking-only stuff
if self.is_using_thinking(config):
reasoning_effort = self.effort_from_reasoning_effort(config)
if reasoning_effort is not None:
params["thinking"] = dict(type="adaptive", display="summarized")
params["output_config"] = OutputConfigParam(effort=reasoning_effort)
else:
params["thinking"] = dict(
type="enabled",
budget_tokens=config.reasoning_tokens,
display="summarized",
)
The Bedrock provider can mirror this logic, placing the resulting fields into additionalModelRequestFields rather than the top-level Messages API parameter.
Environment
inspect_ai main branch (commit d09d608f8 at time of filing)
- Affected file:
src/inspect_ai/model/_providers/bedrock.py
- Affected models:
us.anthropic.claude-opus-4-7 and us.anthropic.claude-sonnet-4-6
Summary
The Bedrock provider's Claude reasoning configuration only emits the legacy
{"type": "enabled", "budget_tokens": N}form. It does not support the adaptive thinking configuration used by Claude Sonnet 4.6 and Claude Opus 4.7, nor the associatedoutput_config.effortfield. As a result,GenerateConfig.reasoning_effortandGenerateConfig.effortare silently ignored when targeting Claude models through Bedrock.Current Behavior
In
src/inspect_ai/model/_providers/bedrock.py:521-528,BedrockAPI.reasoning_config()handles Claude as follows:This branch:
config.reasoning_tokens;config.reasoning_effortandconfig.effortare not read.type: "enabled"withbudget_tokens;type: "adaptive"is not supported.output_configfield.The gpt-oss and Nova branches in the same method do consume
reasoning_effort, so the omission is specific to Claude.Expected Behavior
A request such as the following should be producible from the provider:
Concretely, the Bedrock provider should:
type: "adaptive"(with anoutput_config.effort) whenconfig.reasoning_effortis set on a Claude model that supports adaptive thinking (4.6 and later).output_config.effortfromconfig.effortindependently of thinking mode, with the same version-gated adjustments applied in the native provider (e.g.xhigh->highpre-4.7 models).type: "enabled"+budget_tokenswhen onlyconfig.reasoning_tokensis set.Reference Implementation
The native Anthropic provider already implements the desired semantics at
src/inspect_ai/model/_providers/anthropic.py:783-805:The Bedrock provider can mirror this logic, placing the resulting fields into
additionalModelRequestFieldsrather than the top-level Messages API parameter.Environment
inspect_aimain branch (commitd09d608f8at time of filing)src/inspect_ai/model/_providers/bedrock.pyus.anthropic.claude-opus-4-7andus.anthropic.claude-sonnet-4-6