Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[bot] Add Outlines integration for structured-generation execution instrumentation (648,297 weekly downloads)

Abierto
#598 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python

Línea de trabajo

Empieza por py/src/braintrust/integrations/instructor/ e inspecciona los patrones de integración y wrapper circundantes; después revisa py/src/braintrust/wrappers/, py/pyproject.toml y py/noxfile.py. El trabajo está completo cuando la ejecución de llamadas o generaciones de Outlines, el streaming compatible, los tipos de salida y la identidad del backend/modelo estén instrumentados, y la integración esté representada en la matriz y en una sesión de nox.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bot-automation new-integration

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) (or generate(...) 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_type used (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

Local repo files inspected

  • py/src/braintrust/integrations/ — no outlines/ directory (only instructor/, a distinct package/surface)
  • py/src/braintrust/wrappers/ — no Outlines wrapper
  • py/pyproject.toml [tool.braintrust.matrix] — no outlines entry
  • py/noxfile.py — no test_outlines session
  • Repo-wide case-insensitive grep for outlines under py/ — zero matches
Lenguaje dominante
Python
Estrellas
21
Forks
23
Merge medio
21 h 8 min
PR fusionados (30 d)
81

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de braintrustdata/braintrust-sdk-python

Todos los issues de braintrustdata/braintrust-sdk-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.