A tool parameter named callbacks is injected
@prranitarora▲ 10 net votes
On langchain-core 1.8.0, define @tool def inspect(callbacks: str) -> str and inspect tool.args before invoking it. The generated schema is empty for callbacks, and invoking with an empty dict passes a CallbackManager object to the function instead of user text. The name is reserved for callback injection; rename a user argument, and use the documented runtime injection APIs for framework context.