launchdarkly-ai-vercel-messages
Wildcard LaunchDarkly AI messages handler built on the official Vercel AI SDK
for Python. It builds Vercel's creator/model id from the evaluated provider
and model, while preserving already-qualified Gateway ids.
Install
pip install "launchdarkly-ai-server[ld]" launchdarkly-ai-vercel-messages
Default routing is AI Gateway: for example, xAI + grok-4.5 becomes
spacexai/grok-4.5 before calling ai.get_model. Set AI_GATEWAY_API_KEY, or use Vercel OIDC with the
ai[vercel] extra. Provider keys such as OPENAI_API_KEY are ignored on that
path. This package does not import langchain-openai or other provider SDKs
from config.provider.name. To call a model directly, inject model= with an
already configured model or a sync/async factory:
import ai
from launchdarkly_ai_vercel_messages import vercel_messages
result = await vercel_messages(
key,
user_input,
context,
model=lambda cfg: ai.Model(
id=cfg["model"]["name"],
provider=ai.get_provider("openai"),
),
)
All LaunchDarkly providers are handled explicitly. Anthropic, OpenAI, Azure, Gemini, Cohere, DeepSeek, Meta, Mistral, Perplexity, and Vertex map directly. Bedrock, Cortex, Cursor, Databricks, and Fireworks AI infer the creator from the model and fail locally if ambiguous. AI21 Labs and IBM Watson fail locally because Vercel's current catalog has no corresponding creator.
experimental_evaluate / vercelEvaluate is TypeScript-only until the official
Python ai package ships the same API.
Use
from launchdarkly_ai_server import config
from launchdarkly_ai_vercel_messages import create_vercel_messages_handler
result = await config(
key="my-ai-config",
handler=create_vercel_messages_handler(),
).invoke("Hello", {"kind": "user", "key": "user-123"})
The factory accepts model=<model or sync/async factory> and
capture_content=False. It advertises ("*", "messages"); register only one
wildcard messages adapter (Vercel, LangChain, etc.) in a handler pool.
The adapter maps native text and multimodal history, callable tools, streaming, structured JSON output, usage, and LaunchDarkly telemetry. Flag parameters cannot replace handler-owned model, credentials, messages, tools, stream lifecycle, output contract, or loop controls.
Metadata
Release files for launchdarkly-ai-vercel-messages 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| launchdarkly_ai_vercel_messages-1.0.2.tar.gz | 22.2 kB | Without provenance | Details for launchdarkly_ai_vercel_messages-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| launchdarkly_ai_vercel_messages-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for launchdarkly_ai_vercel_messages-1.0.2-py3-none-any.whl |
Total release size: 35.5 kB
Release files / launchdarkly_ai_vercel_messages-1.0.2.tar.gz
| Download URL | launchdarkly_ai_vercel_messages-1.0.2.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecc7b7469f77d7589a3dc4f51ffce778af7cae76b26fc3e589e5cfb1cfd37559
|
|
BLAKE2b-256 checksum How to use checksums |
228f491c56a98f7c1f5fd846ec87bd367eb7b6b0c76bf5053ac75ff98c5ea301
|
| 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_vercel_messages-1.0.2-py3-none-any.whl
| Download URL | launchdarkly_ai_vercel_messages-1.0.2-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2491b5806590433235274ec6dc1d088acbcb9209895e781c6f4d2fa1aefefd65
|
|
BLAKE2b-256 checksum How to use checksums |
e4f92b01d39c35c176e2712afaedbc134546bbdd85e43a0078e952a5ce835f51
|
| 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-vercel-messages 1.0.2
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.