Repository navigation
fix(AIC-3506): strip tools from LangChain model constructor kwargs - #133
Merged
andrewklatzke merged 1 commit intoOct 8, 2026
Merged
Conversation
Tools in model.parameters are forwarded raw and rejected by the provider API. They are already bound from the top-level tools field.
jeffdupont
approved these changes
Oct 8, 2026
andrewklatzke
deleted the
aklatzke/AIC-3506/strip-lc-openai-tools-from-params
branch
October 8, 2026 18:10
Merged
XieX
added a commit
that referenced
this pull request
Oct 9, 2026
Brings in #145 (helper usage), #150 (Experimental changelog heading) and #133 (strip tools from LangChain model constructor kwargs). lifecycle.py merged without a conflict and keeps both sides: the usage flush sits beside each flush_ai_sdk_info call, so on the BYOC path it runs only after telemetry setup succeeds and the client is adopted, and on the options path only after a successful setup. shutdown() runs _clear_experimental_state() before client teardown, then resets usage with sdk-info. Root surface: add main's report_usage to ROOT_SURFACE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andrewklatzke
pushed a commit
that referenced
this pull request
Oct 9, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>launchdarkly-ai-server: 0.3.0</summary> ## [0.3.0](launchdarkly-ai-server-0.2.4...launchdarkly-ai-server-0.3.0) (2026-10-09) ### ⚠ BREAKING CHANGES * **evaluations:** take tools as a list of EvalTool, with inline definitions ([#105](#105)) * **evaluations:** rename Tool to EvalTool, freeze it, and make tools.get async * **evaluations:** take tools as a list of Tool ### Experimental * **evaluations:** let tools= override a variation's tools ([90b293c](90b293c)) * **evaluations:** Model resolution for remote AI config fetch ([#147](#147)) ([0b4df05](0b4df05)) * **evaluations:** rename Tool to EvalTool, freeze it, and make tools.get async ([4b8a819](4b8a819)) * **evaluations:** take tools as a list of EvalTool, with inline definitions ([#105](#105)) ([cad1547](cad1547)) * **evaluations:** take tools as a list of Tool ([0a92b13](0a92b13)) * **skills:** add experimental Agent Skills under `launchdarkly_ai_server.experimental.skills` ([dfb519c](dfb519c)) ### Features * **AIC-3495:** record which public helpers an application calls ([#145](#145)) ([19d2c2b](19d2c2b)) * **client:** warn about unrecognized `init_client` options instead of ignoring them silently ([dfb519c](dfb519c)) ### Bug Fixes * **client:** `init_client` adopts a client only after telemetry setup succeeds, and closes a client it built when setup fails ([dfb519c](dfb519c)) * **client:** `shutdown()` releases the global OpenTelemetry tracer provider the SDK registered, so a later `init_client` exports spans again ([dfb519c](dfb519c)) ### Documentation * **evaluations:** call the credential an API key, not a token ([7a238e5](7a238e5)) </details> <details><summary>launchdarkly-ai-python: 0.2.0</summary> ## [0.2.0](launchdarkly-ai-python-0.1.8...launchdarkly-ai-python-0.2.0) (2026-10-09) ### ⚠ BREAKING CHANGES * **evaluations:** take tools as a list of EvalTool, with inline definitions ([#105](#105)) * **evaluations:** rename Tool to EvalTool, freeze it, and make tools.get async * **evaluations:** take tools as a list of Tool ### Experimental * **evaluations:** rename Tool to EvalTool, freeze it, and make tools.get async ([4b8a819](4b8a819)) * **evaluations:** take tools as a list of EvalTool, with inline definitions ([#105](#105)) ([cad1547](cad1547)) * **evaluations:** take tools as a list of Tool ([0a92b13](0a92b13)) * **skills:** add experimental Agent Skills under `launchdarkly_ai_server.experimental.skills` ([dfb519c](dfb519c)) ### Features * **client:** warn about unrecognized `init_client` options instead of ignoring them silently ([dfb519c](dfb519c)) ### Bug Fixes * **client:** `init_client` adopts a client only after telemetry setup succeeds, and closes a client it built when setup fails ([dfb519c](dfb519c)) * **client:** `shutdown()` releases the global OpenTelemetry tracer provider the SDK registered, so a later `init_client` exports spans again ([dfb519c](dfb519c)) </details> <details><summary>launchdarkly-ai-claude-agents: 0.2.5</summary> ## [0.2.5](launchdarkly-ai-claude-agents-0.2.4...launchdarkly-ai-claude-agents-0.2.5) (2026-10-09) ### Features * **AIC-3495:** record which public helpers an application calls ([#145](#145)) ([19d2c2b](19d2c2b)) </details> <details><summary>launchdarkly-ai-claude-messages: 0.2.4</summary> ## [0.2.4](launchdarkly-ai-claude-messages-0.2.3...launchdarkly-ai-claude-messages-0.2.4) (2026-10-09) ### Features * **AIC-3495:** record which public helpers an application calls ([#145](#145)) ([19d2c2b](19d2c2b)) </details> <details><summary>launchdarkly-ai-openai-agents: 0.2.5</summary> ## [0.2.5](launchdarkly-ai-openai-agents-0.2.4...launchdarkly-ai-openai-agents-0.2.5) (2026-10-09) ### Features * **AIC-3495:** record which public helpers an application calls ([#145](#145)) ([19d2c2b](19d2c2b)) ### Bug Fixes * **agents:** accept sync tool handlers on invoke and native graphs ([#134](#134)) ([4ab5020](4ab5020)) </details> <details><summary>launchdarkly-ai-openai-messages: 0.2.4</summary> ## [0.2.4](launchdarkly-ai-openai-messages-0.2.3...launchdarkly-ai-openai-messages-0.2.4) (2026-10-09) ### Features * **AIC-3495:** record which public helpers an application calls ([#145](#145)) ([19d2c2b](19d2c2b)) </details> <details><summary>launchdarkly-ai-langchain-agents: 0.2.5</summary> ## [0.2.5](launchdarkly-ai-langchain-agents-0.2.4...launchdarkly-ai-langchain-agents-0.2.5) (2026-10-09) ### Features * **AIC-3495:** record which public helpers an application calls ([#145](#145)) ([19d2c2b](19d2c2b)) ### Bug Fixes * **agents:** accept sync tool handlers on invoke and native graphs ([#134](#134)) ([4ab5020](4ab5020)) * **AIC-3506:** strip tools from LangChain model constructor kwargs ([#133](#133)) ([77c4979](77c4979)) </details> <details><summary>launchdarkly-ai-langchain-messages: 0.2.4</summary> ## [0.2.4](launchdarkly-ai-langchain-messages-0.2.3...launchdarkly-ai-langchain-messages-0.2.4) (2026-10-09) ### Features * **AIC-3495:** record which public helpers an application calls ([#145](#145)) ([19d2c2b](19d2c2b)) ### Bug Fixes * **AIC-3506:** strip tools from LangChain model constructor kwargs ([#133](#133)) ([77c4979](77c4979)) </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-only PR** (Release Please): bumps package versions, `__version__` strings, `.release-please-manifest.json`, and `CHANGELOG.md` entries—no application source changes in the diff. > > **`launchdarkly-ai-server` 0.3.0** and **`launchdarkly-ai-python` 0.2.0** document **breaking evaluation tool APIs**: `Tool` → frozen **`EvalTool`**, tools passed as a **list** (with inline definitions), and **`tools.get` is async**. Also ships experimental **evaluations** work (remote AI config model resolution, `tools=` override) and **`launchdarkly_ai_server.experimental.skills`**, plus **`init_client`/`shutdown`** telemetry lifecycle fixes and warnings for unrecognized `init_client` options. > > **Provider packages** (0.2.4–0.2.5) mainly add **SDK usage telemetry** for which public helpers apps call (**AIC-3495**), with **LangChain** fixes (strip `tools` from model ctor kwargs; accept **sync** tool handlers on invoke/graphs) and the same sync-handler fix on **OpenAI agents**. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c2a6a78. 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>
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.
Human explanation:
Strips
model.parameter.toolsoff of Langchain handlers so they don't get splatted into the kwargs.model.parameters.toolsis a copy of the existingtoolsleft in for backwards compatibility.AI explanation:
Tools in model.parameters are forwarded raw and rejected by the provider API. They are already bound from the top-level tools field.
Note
Overview
Strips
toolsfrom LangChain chat model constructor kwargs everywhere default models are built, not only on Bedrock.model.parameters.toolsis a backwards-compat mirror of top-levelconfig["tools"]. Forwarding it intoChatOpenAI/ChatAnthropic/ChatBedrockConversecaused provider errors because tools are already bound viabind_tools/ agent setup._model_constructor_kwargsin langchain-agents and langchain-messages now alwayspop("tools"); native_graph does the same for the default per-nodeChatOpenAIpath.Tests assert constructors receive temperature, max_tokens, and model name only—no
toolsin the kwargs bag.Reviewed by Cursor Bugbot for commit 2e31f0e. Bugbot is set up for automated code reviews on this repo. Configure here.