Skip to content

Commit c062826

Browse files
chore: update dependencies and versioning for CrewAI 0.193.0 (#3542)
* chore: update dependencies and versioning for CrewAI - Bump `crewai-tools` dependency version from `0.71.0` to `0.73.0` in `pyproject.toml`. - Update CrewAI version from `0.186.1` to `0.193.0` in `__init__.py`. - Adjust dependency versions in CLI templates for crew, flow, and tool to reflect the new CrewAI version. This update ensures compatibility with the latest features and improvements in CrewAI. * remove embedchain mock * fix: remove last embedchain mocks * fix: remove langchain_openai from tests --------- Co-authored-by: Greyson LaLonde <[email protected]>
1 parent 9491fe8 commit c062826

File tree

9 files changed

+3035
-3493
lines changed

9 files changed

+3035
-3493
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Documentation = "https://docs.crewai.com"
4848
Repository = "https://github.com/crewAIInc/crewAI"
4949

5050
[project.optional-dependencies]
51-
tools = ["crewai-tools~=0.71.0"]
51+
tools = ["crewai-tools~=0.73.0"]
5252
embeddings = [
5353
"tiktoken~=0.8.0"
5454
]

src/crewai/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def filtered_warn(
4040

4141
_suppress_pydantic_deprecation_warnings()
4242

43-
__version__ = "0.186.1"
43+
__version__ = "0.193.0"
4444
_telemetry_submitted = False
4545

4646

src/crewai/cli/templates/crew/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "{{name}} using crewAI"
55
authors = [{ name = "Your Name", email = "[email protected]" }]
66
requires-python = ">=3.10,<3.14"
77
dependencies = [
8-
"crewai[tools]>=0.186.1,<1.0.0"
8+
"crewai[tools]>=0.193.0,<1.0.0"
99
]
1010

1111
[project.scripts]

src/crewai/cli/templates/flow/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "{{name}} using crewAI"
55
authors = [{ name = "Your Name", email = "[email protected]" }]
66
requires-python = ">=3.10,<3.14"
77
dependencies = [
8-
"crewai[tools]>=0.186.1,<1.0.0",
8+
"crewai[tools]>=0.193.0,<1.0.0",
99
]
1010

1111
[project.scripts]

src/crewai/cli/templates/tool/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Power up your crews with {{folder_name}}"
55
readme = "README.md"
66
requires-python = ">=3.10,<3.14"
77
dependencies = [
8-
"crewai[tools]>=0.186.1"
8+
"crewai[tools]>=0.193.0"
99
]
1010

1111
[tool.crewai]

tests/agents/test_agent.py

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -137,35 +137,6 @@ def test_custom_llm():
137137
assert agent.llm.model == "gpt-4"
138138

139139

140-
def test_custom_llm_with_langchain():
141-
from langchain_openai import ChatOpenAI
142-
143-
agent = Agent(
144-
role="test role",
145-
goal="test goal",
146-
backstory="test backstory",
147-
llm=ChatOpenAI(temperature=0, model="gpt-4"),
148-
)
149-
150-
assert agent.llm.model == "gpt-4"
151-
152-
153-
def test_custom_llm_temperature_preservation():
154-
from langchain_openai import ChatOpenAI
155-
156-
langchain_llm = ChatOpenAI(temperature=0.7, model="gpt-4")
157-
agent = Agent(
158-
role="temperature test role",
159-
goal="temperature test goal",
160-
backstory="temperature test backstory",
161-
llm=langchain_llm,
162-
)
163-
164-
assert isinstance(agent.llm, LLM)
165-
assert agent.llm.model == "gpt-4"
166-
assert agent.llm.temperature == 0.7
167-
168-
169140
@pytest.mark.vcr(filter_headers=["authorization"])
170141
def test_agent_execution():
171142
agent = Agent(
@@ -2361,13 +2332,11 @@ def mock_get_auth_token():
23612332

23622333
@patch("crewai.cli.plus_api.PlusAPI.get_agent")
23632334
def test_agent_from_repository(mock_get_agent, mock_get_auth_token):
2364-
# Mock embedchain initialization to prevent race conditions in parallel CI execution
2365-
with patch("embedchain.client.Client.setup"):
2366-
from crewai_tools import (
2367-
EnterpriseActionTool,
2368-
FileReadTool,
2369-
SerperDevTool,
2370-
)
2335+
from crewai_tools import (
2336+
EnterpriseActionTool,
2337+
FileReadTool,
2338+
SerperDevTool,
2339+
)
23712340

23722341
mock_get_response = MagicMock()
23732342
mock_get_response.status_code = 200
@@ -2423,9 +2392,7 @@ def test_agent_from_repository(mock_get_agent, mock_get_auth_token):
24232392

24242393
@patch("crewai.cli.plus_api.PlusAPI.get_agent")
24252394
def test_agent_from_repository_override_attributes(mock_get_agent, mock_get_auth_token):
2426-
# Mock embedchain initialization to prevent race conditions in parallel CI execution
2427-
with patch("embedchain.client.Client.setup"):
2428-
from crewai_tools import SerperDevTool
2395+
from crewai_tools import SerperDevTool
24292396

24302397
mock_get_response = MagicMock()
24312398
mock_get_response.status_code = 200

tests/test_crew.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3818,10 +3818,7 @@ def test_task_tools_preserve_code_execution_tools():
38183818
"""
38193819
Test that task tools don't override code execution tools when allow_code_execution=True
38203820
"""
3821-
3822-
# Mock embedchain initialization to prevent race conditions in parallel CI execution
3823-
with patch("embedchain.client.Client.setup"):
3824-
from crewai_tools import CodeInterpreterTool
3821+
from crewai_tools import CodeInterpreterTool
38253822
from pydantic import BaseModel, Field
38263823

38273824
from crewai.tools import BaseTool

tests/test_project.py

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -112,55 +112,55 @@ def test_agent_memoization():
112112
first_call_result = crew.simple_agent()
113113
second_call_result = crew.simple_agent()
114114

115-
assert (
116-
first_call_result is second_call_result
117-
), "Agent memoization is not working as expected"
115+
assert first_call_result is second_call_result, (
116+
"Agent memoization is not working as expected"
117+
)
118118

119119

120120
def test_task_memoization():
121121
crew = SimpleCrew()
122122
first_call_result = crew.simple_task()
123123
second_call_result = crew.simple_task()
124124

125-
assert (
126-
first_call_result is second_call_result
127-
), "Task memoization is not working as expected"
125+
assert first_call_result is second_call_result, (
126+
"Task memoization is not working as expected"
127+
)
128128

129129

130130
def test_crew_memoization():
131131
crew = InternalCrew()
132132
first_call_result = crew.crew()
133133
second_call_result = crew.crew()
134134

135-
assert (
136-
first_call_result is second_call_result
137-
), "Crew references should point to the same object"
135+
assert first_call_result is second_call_result, (
136+
"Crew references should point to the same object"
137+
)
138138

139139

140140
def test_task_name():
141141
simple_task = SimpleCrew().simple_task()
142-
assert (
143-
simple_task.name == "simple_task"
144-
), "Task name is not inferred from function name as expected"
142+
assert simple_task.name == "simple_task", (
143+
"Task name is not inferred from function name as expected"
144+
)
145145

146146
custom_named_task = SimpleCrew().custom_named_task()
147-
assert (
148-
custom_named_task.name == "Custom"
149-
), "Custom task name is not being set as expected"
147+
assert custom_named_task.name == "Custom", (
148+
"Custom task name is not being set as expected"
149+
)
150150

151151

152152
def test_agent_function_calling_llm():
153153
crew = InternalCrew()
154154
llm = crew.local_llm()
155155
obj_llm_agent = crew.researcher()
156-
assert (
157-
obj_llm_agent.function_calling_llm is llm
158-
), "agent's function_calling_llm is incorrect"
156+
assert obj_llm_agent.function_calling_llm is llm, (
157+
"agent's function_calling_llm is incorrect"
158+
)
159159

160160
str_llm_agent = crew.reporting_analyst()
161-
assert (
162-
str_llm_agent.function_calling_llm.model == "online_llm"
163-
), "agent's function_calling_llm is incorrect"
161+
assert str_llm_agent.function_calling_llm.model == "online_llm", (
162+
"agent's function_calling_llm is incorrect"
163+
)
164164

165165

166166
def test_task_guardrail():
@@ -186,9 +186,9 @@ def test_after_kickoff_modification():
186186
# Assuming the crew execution returns a dict
187187
result = crew.crew().kickoff({"topic": "LLMs"})
188188

189-
assert (
190-
"post processed" in result.raw
191-
), "After kickoff function did not modify outputs"
189+
assert "post processed" in result.raw, (
190+
"After kickoff function did not modify outputs"
191+
)
192192

193193

194194
@pytest.mark.vcr(filter_headers=["authorization"])
@@ -274,10 +274,8 @@ def another_simple_tool():
274274

275275

276276
def test_internal_crew_with_mcp():
277-
# Mock embedchain initialization to prevent race conditions in parallel CI execution
278-
with patch("embedchain.client.Client.setup"):
279-
from crewai_tools import MCPServerAdapter
280-
from crewai_tools.adapters.mcp_adapter import ToolCollection
277+
from crewai_tools import MCPServerAdapter
278+
from crewai_tools.adapters.mcp_adapter import ToolCollection
281279

282280
mock = Mock(spec=MCPServerAdapter)
283281
mock.tools = ToolCollection([simple_tool, another_simple_tool])
@@ -287,6 +285,5 @@ def test_internal_crew_with_mcp():
287285
assert crew.researcher().tools == [simple_tool]
288286

289287
adapter_mock.assert_called_once_with(
290-
{"host": "localhost", "port": 8000},
291-
connect_timeout=120
288+
{"host": "localhost", "port": 8000}, connect_timeout=120
292289
)

0 commit comments

Comments
 (0)