Skip to content

[FEATURE] When adaptive thinking parameter is sent, getting error during response parsing #1856

@mistu4u

Description

@mistu4u

Problem Statement

This is related to: #1669
We want to utilize the adaptive thinking feature. As suggested in the comment, I tried the same code but with the model Sonnet 4.5
Sample code below:

from strands import Agent
from strands.models import BedrockModel

model_provider = BedrockModel(
    model_id="us.anthropic.claude-sonnet-4-5-20250929-v1:0",
    max_tokens=8192,
    additional_request_fields={
        "thinking": {"type": "adaptive"},
        "outputConfig": {"effort": "medium"},
    },
)

agent = Agent(
    model=model_provider,
    system_prompt="You are an expert researcher. Use your tools and reason step-by-step."
)

response = agent("Analyze the impact of quantum networking on cybersecurity by 2030.")
print(response)

However getting error:

botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the ConverseStream operation: The model returned the following errors: thinking: Input tag 'adaptive' found using 'type' does not match any of the expected tags: 'disabled', 'enabled' └ Bedrock region: us-west-2 └ Model id: us.anthropic.claude-sonnet-4-5-20250929-v1:0

Proposed Solution

No response

Use Case

With this new adaptive thinking feature in play, the users will prefer it to using the earlier way of using it with budget tokens. In fact, Claude themselves recommend to use this method and the earlier method will be deprecated soon.

Alternatives Solutions

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions