Skip to content

migrate braintrust langchain into main pkg#142

Open
ViaDézo1er / cedric (viadezo1er) wants to merge 15 commits intomainfrom
cedric/migrate-braintrust-langchain-into-main-pkg
Open

migrate braintrust langchain into main pkg#142
ViaDézo1er / cedric (viadezo1er) wants to merge 15 commits intomainfrom
cedric/migrate-braintrust-langchain-into-main-pkg

Conversation

@viadezo1er
Copy link
Copy Markdown
Contributor

@viadezo1er ViaDézo1er / cedric (viadezo1er) commented Mar 25, 2026

DRAFT

Migration Guide: braintrust-langchain to braintrust

Before (old)

pip install braintrust-langchain
from braintrust_langchain import BraintrustCallbackHandler, set_global_handler
handler = BraintrustCallbackHandler()
set_global_handler(handler)

After (new)

pip install braintrust

Option 1: Auto-instrument (recommended)

from braintrust import auto_instrument
auto_instrument()

What stays the same

  • All public APIs (BraintrustCallbackHandler, BraintrustTracer, set_global_handler, clear_global_handler) work identically
  • Existing from braintrust_langchain import ... imports still work but emit a DeprecationWarning
  • Full support for chains, LLMs, tools, retrievers, agents, LangGraph, streaming, and async

What to update

  • Change imports from braintrust_langchain to braintrust.integrations.langchain (or use auto_instrument())
  • Remove braintrust-langchain from your dependencies — braintrust now includes LangChain support with no extra package

@viadezo1er ViaDézo1er / cedric (viadezo1er) marked this pull request as ready for review March 25, 2026 20:49
@viadezo1er ViaDézo1er / cedric (viadezo1er) marked this pull request as draft March 25, 2026 20:51
@viadezo1er
Copy link
Copy Markdown
Contributor Author

well have to fix the CI

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.

1 participant