Fix issue #2791: Task tools now combine with agent tools instead of overriding them #2792
+966
−1,998
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.
Fix issue #2791: Task tools now combine with agent tools instead of overriding them
Description
This PR fixes issue #2791 where task tools override agent tools instead of combining them. The issue was in the
check_tools
model validator method intask.py
, which only added agent tools to task tools if the task had no tools.Changes
check_tools
method intask.py
to always add agent tools to task tools, avoiding duplicates by checking tool namestask_test.py
andcrew_test.py
to verify the new behaviorTesting
CI Status
The CI tests are failing due to OpenAI API authentication errors, which are unrelated to the code changes in this PR. The specific errors are:
litellm.exceptions.APIError: litellm.APIError: APIError: OpenAIException - Connection error
Related Issues
Fixes #2791
Link to Devin run: https://app.devin.ai/sessions/05d2a5ba4131481c8b1a38d491396edc
Requested by: Joe Moura ([email protected])