Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#598 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Inizia da py/src/braintrust/integrations/instructor/ e analizza i pattern circostanti di integrazione e wrapper, quindi esamina py/src/braintrust/wrappers/, py/pyproject.toml e py/noxfile.py. Il lavoro è completo quando l’esecuzione delle chiamate o delle generazioni di Outlines, lo streaming supportato, i tipi di output e l’identità del backend/modello sono strumentati e l’integrazione è rappresentata nella matrice e in una sessione nox.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Python
Stelle
21
Fork
23
Merge medio
20h 2m
PR unite (30g)
95

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di braintrustdata/braintrust-sdk-python

Tutte le issue di braintrustdata/braintrust-sdk-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.