From 7377df0aba481af0019128c37f88570f7d548dea Mon Sep 17 00:00:00 2001 From: Andrew Klatzke Date: Fri, 31 Jul 2026 14:13:28 -0800 Subject: [PATCH] chore: rename launchdarkly-ai to launchdarkly-ai-python The name "launchdarkly-ai" is too broad for a convenience barrel package. Renames the package, module directory, and all references to "launchdarkly-ai-python" / "launchdarkly_ai_python". Co-authored-by: Cursor --- README.md | 4 +- packages/ai/README.md | 14 +++---- packages/ai/agents.md | 4 +- packages/ai/pyproject.toml | 6 +-- .../__init__.py | 0 .../py.typed | 0 packages/ai/tests/test_reexports.py | 10 ++--- packages/claude-agents/agents.md | 2 +- packages/claude-messages/agents.md | 2 +- packages/langchain-agents/agents.md | 2 +- packages/langchain-messages/agents.md | 2 +- packages/openai-agents/agents.md | 2 +- packages/openai-messages/agents.md | 2 +- pyproject.toml | 2 +- release-please-config.json | 2 +- uv.lock | 42 +++++++++---------- 16 files changed, 48 insertions(+), 48 deletions(-) rename packages/ai/src/{launchdarkly_ai => launchdarkly_ai_python}/__init__.py (100%) rename packages/ai/src/{launchdarkly_ai => launchdarkly_ai_python}/py.typed (100%) diff --git a/README.md b/README.md index 440c860..4c34a29 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ python-ai-sdk/ │ └── utils.py # Shared helpers (new_context, write_output) ├── packages/ │ ├── client/ # launchdarkly-ai-server — core client (Tier 0) -│ ├── ai/ # launchdarkly-ai — convenience barrel re-export +│ ├── ai/ # launchdarkly-ai-python — convenience barrel re-export │ ├── claude-agents/ # launchdarkly-ai-claude-agents │ ├── claude-messages/ # launchdarkly-ai-claude-messages │ ├── openai-agents/ # launchdarkly-ai-openai-agents @@ -95,7 +95,7 @@ Tier 0 — Core Client (launchdarkly-ai-server) ### 1. Install ```bash -pip install launchdarkly-ai launchdarkly-ai-openai-messages +pip install launchdarkly-ai-python launchdarkly-ai-openai-messages ``` `launchdarkly-ai` is a thin barrel that re-exports all of `launchdarkly-ai-server`. `init_client()` auto-discovers `launchdarkly-server-sdk` at runtime — no extra setup required. diff --git a/packages/ai/README.md b/packages/ai/README.md index 08ccbfc..e35135b 100644 --- a/packages/ai/README.md +++ b/packages/ai/README.md @@ -1,29 +1,29 @@ -# `launchdarkly-ai` +# `launchdarkly-ai-python` Convenience barrel package for the LaunchDarkly AI Python SDK. Re-exports the complete public API of [`launchdarkly-ai-server`](../client/README.md) — install this instead of `launchdarkly-ai-server` for the simplest setup. ## Installation ```bash -pip install launchdarkly-ai launchdarkly-ai-openai-messages +pip install launchdarkly-ai-python launchdarkly-ai-openai-messages ``` To enable trace export to the LaunchDarkly Observability dashboard, install the `otel` extras group: ```bash -pip install "launchdarkly-ai[otel]" +pip install "launchdarkly-ai-python[otel]" ``` `init_client()` detects the OTel packages at runtime and configures tracing automatically. If the extras are not installed, a single warning is logged and all AI calls continue normally with no-op spans. ## Usage -Import everything from `launchdarkly_ai` instead of `launchdarkly_ai_server`: +Import everything from `launchdarkly_ai_python` instead of `launchdarkly_ai_server`: ```python import asyncio -from launchdarkly_ai import config, graph, resolve_graph -from launchdarkly_ai import init_client, shutdown, global_registry +from launchdarkly_ai_python import config, graph, resolve_graph +from launchdarkly_ai_python import init_client, shutdown, global_registry from launchdarkly_ai_openai_messages import create_openai_messages_handler async def main(): @@ -43,7 +43,7 @@ asyncio.run(main()) Reads an AI Config flag variation **without invoking any AI provider**. Re-exported from `launchdarkly-ai-server` — see the [full reference there](../client/README.md#inspect_configkey-context). ```python -from launchdarkly_ai import inspect_config +from launchdarkly_ai_python import inspect_config result = await inspect_config("my-ai-config-flag", {"kind": "user", "key": "user-123"}) if result["enabled"]: diff --git a/packages/ai/agents.md b/packages/ai/agents.md index 7bdba24..6bdc0d1 100644 --- a/packages/ai/agents.md +++ b/packages/ai/agents.md @@ -51,7 +51,7 @@ Install the OTel packages alongside this package: ```sh pip install "launchdarkly-ai[otel]" # or: -pip install launchdarkly-ai opentelemetry-sdk opentelemetry-exporter-otlp-proto-http +pip install launchdarkly-ai-python opentelemetry-sdk opentelemetry-exporter-otlp-proto-http ``` Once the OTel packages are installed, spans from all handler packages are automatically collected when `init_client()` runs. @@ -69,7 +69,7 @@ For OTLP endpoint configuration see the [`launchdarkly-ai-server` agents.md](../ - **You don't need to call it** — lazy init runs automatically on the first `config().invoke()` call as long as `LD_SDK_KEY` is set. - **Call it explicitly** when you need custom `serviceName`/`environment`, a custom OTLP endpoint, or want to pre-warm the connection before the first user request: ```python - from launchdarkly_ai import init_client + from launchdarkly_ai_python import init_client await init_client({"serviceName": "my-service", "environment": "production"}) ``` - **For BYOC / custom runtimes**, use `launchdarkly-ai-server` directly and pass a pre-initialized client: `await init_client(my_custom_client)`. Do not use this package for custom runtimes — it carries `launchdarkly-server-sdk` as a hard dependency which may conflict. diff --git a/packages/ai/pyproject.toml b/packages/ai/pyproject.toml index da1d4ac..ebd4652 100644 --- a/packages/ai/pyproject.toml +++ b/packages/ai/pyproject.toml @@ -1,9 +1,9 @@ [project] -name = "launchdarkly-ai" +name = "launchdarkly-ai-python" version = "0.0.0" requires-python = ">=3.12" dependencies = ["launchdarkly-ai-server"] -description = "LaunchDarkly AI SDK for Python — convenience wrapper" +description = "LaunchDarkly AI SDK for Python — convenience barrel re-export" readme = "README.md" license = "Apache-2.0" authors = [{name = "LaunchDarkly", email = "team@launchdarkly.com"}] @@ -30,4 +30,4 @@ requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] -packages = ["src/launchdarkly_ai"] +packages = ["src/launchdarkly_ai_python"] diff --git a/packages/ai/src/launchdarkly_ai/__init__.py b/packages/ai/src/launchdarkly_ai_python/__init__.py similarity index 100% rename from packages/ai/src/launchdarkly_ai/__init__.py rename to packages/ai/src/launchdarkly_ai_python/__init__.py diff --git a/packages/ai/src/launchdarkly_ai/py.typed b/packages/ai/src/launchdarkly_ai_python/py.typed similarity index 100% rename from packages/ai/src/launchdarkly_ai/py.typed rename to packages/ai/src/launchdarkly_ai_python/py.typed diff --git a/packages/ai/tests/test_reexports.py b/packages/ai/tests/test_reexports.py index b0e3e08..de16427 100644 --- a/packages/ai/tests/test_reexports.py +++ b/packages/ai/tests/test_reexports.py @@ -1,5 +1,5 @@ """ -Tests for §5 launchdarkly-ai re-export barrel. +Tests for §5 launchdarkly-ai-python re-export barrel. Reference: TESTING.md §5 """ @@ -9,20 +9,20 @@ class TestReexports: def test_all_named_exports_from_server_are_reexported(self) -> None: server = importlib.import_module("launchdarkly_ai_server") - barrel = importlib.import_module("launchdarkly_ai") + barrel = importlib.import_module("launchdarkly_ai_python") for name in server.__all__: assert hasattr(barrel, name), ( - f"launchdarkly_ai is missing re-export: {name!r}" + f"launchdarkly_ai_python is missing re-export: {name!r}" ) def test_reexported_values_are_identical_references(self) -> None: server = importlib.import_module("launchdarkly_ai_server") - barrel = importlib.import_module("launchdarkly_ai") + barrel = importlib.import_module("launchdarkly_ai_python") for name in server.__all__: server_obj = getattr(server, name) barrel_obj = getattr(barrel, name) assert server_obj is barrel_obj, ( - f"launchdarkly_ai.{name} is not the same object as launchdarkly_ai_server.{name}" + f"launchdarkly_ai_python.{name} is not the same object as launchdarkly_ai_server.{name}" ) diff --git a/packages/claude-agents/agents.md b/packages/claude-agents/agents.md index 5333285..45f64c0 100644 --- a/packages/claude-agents/agents.md +++ b/packages/claude-agents/agents.md @@ -155,7 +155,7 @@ Span names and attributes are described in [Implementation Details → Telemetry - **Pass custom options** — `serviceName`, `environment`, or OTel configuration: ```python - from launchdarkly_ai import init_client # or launchdarkly_ai_server + from launchdarkly_ai_python import init_client # or launchdarkly_ai_server await init_client({"serviceName": "my-service", "environment": "production"}) ``` - **Use a custom or edge runtime (BYOC path)** — pass a pre-initialized client that satisfies `LDClientInterface`: diff --git a/packages/claude-messages/agents.md b/packages/claude-messages/agents.md index e29b49d..801a760 100644 --- a/packages/claude-messages/agents.md +++ b/packages/claude-messages/agents.md @@ -137,7 +137,7 @@ Span names and attributes are described in [Implementation Details → Telemetry - **Pass custom options** — `serviceName`, `environment`, or OTel configuration: ```python - from launchdarkly_ai import init_client # or launchdarkly_ai_server + from launchdarkly_ai_python import init_client # or launchdarkly_ai_server await init_client({"serviceName": "my-service", "environment": "production"}) ``` - **Use a custom or edge runtime (BYOC path)** — pass a pre-initialized client that satisfies `LDClientInterface`: diff --git a/packages/langchain-agents/agents.md b/packages/langchain-agents/agents.md index 662829c..c27997c 100644 --- a/packages/langchain-agents/agents.md +++ b/packages/langchain-agents/agents.md @@ -160,7 +160,7 @@ Span names and attributes are described in [Implementation Details → Telemetry - **Pass custom options** — `serviceName`, `environment`, or OTel configuration: ```python - from launchdarkly_ai import init_client # or launchdarkly_ai_server + from launchdarkly_ai_python import init_client # or launchdarkly_ai_server await init_client({"serviceName": "my-service", "environment": "production"}) ``` - **Use a custom or edge runtime (BYOC path)** — pass a pre-initialized client that satisfies `LDClientInterface`: diff --git a/packages/langchain-messages/agents.md b/packages/langchain-messages/agents.md index 81cb0b0..1100c24 100644 --- a/packages/langchain-messages/agents.md +++ b/packages/langchain-messages/agents.md @@ -147,7 +147,7 @@ Span names and attributes are described in [Implementation Details → Telemetry - **Pass custom options** — `serviceName`, `environment`, or OTel configuration: ```python - from launchdarkly_ai import init_client # or launchdarkly_ai_server + from launchdarkly_ai_python import init_client # or launchdarkly_ai_server await init_client({"serviceName": "my-service", "environment": "production"}) ``` - **Use a custom or edge runtime (BYOC path)** — pass a pre-initialized client that satisfies `LDClientInterface`: diff --git a/packages/openai-agents/agents.md b/packages/openai-agents/agents.md index 9ce2c79..1af937a 100644 --- a/packages/openai-agents/agents.md +++ b/packages/openai-agents/agents.md @@ -147,7 +147,7 @@ Span names and attributes are described in [Implementation Details → Telemetry - **Pass custom options** — `serviceName`, `environment`, or OTel configuration: ```python - from launchdarkly_ai import init_client # or launchdarkly_ai_server + from launchdarkly_ai_python import init_client # or launchdarkly_ai_server await init_client({"serviceName": "my-service", "environment": "production"}) ``` - **Use a custom or edge runtime (BYOC path)** — pass a pre-initialized client that satisfies `LDClientInterface`: diff --git a/packages/openai-messages/agents.md b/packages/openai-messages/agents.md index 53cc578..cd00791 100644 --- a/packages/openai-messages/agents.md +++ b/packages/openai-messages/agents.md @@ -135,7 +135,7 @@ Span names and attributes are described in [Implementation Details → Telemetry - **Pass custom options** — `serviceName`, `environment`, or OTel configuration: ```python - from launchdarkly_ai import init_client # or launchdarkly_ai_server + from launchdarkly_ai_python import init_client # or launchdarkly_ai_server await init_client({"serviceName": "my-service", "environment": "production"}) ``` - **Use a custom or edge runtime (BYOC path)** — pass a pre-initialized client that satisfies `LDClientInterface`: diff --git a/pyproject.toml b/pyproject.toml index 9530e1a..f8ae52e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ ignore = [ [tool.ruff.lint.isort] known-first-party = [ - "launchdarkly_ai", + "launchdarkly_ai_python", "launchdarkly_ai_server", "launchdarkly_ai_claude_agents", "launchdarkly_ai_claude_messages", diff --git a/release-please-config.json b/release-please-config.json index 899947e..3174287 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -22,7 +22,7 @@ "extra-files": [ "src/launchdarkly_ai/__init__.py" ], - "component": "launchdarkly-ai" + "component": "launchdarkly-ai-python" }, "packages/claude-agents": { "release-type": "python", diff --git a/uv.lock b/uv.lock index ad8d1a9..98dfba5 100644 --- a/uv.lock +++ b/uv.lock @@ -13,13 +13,13 @@ resolution-markers = [ [manifest] members = [ - "launchdarkly-ai", "launchdarkly-ai-claude-agents", "launchdarkly-ai-claude-messages", "launchdarkly-ai-langchain-agents", "launchdarkly-ai-langchain-messages", "launchdarkly-ai-openai-agents", "launchdarkly-ai-openai-messages", + "launchdarkly-ai-python", "launchdarkly-ai-server", ] @@ -788,26 +788,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9e/fb/dc9f70b5581371fba7b01ba0704fe859bfcd12c4dad82b42ec12bd4160b1/langsmith-0.9.3-py3-none-any.whl", hash = "sha256:aac85686868a7e61d77858b880230e510583c61ea48ac0a197e6ceff64ffb22b", size = 619927, upload-time = "2026-06-26T15:56:28.301Z" }, ] -[[package]] -name = "launchdarkly-ai" -version = "0.0.0" -source = { editable = "packages/ai" } -dependencies = [ - { name = "launchdarkly-ai-server" }, -] - -[package.optional-dependencies] -otel = [ - { name = "launchdarkly-ai-server", extra = ["otel"] }, -] - -[package.metadata] -requires-dist = [ - { name = "launchdarkly-ai-server", editable = "packages/client" }, - { name = "launchdarkly-ai-server", extras = ["otel"], marker = "extra == 'otel'", editable = "packages/client" }, -] -provides-extras = ["otel"] - [[package]] name = "launchdarkly-ai-claude-agents" version = "0.0.0" @@ -916,6 +896,26 @@ requires-dist = [ { name = "opentelemetry-api", specifier = ">=1.25" }, ] +[[package]] +name = "launchdarkly-ai-python" +version = "0.0.0" +source = { editable = "packages/ai" } +dependencies = [ + { name = "launchdarkly-ai-server" }, +] + +[package.optional-dependencies] +otel = [ + { name = "launchdarkly-ai-server", extra = ["otel"] }, +] + +[package.metadata] +requires-dist = [ + { name = "launchdarkly-ai-server", editable = "packages/client" }, + { name = "launchdarkly-ai-server", extras = ["otel"], marker = "extra == 'otel'", editable = "packages/client" }, +] +provides-extras = ["otel"] + [[package]] name = "launchdarkly-ai-server" version = "0.0.0"