[bot] Add Outlines integration for structured-generation execution instrumentation (648,297 weekly downloads)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- python
- 領域
- ai, observability-sre
研究方向
從 py/src/braintrust/integrations/instructor/ 開始,檢查周圍的整合與 wrapper 模式,然後查看 py/src/braintrust/wrappers/、py/pyproject.toml 和 py/noxfile.py。當 Outlines 呼叫或 generate 的執行、受支援的串流、輸出型別以及 backend/model 身分都完成 instrument,且該整合已在矩陣和 nox session 中呈現時,工作就完成了。
由索引模型根據 Issue 內容生成。
描述
Summary
outlines (dottxt-ai) is a widely used structured-generation library: it wraps a model object and constrains decoding so the output matches a requested type (JSON schema, Pydantic model, regex, CFG, Literal, function signature, etc.) via model(prompt, output_type). It supports many backends (OpenAI, Ollama, vLLM, transformers, llama.cpp) and is actively released (latest 1.3.2, July 20, 2026; PyPI: https://pypi.org/project/outlines/). This repository has zero instrumentation for it — no integration directory, no wrapper, no nox session, no matrix entry.
This is a distinct execution surface from the instructor package this repo already instruments (py/src/braintrust/integrations/instructor/): Instructor layers structured output on top of a provider client (e.g. instructor.from_openai(...)), whereas Outlines is itself the model-calling layer and controls token-level decoding directly against local/self-hosted backends (transformers, vLLM, llama.cpp) in addition to hosted APIs — a meaningfully different, provider-agnostic generation call site that Instructor-style patching does not cover.
What needs to be instrumented
Model.__call__(prompt, output_type, **kwargs)(orgenerate(...)in the current API) — the core structured-generation execution entrypoint; should log the prompt, the requested output type/schema, and the returned (parsed) value.- Streaming variants (
model.stream(...)) where supported by the backend. - The
output_typeused (JSON schema / Pydantic model / regex / CFG /Literal) is worth capturing in span metadata since it materially changes what "correct" output means for eval purposes. - Backend/model identification (which underlying model class —
outlines.models.openai,outlines.models.transformers,outlines.models.vllm, etc. — is in use) so spans carry accurate provider/model metadata.
Braintrust docs status
not_found — https://www.braintrust.dev/docs/guides/tracing/integrations lists tracing integrations (OpenTelemetry, Temporal, Vercel AI SDK, OpenRouter SDK, LangChain, LangSmith, LlamaIndex, Agno, Apollo GraphQL, Cloudflare Workers AI, DSPy, Instructor, LiteLLM, Ruby LLM, Traceloop, TrueFoundry) and agent frameworks — Outlines is not present in either list.
Upstream sources
- GitHub: https://github.com/dottxt-ai/outlines
- PyPI: https://pypi.org/project/outlines/ (latest
1.3.2, July 20, 2026) - Docs: https://dottxt-ai.github.io/outlines/
Local repo files inspected
py/src/braintrust/integrations/— nooutlines/directory (onlyinstructor/, a distinct package/surface)py/src/braintrust/wrappers/— no Outlines wrapperpy/pyproject.toml[tool.braintrust.matrix]— no outlines entrypy/noxfile.py— notest_outlinessession- Repo-wide case-insensitive grep for
outlinesunderpy/— zero matches
- 主要語言
- Python
- 星號
- 22
- 分支
- 27
- 平均合併
- 14 小時 49 分鐘
- 30 天內合併 PR
- 126
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
braintrustdata/braintrust-sdk-python 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 77/100
braintrustdata/braintrust-sdk-python#962 ·
維護者通常 1 天內回覆
-
Temporal: add `workflow.Info.original_execution_run_id` to workflow span metadata可能已有人在做 @Ehsan-hash 於 2 天前認領。 未關閉feature python
難度 2/5 1-3 小時 新手友好度 76/100
braintrustdata/braintrust-sdk-python#868 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 20/100
braintrustdata/braintrust-sdk-python#957 ·
維護者通常 1 天內回覆
-
python
難度 5/5 一週以上 新手友好度 35/100
braintrustdata/braintrust-sdk-python#956 ·
維護者通常 1 天內回覆
-
python
braintrustdata/braintrust-sdk-python#839 ·
維護者通常 1 天內回覆
查看 braintrustdata/braintrust-sdk-python 的全部 Issue
相似的 Issue
-
documentation good first issue help wanted
難度 2/5 1-3 小時 新手友好度 72/100
drevendev/HungryCrab#273 ·
維護者通常 1 天內回覆
-
good first issue help wanted
難度 2/5 1-3 小時 新手友好度 76/100
drevendev/BeautifulRepo#19 ·
維護者通常 2 天內回覆
-
Moonshot: Kimi K3 always sends `reasoning_effort="max"`, though the API now accepts `low` and `high`未關閉accepted
難度 2/5 1-3 小時 新手友好度 78/100
UKGovernmentBEIS/inspect_ai#5939 ·
維護者通常 1 天內回覆
-
bug linux
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
area:data data-quality
難度 2/5 1-3 小時 新手友好度 68/100
reacher-z/Awesome-CUA#1468 ·
維護者通常 1 天內回覆