15,882 stars · Apache-2.0, read from /blob/main/LICENSE on 2026-09-29; plain, copyright "2023- The Outlines developers", no added conditions · v1.3.3 (2026-08-06). THE YEAR TRAP: /releases/latest prints the date without a year and it was read as 2024; PyPI settles it as 2026. Code on 2026-09-21. · Track this in Scout
It makes a model return valid structured output by constraining what the model is allowed to generate.
▶Repo detailsthe review · specs · pros & cons · install
What it is
A Python library at 15,882 stars from the .txt team, in version 1.3.3 since 6 August 2026, with code landing on 21 September 2026. You describe the shape you want, as a list of choices, a JSON schema or a Python class, and it restricts generation to match.
What it is good for. Any program that has to turn a model's answer into a record: pulling fields out of an invoice, tagging a support message, or filling a form from free text. The habit it replaces is asking politely in the prompt and then writing repair code for the times the model ignores you.
- It works with models you run yourself through vLLM, Ollama, transformers or llama.cpp, and with hosted services from OpenAI, Gemini and Dottxt.
- The shape can be as small as a list of three words or as large as a nested schema, and the code looks the same either way.
- Apache-2.0 read from the licence file, copyright "2023- The Outlines developers", with no added conditions.
- The real guarantee only exists where the library can see and limit each next word, which means a model you run yourself. Against a hosted API it can ask for a shape, not enforce one.
- It requires Python 3.10, 3.11, 3.12 or 3.13. Python 3.14 is excluded by the package's own metadata, which will catch out anyone on a very new system.
- Constraining a model costs some speed, and forcing a shape can push a model into stilted wording in order to satisfy it. The output is valid; it is not always good.
BoundaryML/baml9,174 stars, Apache-2.0, covered in Edition 32; it asks you to learn a small new language for the same job, where this is a library you import.
Track this in Scout
567-labs/instructor14,000 stars, MIT; it validates the answer after the model has written it and retries on failure, which is simpler to adopt and weaker as a guarantee.
Track this in Scout
guardrails-ai/guardrails7,300 stars, Apache-2.0; broader in scope, covering content checks as well as shape, and correspondingly heavier.
Track this in Scout
python3 -m venv venv source venv/bin/activate pip install outlines


