fix: apply Claude thinking parameters from the evaluated LangChain config - #99
Merged
andrewklatzke merged 1 commit intoSep 17, 2026
Conversation
…nfig Hardcoding thinking budget and max_tokens in the example collided with flag parameters and broke langchain-thinking integration runs. Co-authored-by: Cursor <cursoragent@cursor.com>
atornsii
approved these changes
Sep 17, 2026
andrewklatzke
deleted the
aklatzke/AIC-3400/fix-langchain-thinking-and-examples
branch
September 17, 2026 22:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
model.parametersare applied after evaluation.modelkey in the parameter bag.uv.lockworkspace versions to match the published package metadata.Fixes AIC-3400.
Test plan
uv run python main.py langchain-thinking launch-darkly-documentation-summarizer-messages-claude "Reason it out yourself without any tools: what is 17 times 23?"exits 0 with a non-empty response and usage totals > 0doesnt-existexits 1 with a clean error and no newoutput/JSONuv run python main.py native-graph-langchain travel-agent-flow "Book me a flight to Paris"exits 0 with a non-empty response and usage totals > 0travel-agent-flow-wrong-keyexits 1 with a clean disabled-graph error and no new JSONNote
Overview
Stops overriding Anthropic extended-thinking settings in the LangChain thinking example so
ChatAnthropicis built from the evaluated flag’smodel.parameters(plus the configured model name), instead of hardcodedthinking/max_tokensconstants.Updates LangChain agents and messages README factory snippets so the flag’s model name is applied after spreading
model.parameters, ensuring it wins if parameters include a collidingmodelkey.Bumps workspace package versions in
uv.lock(e.g.0.2.1→0.2.2) to align with published metadata.Reviewed by Cursor Bugbot for commit 408ad5b. Bugbot is set up for automated code reviews on this repo. Configure here.