v0.12.0
Highlights
Unified sync/async Tool execution — all tools now work transparently with both run() and arun(), regardless of whether the underlying function is sync or async.
Changed
- Unified Tool callable layer with
_FunctionToolWrapper: allTool.callablevalues are nowBaseToolWrappersubclasses, providing uniformcall_sync()/call_async()interfaces regardless of tool origin (native function, MCP, OpenAPI, LangChain). Tool.run()/Tool.arun()are now the primary API: exceptions propagate directly instead of being swallowed and returned as error strings.Tool.run_raw()/Tool.arun_raw()are now deprecated aliases forrun()/arun(). They emitDeprecationWarningand will be removed in a future version.
Added
Tool.fnproperty: access the underlying unwrapped function.- Sync/async transparency: sync tools can be called via
arun()(asyncio.to_thread), async tools viarun()(asyncio.run). - Parallel execution: mixed sync/async tools work with
asyncio.gather().
Fixed
arun()/arun_raw()crashing on sync callables ("object can't be used in 'await' expression").run()/run_raw()returning bare coroutine objects for async callables.- Executor context injection (
_ctx) not detecting parameters through tool wrappers.
Removed
make_sync_wrapper()from executor helpers (dead code after wrapper unification).
Install
pip install toolregistry==0.12.0Full Changelog: v0.11.2...v0.12.0