Skip to content
angelatgithub edited this page Sep 19, 2026 · 1 revision

vLLM — vllm-algenta

build_client / build_async_client — two thin helpers that point the standard, unmodified openai Python client at your engine's OpenAI-compatible /v1/chat/completions and /v1/responses surface, resolving the right base_url/api_key.

PyPI

Direction, stated plainly: this package is vLLM (or any OpenAI-client-shaped consumer) calling into Algenta — never Algenta calling out to a vLLM-hosted model. The reverse direction isn't buildable in this repository (it would mean engine-side logic, which the no-engine-dependency gate forbids).

Install

pip install vllm-algenta

One dependency: the real openai client (>=1.50).

Quickstart

import os
from vllm_algenta.client import build_client

client = build_client(
    base_url="http://localhost:8000",         # your engine's bare HTTP origin — no /mcp suffix
    api_key=os.environ["ALGENTA_API_KEY"],     # required — raises immediately if unset
)
resp = client.chat.completions.create(
    model="text.tokenizer",
    messages=[{"role": "user", "content": "Summarize this quarter's decision log."}],
)
print(resp.choices[0].message.content)

base_url resolves from base_url= → ALGENTA_BASE_URL → http://localhost:8000; the package appends /v1 itself. api_key resolves from api_key= or ALGENTA_API_KEY with no fallback — every route on the engine's LLM API requires an authenticated, org-bound caller.

Profiles

Not applicable — this package exposes no MCP tools. The tool-profile contract governs the engine's MCP surface; this package speaks to the separate OpenAI-compatible HTTP API.

Notes

  • Capability status is documented honestly and re-verified — the package README's table says what works against the served API today: basic chat completions work; finish_reason and tool calling work but are model-dependent (the zero-config default text.tokenizer deterministically returns "stop" and loudly rejects tools= with 422 model_capability_unsupported); streaming is synthetic post-hoc rechunking by default, and streaming + an actual tool call is refused. Known gap: the package's /v1/responses coverage models a narrower shape than the real engine now supports (tools, previous_response_id, typed input arrays) — tracked, and documented in the README rather than implied otherwise.
  • Tests: real FastAPI stub on a real uvicorn socket, driven with the real openai client — uv run pytest vllm-algenta -v.

Full reference: package README (full capability table with evidence, auth rationale, base-URL suffix gotcha).

Clone this wiki locally