Changes
Bug Fixes
-
Prevent null dereference when finalizing streaming responses with no current attempt
- packages/polyglot/src/Inference/Data/InferenceExecution.php
- Null-safe access to
currentAttempt
inwithFinalizedPartialResponse()
andwithFailedFinalizedResponse()
- Null-safe access to
- packages/polyglot/src/Inference/Data/InferenceAttempt.php
- Null-safe
withFinalizedPartialResponse()
using emptyPartialInferenceResponseList
when needed
- Null-safe
- packages/polyglot/src/Inference/Data/InferenceExecution.php
-
Console display stability in evals
- packages/evals/src/Console/Display.php
- Replaced invalid
ImmutableDataMap::except()
usage with safe filtering oftoArray()
output - Fixed constant name
COLOR::BOLD
→Color::BOLD
- Replaced invalid
- packages/evals/src/Console/Display.php
Behavior/Compatibility
- Groq driver request body cleanup
- packages/polyglot/src/Inference/Drivers/Groq/GroqBodyFormat.php
- Removed redundant
max_tokens
→max_completion_tokens
conversion (already handled by parent)
- Removed redundant
- packages/polyglot/src/Inference/Drivers/Groq/GroqBodyFormat.php
Immutability & Usage Accounting
- Immutable accumulation for usage data to avoid inadvertent mutation/double-counting
- packages/polyglot/src/Inference/InferenceResponseFactory.php
- Use
withAccumulated(...)
when combining partial usage
- Use
- packages/addons/src/StepByStep/State/Traits/HandlesUsage.php
- Replace clone+mutate with
withAccumulated(...)
- Replace clone+mutate with
- packages/evals/src/Traits/Experiment/HandlesAccess.php
- Compute experiment usage on demand by accumulating execution usages immutably
- packages/evals/src/Experiment.php
- Removed cached
$usage
and post-run accumulator; observations/summary rely on computed usage
- Removed cached
- packages/polyglot/src/Inference/InferenceResponseFactory.php
Notes
- This release focuses on correctness and immutability:
- Eliminates potential fatals in streaming finalization and console display
- Standardizes usage accumulation to immutable patterns across modules