Skip to content

docs: lead README with what the SDK does; fix install commands - #55

Merged
tracisiebel merged 1 commit into
mainfrom
devin/1787778716-readme-lead-with-sdk
Aug 27, 2026
Merged

tracisiebel merged 1 commit into
mainfrom
devin/1787778716-readme-lead-with-sdk

Conversation

@ld-paul

@ld-paul ld-paul commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two independent things: a correctness fix to the documented install commands, and the same README restructure as launchdarkly/js-ai-sdk#37.

Install fix (the part that matters)

The documented pip install launchdarkly-ai-python launchdarkly-ai-openai-messages installs fine and then fails on the first call:

RuntimeError: LaunchDarkly server SDK not installed. Run `pip install launchdarkly-server-sdk` or pass a pre-initialized client.

The base Python SDK is an optional peer dependency, not bundled, so both install commands now include launchdarkly-server-sdk. The accompanying sentence dropped the false "no extra setup required" claim, and two references to the unpublished launchdarkly-ai package name are corrected to launchdarkly-ai-python (Quick Start prose and the Core table row).

Copy changes

  • Intro rewritten: title → lead paragraph → runnable openai_messages snippet → ## What you get → TOC
  • ## Repository Layout moved to the end of ## Development as ### Repository layout
  • ## Package Structure → ## Packages, tier sentence no longer leads with "monorepo", ### Handler Packages → ### Pick your providers

Follow-up needed (docs site)

The published docs at https://launchdarkly.com/docs/sdk/ai/python still tell people to install launchdarkly-ai-server and claim it bundles the base Python SDK, which the package metadata does not support. A docs ticket is needed; Paul is filing it.

Implementation details

Verified in two clean virtualenvs against the published packages (launchdarkly-ai-python 0.1.3, launchdarkly-ai-openai-messages 0.1.4):

  • Original command → await init_client() raises the RuntimeError above.
  • Corrected command (adds launchdarkly-server-sdk, resolved 9.16.1) → init_client() returns an LDClient, getting past the SDK import (it then logs the expected 401 for the dummy LD_SDK_KEY).

Also confirmed every TOC anchor resolves after the move, including #what-you-get, #packages, and #repository-layout.

Link to Devin session: https://app.devin.ai/sessions/dcb17f68bb444b0da0e445e406d9c37f
Requested by: @ld-paul

Co-Authored-By: Paul Loeb <ploeb@launchdarkly.com>
@tracisiebel
tracisiebel merged commit 9e7c609 into main Aug 27, 2026
8 checks passed
@tracisiebel
tracisiebel deleted the devin/1787778716-readme-lead-with-sdk branch August 27, 2026 03:48
tracisiebel pushed a commit to launchdarkly/js-ai-sdk that referenced this pull request Aug 27, 2026
## Summary

The README opened with contributor material — a TOC starting at
"Repository Layout" and a one-liner describing the repo as "A Node.js
monorepo…". It now opens with what a developer gets from the SDK, a
minimal `openaiMessages` call, and a "What you get" list; the repository
tree moved to the bottom under `## Development`.

- Intro rewritten: title → lead paragraph → runnable snippet → `## What
you get` → TOC
- `## Repository Layout` moved to the end of `## Development` as `###
Repository layout`
- `## Package Structure` → `## Packages`, tier sentence no longer leads
with "monorepo", `### Handler Packages` → `### Pick your providers`
- Fixed two broken TOC anchors: the body had two `#### 3f.` headings and
labelled the `resolveGraph` section `3e.`, so those headings are
renumbered to `3d.` and `3e.` to match the TOC

Docs-only; install commands are unchanged here, since
`@launchdarkly/ai-node` declares `@launchdarkly/node-server-sdk` as a
hard dependency and the documented `npm install` genuinely works. The
Python README needed an install fix — see launchdarkly/python-ai-sdk#55.

<details>
<summary>Implementation details</summary>

Verified every TOC anchor in the file resolves against a heading after
the move (GitHub slug rules: lowercase, strip punctuation, spaces →
hyphens), including `#what-you-get`, `#packages`, and
`#repository-layout`.

The oddly formatted Quick Start sub-entries (e.g. `` - [3b.
`config(args)](#3b-configargs)` `` with the trailing backtick outside
the link) are left as-is — the anchors resolve, only the backtick
placement is cosmetic.
</details>


Link to Devin session:
https://app.devin.ai/sessions/dcb17f68bb444b0da0e445e406d9c37f
Requested by: @ld-paul

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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