[bot] Instrument SGLang offline engine (574,007 weekly downloads)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 55/100
Piste de recherche
Start with py/src/braintrust/integrations/cohere/patchers.py and inspect py/src/braintrust/integrations/, py/src/braintrust/wrappers/, py/pyproject.toml, and py/noxfile.py for existing integration patterns. Read SGLang's Offline Engine API documentation first; done means the listed generate, async_generate, encode, and rerank paths, including streaming and VLM inputs, produce Braintrust spans with project registration and validation coverage.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
<!-- library-gap-audit: sglang-offline-engine -->
Summary
sglang is a high-performance LLM/multimodal serving framework with RadixAttention, continuous batching, and speculative decoding, positioned alongside vllm (already tracked as a separate open instrumentation gap in this repo) as one of the two dominant open-source inference engines. This repository has zero instrumentation for it.
- Current version 0.5.20 (released 2026-09-18), under very active development
- Not present in
py/pyproject.toml[tool.braintrust.matrix], nonoxfile.pysession, no directory underpy/src/braintrust/integrations/orpy/src/braintrust/wrappers/ - Repo-wide grep for
sglangunderpy/returns zero matches
What is missing
SGLang's in-process Offline Engine API (sglang.Engine, docs: https://docs.sglang.io/docs/basic_usage/offline_engine_api) is the primary way Python applications call it directly (as opposed to going through its OpenAI-compatible HTTP server, which a user could separately point the already-instrumented openai client at). None of these produce a Braintrust span today:
Engine.generate()— synchronous text/chat generation, non-streaming and streaming variantsEngine.async_generate()— asyncio generation entrypoint, non-streaming and streaming variants; this is the method the framework's own example server-wrapping code (examples/runtime/engine/custom_server.py) uses to build custom serving layersEngine.encode()— embedding execution (e.g. BERT-base/e5-mistral style models) for retrieval/similarity use casesEngine.rerank()— query/document relevance scoring, analogous to thecohere.rerankspan type this repo already instruments (py/src/braintrust/integrations/cohere/patchers.py)
This engine also supports vision-language model (VLM) inference via the same generate()/async_generate() surface with image inputs.
Weekly downloads
Weekly downloads: 574,007 (as of 2026-09-21; https://pypistats.org/api/packages/sglang/recent)
Braintrust docs status
not_found — checked https://www.braintrust.dev/docs/integrations/ai-providers and https://www.braintrust.dev/docs/guides/traces/integrations; neither mentions SGLang. (vllm, the closest analog, is also absent from both pages and is tracked separately.)
Upstream sources
- GitHub: https://github.com/sgl-project/sglang
- PyPI: https://pypi.org/project/sglang/ (v0.5.20, released 2026-09-18)
- Offline Engine API docs: https://docs.sglang.io/docs/basic_usage/offline_engine_api
Local repo files inspected
py/src/braintrust/integrations/— nosglang/directorypy/src/braintrust/wrappers/— no SGLang wrapperpy/pyproject.toml[tool.braintrust.matrix]— nosglangentrypy/noxfile.py— notest_sglangsession- Repo-wide case-insensitive grep for
sglangunderpy/— zero matches
- Langage dominant
- Python
- Étoiles
- 19
- Forks
- 17
- Merge moyen
- 1 j 5 h
- PR mergées (30 j)
- 61
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de braintrustdata/braintrust-sdk-python
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
braintrustdata/braintrust-sdk-python#797 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
braintrustdata/braintrust-sdk-python#774 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 65/100
braintrustdata/braintrust-sdk-python#799 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
braintrustdata/braintrust-sdk-python#798 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
braintrustdata/braintrust-sdk-python#787 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de braintrustdata/braintrust-sdk-python
Issues similaires
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
kristofdegrave/homeassistant-smart-charging#1413 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
nasa/earthdata-varinfo#113 ·
-
curriculum documentation quality
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
githubnext/gh-aw-workshop#3849 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour