What's Changed
Instructor 1.15.4 is a patch release that consolidates the latest small fixes and docs cleanup after 1.15.3.
Runtime Fixes
- Fixed v2 response-model preparation so list and primitive response models are normalized before provider handler dispatch. This fixes crashes such as
AttributeError: type object 'list' has no attribute 'model_json_schema'forlist[Model]and scalar response models. - Fixed streamed JSON extraction so backticks inside JSON string values are preserved instead of being interpreted as markdown fence delimiters.
- Fixed
Image.autodetect()to accept raw JPEG, PNG, GIF, and WebP bytes, while raising clear errors for unsupported image inputs. - Added regression coverage for the existing Gemini empty-message path.
- Fixed
list[BaseModel]simple-type detection so model lists route through iterable handling instead of scalar wrapping.
CLI
- Fixed fine-tuning job creation from local files to pass the uploaded validation file ID to OpenAI instead of the local validation file path.
- Refreshed the CLI fine-tuning default model string in code and docs.
Docs
- Updated stale OpenAI model strings across docs and tutorials.
- Updated the Ollama example to use
llama3.2, including theollama pullcommand andfrom_provider()example.
Release
- Bumped package metadata to
1.15.4inpyproject.toml,instructor/__init__.py, anduv.lock. - Published the release to PyPI as both wheel and sdist.
Validation
PR #2398 passed Ruff, type-check, core tests, provider tests, live provider tests, auto client tests, and the Workers build before release.
Full Changelog: v1.15.3...v1.15.4