Skip to content

ci: auto-bump provider package server-ai dep on release#178

Merged
jsonbailey merged 1 commit into
mainfrom
jb/release-please-provider-dep-sync
May 12, 2026
Merged

ci: auto-bump provider package server-ai dep on release#178
jsonbailey merged 1 commit into
mainfrom
jb/release-please-provider-dep-sync

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

@jsonbailey jsonbailey commented May 7, 2026

The bug

The langchain and openai provider packages declare a hard dependency lower bound on launchdarkly-server-sdk-ai that is allowed to drift below the actual minimum version they require. As of provider versions langchain 0.7.0 and openai 0.6.0 (queued in the open release-please PR #171), both packages import AIGraphMetrics from ldai.providers.types — a symbol that only exists in launchdarkly-server-sdk-ai >=0.20.0 (it was renamed from GraphMetrics in that release).

But both pyproject.toml files still declare launchdarkly-server-sdk-ai>=0.19.0. A consumer who installs the provider against server-ai 0.19.0 will hit ImportError at runtime.

This is a chronic risk: every breaking change in server-ai means the provider lower bounds need to be bumped manually. We want release-please to handle that automatically so we stop forgetting.

The fix

Two coordinated changes:

1. Auto-bump on every server-ai release (release-please config)

Add the provider pyproject.toml files to the server-ai package's extra-files in release-please-config.json, using leading-/ (repo-root absolute) paths:

"extra-files": [
  "src/ldai/__init__.py",
  "PROVENANCE.md",
  "/packages/ai-providers/server-ai-langchain/pyproject.toml",
  "/packages/ai-providers/server-ai-openai/pyproject.toml"
]

Combined with an inline # x-release-please-version annotation on the dependency line in each provider pyproject.toml:

"launchdarkly-server-sdk-ai>=0.20.0", # x-release-please-version

…release-please's Generic updater will rewrite the semver-looking value on that line to the new server-ai version each time the server-ai package is released — without disturbing anything else in the file. (The TOML parser sees the # comment as a no-op trailing comment on the array element; verified that the file still parses cleanly.)

This is the minimum-impact configuration: no plugins added, no workflow changes, no restructuring of the existing release flow. The linked-versions plugin is the wrong tool here because it forces the linked components to share a version — we want each provider to keep its own version history and just track the most-recent server-ai release in its lower bound.

2. Manual bump from >=0.19.0>=0.20.0

Release-please will only auto-bump on future server-ai releases. The currently-open release PR #171 already cuts server-ai 0.20.0, langchain 0.7.0, and openai 0.6.0 — but it does not touch the dep lower bound (the auto-bump isn't configured yet). So the immediate broken bound has to be fixed by hand in this PR.

After this PR merges, release-please will regenerate PR #171, and future server-ai releases will pick up the new auto-bump behaviour for free.

Verification

  • make lint passes (server-ai, langchain, openai)
  • Both provider pyproject.toml files still parse with tomllib; the annotation comment is invisible to the TOML parser.
  • Locally simulated the Generic updater against the modified langchain/openai pyproject.toml files using release-please 17.6.0 (the version bundled with release-please-action@v5.0.0) — confirmed that a server-ai bump from 0.20.0 → 0.21.0 rewrites the dep line to >=0.21.0 and a 0.20.0 → 1.0.0 bump rewrites it to >=1.0.0, leaving the rest of the file untouched.

Test plan

  • Reviewer: glance at release-please-config.json and the two annotated dep lines.
  • After merge: confirm release-please regenerates PR chore: release main #171 and the provider pyproject.toml lower bounds remain >=0.20.0 (no regression) — the auto-bump only fires on the next server-ai release after chore: release main #171 ships.
  • Future server-ai release: verify the corresponding release PR includes a diff to both provider pyproject.toml dep lines bumping the lower bound.

Note

Low Risk
Low risk: release/packaging config-only changes that tighten dependency constraints and adjust release-please file updating, with no runtime logic changes.

Overview
Updates the LangChain and OpenAI provider pyproject.toml files to require launchdarkly-server-sdk-ai>=0.20.0 and annotates the line with # x-release-please-version so it can be rewritten automatically.

Extends release-please-config.json for packages/sdk/server-ai to treat both provider pyproject.toml files as extra-files, ensuring future server-ai releases bump the providers’ minimum dependency in generated release PRs.

Reviewed by Cursor Bugbot for commit f2782b1. Bugbot is set up for automated code reviews on this repo. Configure here.

Configure release-please to keep the provider packages' lower bound on
launchdarkly-server-sdk-ai in sync with the most-recently-released
server-ai version, so a langchain/openai provider release can never ship
with a lower bound that resolves to a server-ai version missing symbols
the provider imports.

The server-ai package's `extra-files` now also targets the langchain and
openai pyproject.toml files. An inline `# x-release-please-version`
annotation on the dependency line lets the Generic updater rewrite the
pinned version on each server-ai release without touching the rest of
the file.

Also bumps the lower bound from `>=0.19.0` to `>=0.20.0` to fix the
already-broken bound: provider versions 0.7.0 (langchain) and 0.6.0
(openai) import `AIGraphMetrics`, which only exists in
launchdarkly-server-sdk-ai >=0.20.0 (renamed from `GraphMetrics`).
@jsonbailey jsonbailey force-pushed the jb/release-please-provider-dep-sync branch from 4a56067 to f2782b1 Compare May 11, 2026 14:19
@jsonbailey jsonbailey marked this pull request as ready for review May 12, 2026 13:40
@jsonbailey jsonbailey requested a review from a team as a code owner May 12, 2026 13:40
Comment thread release-please-config.json
@jsonbailey jsonbailey merged commit 137296b into main May 12, 2026
83 of 86 checks passed
@jsonbailey jsonbailey deleted the jb/release-please-provider-dep-sync branch May 12, 2026 13:57
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.

2 participants