[bot] Add Outlines integration for structured-generation execution instrumentation (648,297 weekly downloads)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- ai, observability-sre
Hướng nghiên cứu
Bắt đầu với py/src/braintrust/integrations/instructor/ và kiểm tra các pattern tích hợp và wrapper xung quanh, sau đó xem xét py/src/braintrust/wrappers/, py/pyproject.toml và py/noxfile.py. Công việc hoàn tất khi việc thực thi lệnh gọi hoặc generate của Outlines, streaming được hỗ trợ, các kiểu đầu ra và danh tính backend/model được instrument, đồng thời integration được thể hiện trong ma trận và một nox session.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 21
- Fork
- 23
- Merge trung bình
- 20 giờ 8 phút
- Pull request đã merge (30 ngày)
- 94
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của braintrustdata/braintrust-sdk-python
-
feature python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
braintrustdata/braintrust-sdk-python#868 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature integration: mistral python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
braintrustdata/braintrust-sdk-python#867 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[bot] Google GenAI: streaming responses drop `url_context_metadata` that non-streaming responses preserveCó thể đã có người làm @Kayvan-Zahiri đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
braintrustdata/braintrust-sdk-python#774 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OpenAI: trace computer-use Agents session items and capture Responses `access_programs`Có thể đã có người làm @AbhiPrasad đã nhận 1 ngày trước. Đang mởfeature integration: openai python
braintrustdata/braintrust-sdk-python#869 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature python
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
braintrustdata/braintrust-sdk-python#866 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của braintrustdata/braintrust-sdk-python
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
data-umbrella/du-event-board#225 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100