> ## Documentation Index
> Fetch the complete documentation index at: https://docs.instructorphp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# V1.4.2

### Bug Fixes

* **Infinite Loop in LLMProvider** - Fixed recursive call in `LLMProvider::using()` method that caused infinite loops when creating LLM providers
* **Config Resolution Circular Dependency** - Fixed circular dependency issues in legacy config resolution when resolver instances were used as providers
* **Deferred Logic Error** - Corrected inverted logic in `Deferred::isSet()` method that was causing incorrect state reporting
* **OpenAI Token Parameter** - Updated OpenAI driver to use `max_completion_tokens` instead of deprecated `max_tokens` for compatibility with newer models like o3-mini (thanks to @gewa24)
* **Dynamic Structure Deserialization** - Fixed bug where `Field::structure` was not deserializable when nested in structures used as collection item types (thanks to @gewa24)

### Core Changes

* **Utils Package Reorganization** - Moved core data structures to organized subdirectories:
  * `CachedMap` → `Data/CachedMap`
  * `DataMap` → `Data/DataMap`
  * `FrontMatter` → `Markdown/FrontMatter`
* **Context System** - Added new `Context` and `Layer` classes to utils package for improved context management
* **ImmutableDataMap** - New immutable data structure for safer data handling

### Development Tools

* **Code Validation Enhancement** - Added comprehensive code block validation system in doctor package:
  * `ValidateCodeBlocks` command for automated validation
  * `ValidationService` with event-driven metrics collection
  * Enhanced validation events and result tracking
* **Cleanup** - Removed unused clock-related classes and obsolete test files

### Breaking Changes

* **Utils Package Structure** - File locations changed for `CachedMap`, `DataMap`, and `FrontMatter` classes. Update import statements:
  ```php theme={null}
  // Old
  use Cognesy\Utils\Data\CachedMap;
  use Cognesy\Utils\DataMap;
  use Cognesy\Utils\FrontMatter;

  // New
  use Cognesy\Utils\Data\CachedMap;
  use Cognesy\Utils\Data\DataMap;
  use Cognesy\Utils\Markdown\FrontMatter;
  ```

***

**Full Changelog**: [v1.4.1...v1.4.2](https://github.com/cognesy/instructor-php/compare/v1.4.1...v1.4.2)
