This PR was squashed before being merged into the main branch.
Discussion
----------
[Agent] Fix dispatch of multiple tool instances of the same class
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| Docs? | no
| Issues | Fix#1657
| License | MIT
When multiple instances of the same class are registered as separate tools (e.g. two `Subagent` instances wrapping different agents), `Toolbox` would always dispatch to the first matching instance since it resolved executables by class name.
This PR fixes the issue by:
- **`MemoryToolFactory`**: Keys tool registrations by `spl_object_id` when objects are passed, allowing per-instance lookups. Builds `Tool` objects directly with `ExecutionReference` instead of going through `AsTool`/`convertAttribute`.
- **`Toolbox`**: Tries instance-specific lookup via `spl_object_id` first, falls back to class-based lookup. Maintains an `$instanceMap` to dispatch tool calls to the correct instance.
- **Removes `AbstractToolFactory`**: Inlines its logic into `ReflectionToolFactory`, since `MemoryToolFactory` no longer needs it.
- **Updates AI Bundle DI config** to reflect the removal of the abstract factory service.
Replaces #1658 1658
Commits
-------
fe195ea1 [Agent] Fix dispatch of multiple tool instances of the same class
This PR was merged into the main branch.
Discussion
----------
[Platform][Ollama] Improve support for `ScopingHttpClient`
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| Docs? | no
| BC BREAK | Yes
| Issues | Fix#899
| License | MIT
* Improve `Ollama` platform to support `ScopingHttpClient`
* Rename the `host_url` configuration key to `endpoint`
* Add support for `api_key` for `Ollama.com` Cloud endpoint
Commits
-------
edb80a0e refactor(platform): Ollama support for ScopingHttpClient
This change improves backwards compatibility by allowing future
parameters to be added to the method signature. With variadic
parameters, no additional arguments can be added after the variadic
argument per PHP's BC policy.