Skip to main content

launchdarkly-ai-litellm-messages

Experimental. This package stays on 0.x until the Python and JavaScript LiteLLM integrations match.

Provider-agnostic LaunchDarkly AI Config handler backed by LiteLLM's in-process acompletion API.

Installation

pip install "launchdarkly-ai-server[ld]" launchdarkly-ai-litellm-messages

Python uses LiteLLM in-process; no proxy endpoint is required. Set the provider credentials required by the models in your AI Config, such as OPENAI_API_KEY or ANTHROPIC_API_KEY. Standard LiteLLM configuration, gateways, and model aliases are supported.

To route every call through a specific endpoint or key instead (for example a LiteLLM proxy), pass base_url / api_key to create_litellm_messages_handler. These come from your code, never from the AI Config's model.parameters — an AI Config variation cannot redirect the request.

Usage

from launchdarkly_ai_litellm_messages import create_litellm_messages_handler
from launchdarkly_ai_server import config

result = await config(
    key="assistant",
    handler=create_litellm_messages_handler(),
).invoke("Hello", {"kind": "user", "key": "user-123"})

The evaluated AI Config model name is passed directly to LiteLLM, so standard LiteLLM model prefixes, gateways, and aliases are supported. The one rewrite is for Bedrock: a bedrock/... name, or a bare name when the provider is Bedrock, gets model.region (us, global, ...) prepended to the model id as its cross-region inference-profile prefix, unless the id already has one. A name containing an ARN is sent as configured. Tool calls, structured output, multimodal history, and streaming are supported without constructing a provider-native client.

Because this is a wildcard messages handler, do not register it together with another ["*", "messages"] handler such as LangChain in the same registry.

Metadata

Release files for launchdarkly-ai-litellm-messages 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for launchdarkly-ai-litellm-messages 1.1.0
File Size Uploaded Provenance Actions
launchdarkly_ai_litellm_messages-1.1.0.tar.gz 19.9 kB Without provenance Details for launchdarkly_ai_litellm_messages-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for launchdarkly-ai-litellm-messages 1.1.0
File Interpreter ABI Platform Actions
launchdarkly_ai_litellm_messages-1.1.0-py3-none-any.whl Python 3 none any Details for launchdarkly_ai_litellm_messages-1.1.0-py3-none-any.whl

Total release size: 30.2 kB

Release files / launchdarkly_ai_litellm_messages-1.1.0.tar.gz

Download URL launchdarkly_ai_litellm_messages-1.1.0.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5f18fc77597a603e522c904f92dd0d7130669b64bf974a6a3700bb12ab861968
BLAKE2b-256 checksum
How to use checksums
8c525d2e40caabe1eb8cfe19c660f83c5c7c3bf0c26f13988aa074b7c27ce1d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / launchdarkly_ai_litellm_messages-1.1.0-py3-none-any.whl

Download URL launchdarkly_ai_litellm_messages-1.1.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d49cff94ee6dc932900ff692efb5dc966788131c7977a28f36c410359c1e1bfe
BLAKE2b-256 checksum
How to use checksums
3cd0345bc16d5bd2daabeefd87134222e0b46fe8c7f7246b1619a5641f27ae9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for launchdarkly-ai-litellm-messages 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page