From 1ae74ded3413a5a456ae8401e718c3040abf8049 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 1 Apr 2026 14:47:11 -0400 Subject: [PATCH 1/2] chore: Deprecate old langchain package --- integrations/langchain-py/README.md | 29 +++++++++++++++++++++++- integrations/langchain-py/pyproject.toml | 8 +++---- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/integrations/langchain-py/README.md b/integrations/langchain-py/README.md index ec00daef..4772c979 100644 --- a/integrations/langchain-py/README.md +++ b/integrations/langchain-py/README.md @@ -1,9 +1,36 @@ -# braintrust-langchain +# braintrust-langchain (DEPRECATED) [![PyPI version](https://img.shields.io/pypi/v/braintrust-langchain.svg)](https://pypi.org/project/braintrust-langchain/) SDK for integrating [Braintrust](https://braintrust.dev) with [LangChain](https://langchain.com/). This package provides a callback handler to automatically log LangChain executions to Braintrust. +> **This package is deprecated.** The LangChain integration is now included in the main [`braintrust`](https://pypi.org/project/braintrust/) package. + +## Migration + +1. Remove `braintrust-langchain` from your dependencies +2. Install or upgrade `braintrust`: + ```bash + pip install --upgrade braintrust + ``` +3. Update your imports: + ```python + # Before + from braintrust_langchain import BraintrustCallbackHandler, set_global_handler + + # After (option 1: same explicit callback API from the main package) + from braintrust.integrations.langchain import BraintrustCallbackHandler, set_global_handler + + # After (option 2: helper that initializes Braintrust and installs the global handler) + from braintrust.integrations.langchain import setup_langchain + + setup_langchain(project_name="your-project-name") + ``` + +The callback API is the same - no code changes are needed beyond the package/import path. + +--- + ## Installation ```bash diff --git a/integrations/langchain-py/pyproject.toml b/integrations/langchain-py/pyproject.toml index e2b8bbe1..ed5f8ca2 100644 --- a/integrations/langchain-py/pyproject.toml +++ b/integrations/langchain-py/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "braintrust-langchain" -version = "0.2.1" -description = "Integration for LangChain and Braintrust Tracing" +version = "0.3.0" +description = "DEPRECATED: LangChain integration is now included in the main braintrust package. Install braintrust instead." readme = "README.md" requires-python = ">=3.10" dependencies = [ @@ -10,9 +10,9 @@ dependencies = [ ] license = "MIT" authors = [{ name = "Braintrust", email = "info@braintrust.dev" }] -keywords = ["braintrust", "langchain", "llm", "tracing", "ai", "agents"] +keywords = ["braintrust", "langchain", "llm", "tracing", "ai", "agents", "deprecated"] classifiers = [ - "Development Status :: 4 - Beta", + "Development Status :: 7 - Inactive", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", From fc0c621d311437131af065ada6f5e12359fe5e2d Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 1 Apr 2026 14:55:16 -0400 Subject: [PATCH 2/2] pr comment --- integrations/langchain-py/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/langchain-py/pyproject.toml b/integrations/langchain-py/pyproject.toml index ed5f8ca2..20f36e87 100644 --- a/integrations/langchain-py/pyproject.toml +++ b/integrations/langchain-py/pyproject.toml @@ -5,7 +5,7 @@ description = "DEPRECATED: LangChain integration is now included in the main bra readme = "README.md" requires-python = ">=3.10" dependencies = [ - "braintrust>=0.2.1", + "braintrust>=0.12.0", "langchain>=0.3.27", ] license = "MIT"