Skip to content

fix: apply Claude thinking parameters from the evaluated LangChain config - #99

Merged
andrewklatzke merged 1 commit into
mainfrom
aklatzke/AIC-3400/fix-langchain-thinking-and-examples
Sep 17, 2026
Merged

andrewklatzke merged 1 commit into
mainfrom
aklatzke/AIC-3400/fix-langchain-thinking-and-examples

Conversation

@andrewklatzke

@andrewklatzke andrewklatzke commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stop hardcoding Anthropic thinking budget and max tokens in the LangChain thinking example so flag model.parameters are applied after evaluation.
  • Align LangChain README factory examples so the model name wins over a colliding model key in the parameter bag.
  • Refresh uv.lock workspace 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 > 0
  • Same example with doesnt-exist exits 1 with a clean error and no new output/ JSON
  • uv 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 > 0
  • Same example with travel-agent-flow-wrong-key exits 1 with a clean disabled-graph error and no new JSON

Note

Overview
Stops overriding Anthropic extended-thinking settings in the LangChain thinking example so ChatAnthropic is built from the evaluated flag’s model.parameters (plus the configured model name), instead of hardcoded thinking / max_tokens constants.

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 colliding model key.

Bumps workspace package versions in uv.lock (e.g. 0.2.10.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.

…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>
@andrewklatzke
andrewklatzke merged commit 8be2318 into main Sep 17, 2026
8 checks passed
@andrewklatzke
andrewklatzke deleted the aklatzke/AIC-3400/fix-langchain-thinking-and-examples branch September 17, 2026 22:59
@github-actions github-actions Bot mentioned this pull request Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants