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.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.

…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
andrewklatzke pushed a commit that referenced this pull request Sep 22, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>launchdarkly-ai-server: 0.2.3</summary>

##
[0.2.3](launchdarkly-ai-server-0.2.2...launchdarkly-ai-server-0.2.3)
(2026-09-21)


### Features

* **AIC-3106:** add multimodal history support to graph().invoke()
([#26](#26))
([c91132d](c91132d))
* **client:** stamp modelKey and modelVersion from _ldMeta on tracking
events
([ef103d3](ef103d3))
* **client:** stamp modelKey and modelVersion from _ldMeta on tracking
events ([#97](#97))
([4e6998a](4e6998a))
* **evaluations:** add LD judge event support
([#63](#63))
([ce61644](ce61644))


### Bug Fixes

* **client:** harden model stamps and keep judge results from inheriting
parent model identity
([5d1e678](5d1e678))
* **client:** only stamp a non-empty string modelKey
([8424452](8424452))
* **evaluations:** dedup criteria case-insensitively, matching the API
([4126d7b](4126d7b))
* **evaluations:** offline judge message_history must carry
FORMATTING_INSTRUCTIONS
([0b81f4e](0b81f4e))
* **evaluations:** prefer an exact-provider judge handler over a
wildcard
([c61b3a5](c61b3a5))
* **evaluations:** route judge configs to a compatible handler
([1a5e099](1a5e099))
* extract LangChain content-block text and apply model parameters after
eval ([#80](#80))
([a4e1aad](a4e1aad))
* **graph:** prefer node tools before synthetic handoff routing
([#90](#90))
([f830b2c](f830b2c))


### Documentation

* **evaluations:** document criteria, judge handlers, and scoring policy
([5f5a626](5f5a626))
* **evaluations:** use a customer-style judge key in examples
([ceca049](ceca049))
* remove the internal staging host from a public repo
([00b8dba](00b8dba))
* remove the internal staging host from a public repo
([#96](#96))
([1ad638d](1ad638d))
* replace stale launchdarkly-ai package name with launchdarkly-ai-python
([#40](#40))
([3256db7](3256db7))
</details>

<details><summary>launchdarkly-ai-python: 0.1.7</summary>

##
[0.1.7](launchdarkly-ai-python-0.1.6...launchdarkly-ai-python-0.1.7)
(2026-09-21)


### Features

* **evaluations:** add LD judge event support
([#63](#63))
([ce61644](ce61644))


### Documentation

* **evaluations:** document criteria, judge handlers, and scoring policy
([5f5a626](5f5a626))
* **evaluations:** use a customer-style judge key in examples
([ceca049](ceca049))
* remove the internal staging host from a public repo
([00b8dba](00b8dba))
* remove the internal staging host from a public repo
([#96](#96))
([1ad638d](1ad638d))
* replace stale launchdarkly-ai package name with launchdarkly-ai-python
([#40](#40))
([3256db7](3256db7))
</details>

<details><summary>launchdarkly-ai-claude-agents: 0.2.3</summary>

##
[0.2.3](launchdarkly-ai-claude-agents-0.2.2...launchdarkly-ai-claude-agents-0.2.3)
(2026-09-21)


### Features

* **AIC-3106:** add multimodal history support to graph().invoke()
([#26](#26))
([c91132d](c91132d))


### Documentation

* replace stale launchdarkly-ai package name with launchdarkly-ai-python
([#40](#40))
([3256db7](3256db7))
</details>

<details><summary>launchdarkly-ai-claude-messages: 0.2.3</summary>

##
[0.2.3](launchdarkly-ai-claude-messages-0.2.2...launchdarkly-ai-claude-messages-0.2.3)
(2026-09-21)


### Features

* **AIC-3106:** add multimodal history support to graph().invoke()
([#26](#26))
([c91132d](c91132d))


### Documentation

* replace stale launchdarkly-ai package name with launchdarkly-ai-python
([#40](#40))
([3256db7](3256db7))
</details>

<details><summary>launchdarkly-ai-openai-agents: 0.2.3</summary>

##
[0.2.3](launchdarkly-ai-openai-agents-0.2.2...launchdarkly-ai-openai-agents-0.2.3)
(2026-09-21)


### Features

* **AIC-3106:** add multimodal history support to graph().invoke()
([#26](#26))
([c91132d](c91132d))


### Documentation

* replace stale launchdarkly-ai package name with launchdarkly-ai-python
([#40](#40))
([3256db7](3256db7))
</details>

<details><summary>launchdarkly-ai-openai-messages: 0.2.3</summary>

##
[0.2.3](launchdarkly-ai-openai-messages-0.2.2...launchdarkly-ai-openai-messages-0.2.3)
(2026-09-21)


### Features

* **AIC-3106:** add multimodal history support to graph().invoke()
([#26](#26))
([c91132d](c91132d))


### Documentation

* replace stale launchdarkly-ai package name with launchdarkly-ai-python
([#40](#40))
([3256db7](3256db7))
</details>

<details><summary>launchdarkly-ai-langchain-agents: 0.2.3</summary>

##
[0.2.3](launchdarkly-ai-langchain-agents-0.2.2...launchdarkly-ai-langchain-agents-0.2.3)
(2026-09-21)


### Features

* **AIC-3106:** add multimodal history support to graph().invoke()
([#26](#26))
([c91132d](c91132d))


### Bug Fixes

* **AIC-3382:** support Bedrock configs in LangChain handlers
([#101](#101))
([04a67c7](04a67c7))
* apply Claude thinking parameters from the evaluated LangChain config
([#99](#99))
([8be2318](8be2318))
* extract LangChain content-block text and apply model parameters after
eval ([#80](#80))
([a4e1aad](a4e1aad))


### Documentation

* replace stale launchdarkly-ai package name with launchdarkly-ai-python
([#40](#40))
([3256db7](3256db7))
</details>

<details><summary>launchdarkly-ai-langchain-messages: 0.2.3</summary>

##
[0.2.3](launchdarkly-ai-langchain-messages-0.2.2...launchdarkly-ai-langchain-messages-0.2.3)
(2026-09-21)


### Features

* **AIC-3106:** add multimodal history support to graph().invoke()
([#26](#26))
([c91132d](c91132d))


### Bug Fixes

* **AIC-3382:** support Bedrock configs in LangChain handlers
([#101](#101))
([04a67c7](04a67c7))
* apply Claude thinking parameters from the evaluated LangChain config
([#99](#99))
([8be2318](8be2318))
* extract LangChain content-block text and apply model parameters after
eval ([#80](#80))
([a4e1aad](a4e1aad))


### Documentation

* replace stale launchdarkly-ai package name with launchdarkly-ai-python
([#40](#40))
([3256db7](3256db7))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Overview**
> **Release Please** cut that bumps all Python AI SDK packages and
records their release notes—no runtime code changes in this diff.
> 
> **`launchdarkly-ai-server` 0.2.3** and **`launchdarkly-ai-python`
0.1.7** ship the accumulated work since the last release: **multimodal
conversation history** in `graph().invoke()`, **LaunchDarkly judge
evaluation events**, and **model identity** (`modelKey` / `modelVersion`
from `_ldMeta`) on tracking events, plus fixes for judge handler
routing, criteria dedup, offline judge formatting, graph tool vs handoff
ordering, and LangChain content-block / post-eval parameters.
> 
> Integration packages (**Claude/OpenAI/LangChain** agents and messages
at **0.2.3**) pick up the multimodal `graph().invoke()` behavior via the
core client; **LangChain** packages additionally note **Bedrock config**
support and **Claude thinking** parameters from evaluated configs.
Versions are updated in `.release-please-manifest.json`, each package’s
`pyproject.toml`, `__version__`, and `CHANGELOG.md`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
3a40793. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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