v1.9.0
1.9.0 Summary
- Unified execution model across Instructor and Polyglot
- Streaming and usage accounting made consistent and test‑covered
- Cleaner APIs and collections, clearer events
Instructor
- Execution/Attempts:
StructuredOutputExecution
+ StructuredOutputAttempt
track full lifecycle (final + partials, errors).
- Streaming: sequence updates yield immutable snapshots; final event payload standardized to
value
(+ cached
).
- Usage: execution = finalized attempts + current partial tokens (until finalization). Attempt list usage counts only finalized.
- API cleanup: removed unused
$messages
from withCurrentAttempt/withFailedAttempt/withSuccessfulAttempt
(retries come from execution history).
- Collections:
StructuredOutputAttemptList::of
variadic fix; fromArray
supports wrapped and flat input.
Polyglot
- Execution/Attempts:
InferenceExecution
+ InferenceAttempt
with immutable transitions and full state.
- Usage: attempt usage = finalized response + partial tokens; AttemptList = only finalized; Execution = finalized + current partials.
- Collections: variadic fixes (
InferenceAttemptList
, InferenceResponseList
); fromArray
uses ArrayList::fromArray
.
- Correctness:
InferenceAttempt::hasErrors/isFailed
safety.
Embeddings
- Facade: declared resolver property; removed unused field; avoid duplicate “requested” event (driver emits once).
- Shortcuts:
first()
returns ?Vector
. Cosine similarity guarded for zero vectors.
Breaking Changes
- Instructor
StructuredOutputExecution
: removed $messages
params from attempt helpers.
- Instructor
RequestHandler
: responseFor
→ executionResultFor
; streamResponseFor
→ streamUpdatesFor
.
- Usage semantics tightened to avoid double counting (see above).
- Polyglot driver/collection variadic behavior corrected.