Release Notes - v1.19.0
Highlights
- Cleaned inference attempt lifecycle and event ownership in Polyglot.
- Fixed serialization and caching edge cases across inference requests/partials.
- Structured output handling is more robust with safer validation and immutable models.
Breaking Changes
InferenceExecution::withNewResponse()renamed towithSuccessfulAttempt().InferenceExecution::withFailedResponse()renamed towithFailedAttempt().InferenceExecution::withFailedFinalizedResponse()removed.InferenceAttempt::withFailedResponse()removed; create attempts viastartAttempt()/InferenceAttempt::started().Usage::accumulate()removed; usewithAccumulated()for immutable usage totals.ValidationResult::invalid()now acceptsValidationError|ValidationError[]only.ResponseModel::setPropertyValues()removed; usewithPropertyValues().
Fixes and Improvements
Polyglot
InferenceRequest::toArray()now serializesmessagesandresponse_formatas arrays.InferenceRequest::hasMessages()andwithCacheApplied()use explicit emptiness checks.PartialInferenceResponse::toArray()now serializesresponse_data, with clearer tool accumulation.InferenceStreamno longer double-dispatches completion events.HandlesRequestBuilder::withToolChoice()acceptsstring|array.
Instructor
StructuredOutputStreamreuses its generator and emitsStructuredOutputStartedonce.- Response validation captures thrown exceptions as
ValidationResult::invalid(). - Tool-call JSON encoding failures return
Resulterrors instead of throwing. ResponseModel::toArray()guards non-object instances; fluent methods returnstatic.
Addons
- Continuation stop reasons are explicit on evaluations instead of inferred from class names.
- AgentState adds
recordStep()andfailWith()helpers, plus explicit execution hook interfaces for timing.
Tests
- Added coverage for attempt IDs, streaming completion events, serialization, validation failures, and ResponseModel immutability.