chore: update LaunchDarkly AI SDK and langchain dependencies to latest versions#20
Merged
Merged
Conversation
…_response Replace LangChainProvider.get_ai_metrics_from_response with the top-level get_ai_metrics_from_response function from ldai_langchain, which is the new API in launchdarkly-server-sdk-ai-langchain 0.4.0. Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
- launchdarkly-server-sdk-ai: ^0.16.1 -> ^0.17.0 - launchdarkly-server-sdk-ai-langchain: ^0.3.2 -> ^0.4.0 - launchdarkly-server-sdk-ai-openai: ^0.2.1 -> ^0.3.0 - langchain: ^0.3.0 -> ^1.0.0 - langchain-core: ^0.3.0 -> ^1.0.0 - langchain-openai: ^0.3.30 -> ^1.0.0 - langchain-aws: ^0.2.30 -> ^1.0.0 - langchain-google-genai: ^2.1.9 -> ^4.0.0 - langgraph: ^0.2.0 -> ^1.0.0 Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
jsonbailey
approved these changes
Apr 6, 2026
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.
Summary
Updates LaunchDarkly AI SDK dependencies and the langchain ecosystem to their latest versions. The
ldai_langchain0.4.0 release removed theLangChainProviderclass in favor of top-level helper functions, so the three langchain-based examples are updated accordingly.Dependency changes in
pyproject.toml:launchdarkly-server-sdk-ailaunchdarkly-server-sdk-ai-langchainlaunchdarkly-server-sdk-ai-openailangchainlangchain-corelangchain-awslangchain-openailangchain-google-genailanggraphCode changes:
LangChainProvider.get_ai_metrics_from_response→get_ai_metrics_from_response(now a top-level import fromldai_langchain) inlangchain_example.py,langgraph_agent_example.py, andlanggraph_multi_agent_example.py.Review & Testing Checklist for Human
init_chat_model, message dict format,ainvoke). Only theLangChainProviderimport was updated — other langchain usage was left as-is.langchain-google-genai^4.0.0 is correct — this skips the 3.x line. Check that thegemini_example.pystill works with this version.poetry.lockis either committed or intentionally gitignored. It is not included in this diff.poetry run openai-exampleorpoetry run langchain-example) to confirm the updated SDKs work with a real LaunchDarkly AI config.Notes
openai_example.py,bedrock_example.py,gemini_example.py,chat_judge_example.py,chat_observability_example.py,direct_judge_example.py) were not modified. Their imports were verified to still resolve, but they were not tested end-to-end.ldai_langchain0.4.0 itself depends onlangchain >=1.0.0.Link to Devin session: https://app.devin.ai/sessions/c8cf47d46e3f464290a65b6c05862c86
Requested by: @kinyoklion