Step 1: Update the package
Run the following command in your CLI:Step 2: Config files
Correct your config files to use new namespaces.Step 3: Instructor config path
Correct INSTRUCTOR_CONFIG_PATHS in .env file toconfig/instructor (or your custom path).
Step 4: Codebase
Make sure that your code follows new namespaces. Suggestion: use IDE search and replace to find and replace old namespaces with new ones.Step 5: Streaming replay behavior
In 2.0, stream iterators are one-shot by default (ResponseCachePolicy::None).
- If your code iterates
partials(),responses()orsequence()more than once, it will now throw. finalResponse()andfinalValue()are still safe to call repeatedly.- To enable replay, configure
ResponseCachePolicy::Memoryexplicitly.
Step 6: Mixin inference traits
HandlesInference and HandlesSelfInference are deprecated in 2.0.
Use runtime-first APIs instead:
Step 7: Events 2.0 explicit wiring
If your code previously relied on resolver-style event wiring, migrate to explicit shared bus injection. Before:$events instance into related runtimes/builders (for example HttpClientBuilder, InferenceRuntime, StructuredOutputRuntime) so listeners and wiretaps observe the full flow.
For full details, see: packages/events/MIGRATION-2.0.md.