Skip to content

chore: update launchdarkly-server-sdk-ai-openai from ^0.1.0 to ^0.2.0#18

Closed
kinyoklion wants to merge 2 commits into
mainfrom
devin/1773652705-update-sdk-ai-openai
Closed

chore: update launchdarkly-server-sdk-ai-openai from ^0.1.0 to ^0.2.0#18
kinyoklion wants to merge 2 commits into
mainfrom
devin/1773652705-update-sdk-ai-openai

Conversation

@kinyoklion
Copy link
Copy Markdown
Member

@kinyoklion kinyoklion commented Mar 16, 2026

Summary

Bumps launchdarkly-server-sdk-ai-openai from ^0.1.0 (which resolves to >=0.1.0, <0.2.0) to ^0.2.0 (which resolves to >=0.2.0, <0.3.0), picking up the latest release.

Updates since last revision

The 0.1→0.2 bump introduced breaking API changes. A second commit updates the affected example scripts:

  • AIConfigAICompletionConfigDefault — The class used for specifying defaults was renamed.
  • aiclient.config() return value changed — Previously returned a (config_value, tracker) tuple; now returns a single AICompletionConfig object with tracker as an attribute.
  • Tracker access — Changed from tracker.track_*() to config_value.tracker.track_*().

Files updated: openai_example.py, langchain_example.py, bedrock_example.py, gemini_example.py (imports, config call, and tracker access in each).

Files NOT modified (already using the new API on main): chat_judge_example.py, chat_observability_example.py, direct_judge_example.py, langgraph_agent_example.py, langgraph_multi_agent_example.py.

Review & Testing Checklist for Human

  • Verify the four updated examples use the new AICompletionConfigDefault / config_value.tracker pattern correctly — the migration was based on module introspection, not official migration docs.
  • Run poetry install -E openai && poetry run openai-example with valid LAUNCHDARKLY_SDK_KEY and OPENAI_API_KEY to confirm the OpenAI example works end-to-end. (SDK initialization was tested successfully, but no actual LLM call was made during automated testing.)
  • Spot-check at least one other provider example (e.g. bedrock-example or gemini-example) to confirm the tracker access pattern works at runtime.
  • Confirm the five unmodified examples (chat_judge_example, chat_observability_example, direct_judge_example, langgraph_agent_example, langgraph_multi_agent_example) still work — they were already on the new API and were left untouched.

Notes

  • poetry.lock is in .gitignore for this repo, so no lock file update is included.
  • The other AI SDK dependencies (launchdarkly-server-sdk-ai ^0.16.0, launchdarkly-server-sdk-ai-langchain ^0.3.0) already cover their respective latest releases and were left unchanged.

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

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@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

@kinyoklion
Copy link
Copy Markdown
Member Author

Devin, check if any of the human checklist can be done by you instead.

@kinyoklion kinyoklion marked this pull request as ready for review March 16, 2026 15:50
@kinyoklion kinyoklion requested a review from a team as a code owner March 16, 2026 15:50
- AIConfig renamed to AICompletionConfigDefault for defaults
- config() now returns AICompletionConfig directly instead of tuple
- Access tracker via config_value.tracker instead of tuple unpacking
- Updated openai, langchain, bedrock, and gemini examples

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

I checked the human checklist items:

  1. API breaking changes verification — Confirmed. The 0.1→0.2 bump introduced breaking changes:

    • AIConfig was renamed to AICompletionConfigDefault for defaults
    • aiclient.config() now returns a single AICompletionConfig object instead of a (config_value, tracker) tuple
    • Tracker is now accessed via config_value.tracker

    I've updated all four affected examples (openai_example.py, langchain_example.py, bedrock_example.py, gemini_example.py) in the second commit. The other five examples (chat_judge_example, chat_observability_example, direct_judge_example, langgraph_agent_example, langgraph_multi_agent_example) were already using the new API and didn't need changes.

  2. SDK initialization test — Ran the openai example flow with a real SDK key. SDK initialized successfully and the new AICompletionConfig API works correctly (config returned, tracker is present). Did not make an actual LLM call since that requires an OPENAI_API_KEY, but the SDK + AI config integration is verified.

CI (build-and-run) is passing.

@kinyoklion
Copy link
Copy Markdown
Member Author

Devin, update with the latest changes from main, and if this PR is no longer needed, then close it.

@kinyoklion kinyoklion closed this Mar 18, 2026
@kinyoklion kinyoklion reopened this Mar 18, 2026
@kinyoklion kinyoklion closed this Mar 18, 2026
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