Skip to content

Commit ccbb3f4

Browse files
authored
fix: add support for case-insensitive Enterprise filter (crewAIInc#340)
1 parent ea6b425 commit ccbb3f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crewai_tools/tools/crewai_enterprise_tools/crewai_enterprise_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ def CrewaiEnterpriseTools(
5353
return ToolCollection(all_tools)
5454

5555
# Filter tools based on the provided list
56-
filtered_tools = [tool for tool in all_tools if tool.name in actions_list]
56+
filtered_tools = [tool for tool in all_tools if tool.name.lower() in [action.lower() for action in actions_list]]
5757
return ToolCollection(filtered_tools)

tests/tools/crewai_enterprise_tools_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_returns_all_tools_when_no_actions_list(self):
4646

4747
@patch.dict(os.environ, {"CREWAI_ENTERPRISE_TOOLS_TOKEN": "env-token"})
4848
def test_filters_tools_by_actions_list(self):
49-
tools = CrewaiEnterpriseTools(actions_list=["tool1", "tool3"])
49+
tools = CrewaiEnterpriseTools(actions_list=["ToOl1", "tool3"])
5050
self.assertEqual(len(tools), 2)
5151
self.assertEqual(tools[0].name, "tool1")
5252
self.assertEqual(tools[1].name, "tool3")

0 commit comments

Comments
 (0)