Refactors tool execution to support batch operations and cancellation#35
Merged
carmelosantana merged 5 commits intomainfrom Apr 2, 2026
Merged
Refactors tool execution to support batch operations and cancellation#35carmelosantana merged 5 commits intomainfrom
carmelosantana merged 5 commits intomainfrom
Conversation
Extracts tool execution into a pluggable interface and adds tick callbacks for periodic work during agent execution. Enables async tool execution and external integration points.
Implement tool list trimming to OpenAI's 128-tool limit with warning telemetry. Suppress OpenAI's stream_options extension for Mistral compatibility. Normalize empty tool schemas for strict mode validation.
Extracts tool execution logic into a dedicated interface with batch support. Introduces a synchronous executor that implements both single and batch execution, enabling future async support while maintaining backward compatibility. The change also improves cancellation handling during tool execution.
Extracts tool execution into dedicated interfaces and implements synchronous executor. Removes batch interface from default executor and updates documentation to clarify concurrent execution semantics.
Introduces a new interface for batch tool execution and ensures consistent 'required' field handling in tool schemas across different providers. This enables future async support while maintaining backward compatibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves agent tool handling by introducing pluggable tool executors and tick callbacks, enabling batch execution for improved performance and better cancellation support. Adds tool limit trimming for OpenAI-compatible providers and ensures consistent tool schema handling across all providers.
Key changes:
BatchToolExecutorInterfaceandToolExecutorInterfacefor flexible tool executionTickCallbackInterfacefor monitoring agent executionSynchronousToolExecutorandNullTickCallbackas defaults