Skip to content

chore: update LaunchDarkly AI SDK and langchain dependencies to latest versions#20

Merged
kinyoklion merged 2 commits into
mainfrom
devin/1775466393-update-ai-sdk-deps
Apr 6, 2026
Merged

chore: update LaunchDarkly AI SDK and langchain dependencies to latest versions#20
kinyoklion merged 2 commits into
mainfrom
devin/1775466393-update-ai-sdk-deps

Conversation

@kinyoklion
Copy link
Copy Markdown
Member

Summary

Updates LaunchDarkly AI SDK dependencies and the langchain ecosystem to their latest versions. The ldai_langchain 0.4.0 release removed the LangChainProvider class in favor of top-level helper functions, so the three langchain-based examples are updated accordingly.

Dependency changes in pyproject.toml:

Package Old New
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-aws ^0.2.30 ^1.0.0
langchain-openai ^0.3.30 ^1.0.0
langchain-google-genai ^2.1.9 ^4.0.0
langgraph ^0.2.0 ^1.0.0

Code changes: LangChainProvider.get_ai_metrics_from_responseget_ai_metrics_from_response (now a top-level import from ldai_langchain) in langchain_example.py, langgraph_agent_example.py, and langgraph_multi_agent_example.py.

Review & Testing Checklist for Human

  • Verify the langchain 0.x → 1.x migration doesn't break other APIs used in the examples (e.g., init_chat_model, message dict format, ainvoke). Only the LangChainProvider import was updated — other langchain usage was left as-is.
  • Confirm langchain-google-genai ^4.0.0 is correct — this skips the 3.x line. Check that the gemini_example.py still works with this version.
  • Verify poetry.lock is either committed or intentionally gitignored. It is not included in this diff.
  • Run at least one example end-to-end (e.g., poetry run openai-example or poetry run langchain-example) to confirm the updated SDKs work with a real LaunchDarkly AI config.

Notes

  • The non-langchain examples (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.
  • The langchain ecosystem bump from 0.x to 1.x was required because ldai_langchain 0.4.0 itself depends on langchain >=1.0.0.

Link to Devin session: https://app.devin.ai/sessions/c8cf47d46e3f464290a65b6c05862c86
Requested by: @kinyoklion

devin-ai-integration Bot and others added 2 commits April 6, 2026 09:10
…_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>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration devin-ai-integration Bot added the devin-pr PR created by Devin label Apr 6, 2026
@kinyoklion kinyoklion marked this pull request as ready for review April 6, 2026 15:49
@kinyoklion kinyoklion requested a review from a team as a code owner April 6, 2026 15:49
@kinyoklion kinyoklion merged commit 667b4b7 into main Apr 6, 2026
5 checks passed
@kinyoklion kinyoklion deleted the devin/1775466393-update-ai-sdk-deps branch April 6, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devin-pr PR created by Devin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants