Skip to content

feat: add Claude adaptive thinking effort support for Bedrock Converse#22

Open
SalemBajjali wants to merge 55 commits into
mainfrom
issue-9
Open

feat: add Claude adaptive thinking effort support for Bedrock Converse#22
SalemBajjali wants to merge 55 commits into
mainfrom
issue-9

Conversation

@SalemBajjali

Copy link
Copy Markdown
Contributor

Closes #9

I followed the AWS Bedrock Converse documentation for adaptive thinking:

The implementation adds the required thinking configuration and optional effort setting under additionalModelRequestFields, matching the Converse API example.

I also added tests to cover the new effort configuration.

SalemBajjali and others added 30 commits June 4, 2026 09:57
@github-actions github-actions Bot added the stale label Jun 29, 2026
…py, only set additionalModelRequestFields when effort is provided
@github-actions github-actions Bot removed the stale label Jun 30, 2026
Comment thread src/wags_llm/client/bedrock.py Outdated
"""Raised when the effort parameter is not a valid value."""


class _EffortLevel(Enum):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wagner Lab TODO: Check error messaging

@SalemBajjali SalemBajjali requested a review from korikuzma June 30, 2026 20:06
Comment thread src/wags_llm/client/bedrock.py Outdated
Comment thread src/wags_llm/client/bedrock.py Outdated
Comment thread src/wags_llm/client/bedrock.py Outdated
Comment thread src/wags_llm/client/bedrock.py Outdated
Comment thread src/wags_llm/client/bedrock.py
@SalemBajjali SalemBajjali requested a review from korikuzma July 1, 2026 15:32
Comment thread src/wags_llm/client/bedrock.py Outdated
Comment thread src/wags_llm/client/bedrock.py Outdated
@SalemBajjali SalemBajjali requested a review from korikuzma July 1, 2026 16:10

@korikuzma korikuzma left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. @mcannon068nw is going to create a notebook to test this out! Once he confirms, I think we should be good to go.

Base automatically changed from issue-17 to main July 2, 2026 15:58
@SalemBajjali SalemBajjali requested a review from korikuzma July 2, 2026 17:42
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

This PR is stale because it has been open 3 day(s) with no activity. Please review this PR.

@github-actions github-actions Bot added the stale label Jul 6, 2026
@mcannon068nw

Copy link
Copy Markdown

Working on a notebook to test this now. One error I got right away:

ValidationException: An error occurred (ValidationException) when calling the Converse operation: The model returned the following errors: temperature may only be set to 1 when thinking is enabled or in adaptive mode. Please consult our documentation at https://docs.claude.com/en/docs/build-with-claude/extended-thinking#important-considerations-when-using-extended-thinking

I think we might want to put in the documentation somewhere that if using this parameter, temp must be fixed (if its not already there).

@mcannon068nw

Copy link
Copy Markdown

Picked a variant, disease pairing that some searching told me could go one way or another for variant classification efforts based on whatever contexts might be around it. I used this to see if effort parameter differences changed the response it gave for LOW MED HIGH and MAX in Sonnet. Sonnet does not support Max but left it in to see how messy the error was. I got errors for MED HIGH and MAX, only LOW returned a valid response. Left these print outs in and committed the notebook for you to look through @SalemBajjali @korikuzma

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Effort parameter

3 participants