From cf280a2951d0389e59d5af171de7b793d43a210d Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Fri, 6 Feb 2026 09:26:32 -0500 Subject: [PATCH 1/6] fix: add current task id context and flow updates introduce a context var for the current task id in `crewai.context` to track task scope. update `Flow._execute_single_listener` to return `(result, event_id)` and adjust callers to unpack it and append `FlowMethodName(str(result))` to `router_results`. set/reset the current task id at the start/end of task execution (async + sync) with minor import and call-site tweaks. --- lib/crewai/src/crewai/context.py | 20 ++++++++++++++++++++ lib/crewai/src/crewai/flow/flow.py | 22 +++++++++++----------- lib/crewai/src/crewai/task.py | 5 +++++ 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/lib/crewai/src/crewai/context.py b/lib/crewai/src/crewai/context.py index 8edc4fdfbf..bf73a221c4 100644 --- a/lib/crewai/src/crewai/context.py +++ b/lib/crewai/src/crewai/context.py @@ -43,3 +43,23 @@ def platform_context(integration_token: str) -> Generator[None, Any, None]: yield finally: _platform_integration_token.reset(token) + + +_current_task_id: contextvars.ContextVar[str | None] = contextvars.ContextVar( + "current_task_id", default=None +) + + +def set_current_task_id(task_id: str | None) -> contextvars.Token[str | None]: + """Set the current task ID in the context. Returns a token for reset.""" + return _current_task_id.set(task_id) + + +def reset_current_task_id(token: contextvars.Token[str | None]) -> None: + """Reset the current task ID to its previous value.""" + _current_task_id.reset(token) + + +def get_current_task_id() -> str | None: + """Get the current task ID from the context.""" + return _current_task_id.get() diff --git a/lib/crewai/src/crewai/flow/flow.py b/lib/crewai/src/crewai/flow/flow.py index 64bd86d53d..6944f4719e 100644 --- a/lib/crewai/src/crewai/flow/flow.py +++ b/lib/crewai/src/crewai/flow/flow.py @@ -2027,15 +2027,14 @@ async def _execute_listeners( router_input = router_result_to_feedback.get( str(current_trigger), current_result ) - current_triggering_event_id = await self._execute_single_listener( + ( + router_result, + current_triggering_event_id, + ) = await self._execute_single_listener( router_name, router_input, current_triggering_event_id ) - # After executing router, the router's result is the path - router_result = ( - self._method_outputs[-1] if self._method_outputs else None - ) if router_result: # Only add non-None results - router_results.append(router_result) + router_results.append(FlowMethodName(str(router_result))) # If this was a human_feedback router, map the outcome to the feedback if self.last_human_feedback is not None: router_result_to_feedback[str(router_result)] = ( @@ -2265,7 +2264,7 @@ async def _execute_single_listener( listener_name: FlowMethodName, result: Any, triggering_event_id: str | None = None, - ) -> str | None: + ) -> tuple[Any, str | None]: """Executes a single listener method with proper event handling. This internal method manages the execution of an individual listener, @@ -2278,8 +2277,9 @@ async def _execute_single_listener( used for causal chain tracking. Returns: - The event_id of the MethodExecutionFinishedEvent emitted by this listener, - or None if events are suppressed. + A tuple of (listener_result, event_id) where listener_result is the return + value of the listener method and event_id is the MethodExecutionFinishedEvent + id, or (None, None) if skipped during resumption. Note: - Inspects method signature to determine if it accepts the trigger result @@ -2305,7 +2305,7 @@ async def _execute_single_listener( ): # This conditional start was executed, continue its chain await self._execute_start_method(start_method_name) - return None + return (None, None) # For cyclic flows, clear from completed to allow re-execution self._completed_methods.discard(listener_name) # Also clear from fired OR listeners for cyclic flows @@ -2382,7 +2382,7 @@ async def _execute_single_listener( ] await asyncio.gather(*tasks) - return finished_event_id + return (listener_result, finished_event_id) except Exception as e: # Don't log HumanFeedbackPending as an error - it's expected control flow diff --git a/lib/crewai/src/crewai/task.py b/lib/crewai/src/crewai/task.py index d73c3d919c..eac42f956e 100644 --- a/lib/crewai/src/crewai/task.py +++ b/lib/crewai/src/crewai/task.py @@ -31,6 +31,7 @@ from typing_extensions import Self from crewai.agents.agent_builder.base_agent import BaseAgent +from crewai.context import reset_current_task_id, set_current_task_id from crewai.core.providers.content_processor import process_content from crewai.events.event_bus import crewai_event_bus from crewai.events.types.task_events import ( @@ -561,6 +562,7 @@ async def _aexecute_core( tools: list[Any] | None, ) -> TaskOutput: """Run the core execution logic of the task asynchronously.""" + task_id_token = set_current_task_id(str(self.id)) self._store_input_files() try: agent = agent or self.agent @@ -648,6 +650,7 @@ async def _aexecute_core( raise e # Re-raise the exception after emitting the event finally: clear_task_files(self.id) + reset_current_task_id(task_id_token) def _execute_core( self, @@ -656,6 +659,7 @@ def _execute_core( tools: list[Any] | None, ) -> TaskOutput: """Run the core execution logic of the task.""" + task_id_token = set_current_task_id(str(self.id)) self._store_input_files() try: agent = agent or self.agent @@ -744,6 +748,7 @@ def _execute_core( raise e # Re-raise the exception after emitting the event finally: clear_task_files(self.id) + reset_current_task_id(task_id_token) def _post_agent_execution(self, agent: BaseAgent) -> None: pass From ad00e5cf3cf5ff0bc4c39f68f0aeeece36b21b87 Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Fri, 6 Feb 2026 09:34:25 -0500 Subject: [PATCH 2/6] fix: await event futures and flush event bus call `crewai_event_bus.flush()` after crew kickoff. in `Flow`, await event handler futures instead of just collecting them: await pending `_event_futures` before finishing, await emitted futures immediately with try/except to log failures, then clear `_event_futures`. ensures handlers complete and errors surface. --- lib/crewai/src/crewai/crew.py | 1 + lib/crewai/src/crewai/flow/flow.py | 25 ++++++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/crewai/src/crewai/crew.py b/lib/crewai/src/crewai/crew.py index 09a103eba4..c69dae65ae 100644 --- a/lib/crewai/src/crewai/crew.py +++ b/lib/crewai/src/crewai/crew.py @@ -1517,6 +1517,7 @@ def _create_crew_output(self, task_outputs: list[TaskOutput]) -> CrewOutput: final_string_output = final_task_output.raw self._finish_execution(final_string_output) self.token_usage = self.calculate_usage_metrics() + crewai_event_bus.flush() crewai_event_bus.emit( self, CrewKickoffCompletedEvent( diff --git a/lib/crewai/src/crewai/flow/flow.py b/lib/crewai/src/crewai/flow/flow.py index 6944f4719e..de89c190c6 100644 --- a/lib/crewai/src/crewai/flow/flow.py +++ b/lib/crewai/src/crewai/flow/flow.py @@ -1593,7 +1593,6 @@ async def run_flow() -> None: reset_emission_counter() reset_last_event_id() - # Emit FlowStartedEvent and log the start of the flow. if not self.suppress_flow_events: future = crewai_event_bus.emit( self, @@ -1604,7 +1603,10 @@ async def run_flow() -> None: ), ) if future: - self._event_futures.append(future) + try: + await asyncio.wrap_future(future) + except Exception: + logger.warning("FlowStartedEvent handler failed", exc_info=True) self._log_flow_event( f"Flow started with ID: {self.flow_id}", color="bold magenta" ) @@ -1696,6 +1698,12 @@ async def run_flow() -> None: final_output = self._method_outputs[-1] if self._method_outputs else None + if self._event_futures: + await asyncio.gather( + *[asyncio.wrap_future(f) for f in self._event_futures] + ) + self._event_futures.clear() + if not self.suppress_flow_events: future = crewai_event_bus.emit( self, @@ -1707,13 +1715,12 @@ async def run_flow() -> None: ), ) if future: - self._event_futures.append(future) - - if self._event_futures: - await asyncio.gather( - *[asyncio.wrap_future(f) for f in self._event_futures] - ) - self._event_futures.clear() + try: + await asyncio.wrap_future(future) + except Exception: + logger.warning( + "FlowFinishedEvent handler failed", exc_info=True + ) if not self.suppress_flow_events: trace_listener = TraceCollectionListener() From 0dc3b439071089f6841776174ac452087c9c91eb Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Fri, 6 Feb 2026 11:11:07 -0500 Subject: [PATCH 3/6] fix: continue iteration on tool completion events expand the loop bridge listener to also trigger on tool completion events (`tool_completed` and `native_tool_completed`) so agent iteration resumes after tools finish. add a `requests.post` mock and response fixture in the liteagent test to simulate platform tool execution. refresh and sanitize vcr cassettes (updated model responses, timestamps, and header placeholders) to reflect tool-call flows and new recordings. --- .../src/crewai/experimental/agent_executor.py | 2 +- lib/crewai/tests/agents/test_lite_agent.py | 12 +- ...est_agent_kickoff_with_platform_tools.yaml | 192 +++++- .../test_guardrail_reached_attempt_limit.yaml | 627 +++++++++++++----- .../test_multiple_agents_in_same_flow.yaml | 294 ++++++-- 5 files changed, 887 insertions(+), 240 deletions(-) diff --git a/lib/crewai/src/crewai/experimental/agent_executor.py b/lib/crewai/src/crewai/experimental/agent_executor.py index 87f9e83d40..f8ff965aaa 100644 --- a/lib/crewai/src/crewai/experimental/agent_executor.py +++ b/lib/crewai/src/crewai/experimental/agent_executor.py @@ -908,7 +908,7 @@ def increment_native_and_continue(self) -> Literal["initialized"]: self.state.iterations += 1 return "initialized" - @listen("initialized") + @listen(or_("initialized", "tool_completed", "native_tool_completed")) def continue_iteration(self) -> Literal["check_iteration"]: """Bridge listener that connects iteration loop back to iteration check.""" return "check_iteration" diff --git a/lib/crewai/tests/agents/test_lite_agent.py b/lib/crewai/tests/agents/test_lite_agent.py index 32a7c0ef1c..6f989a27c6 100644 --- a/lib/crewai/tests/agents/test_lite_agent.py +++ b/lib/crewai/tests/agents/test_lite_agent.py @@ -606,9 +606,10 @@ def test_lite_agent_with_invalid_llm(): @patch.dict("os.environ", {"CREWAI_PLATFORM_INTEGRATION_TOKEN": "test_token"}) +@patch("crewai_tools.tools.crewai_platform_tools.crewai_platform_action_tool.requests.post") @patch("crewai_tools.tools.crewai_platform_tools.crewai_platform_tool_builder.requests.get") @pytest.mark.vcr() -def test_agent_kickoff_with_platform_tools(mock_get): +def test_agent_kickoff_with_platform_tools(mock_get, mock_post): """Test that Agent.kickoff() properly integrates platform tools with LiteAgent""" mock_response = Mock() mock_response.raise_for_status.return_value = None @@ -632,6 +633,15 @@ def test_agent_kickoff_with_platform_tools(mock_get): } mock_get.return_value = mock_response + # Mock the platform tool execution + mock_post_response = Mock() + mock_post_response.ok = True + mock_post_response.json.return_value = { + "success": True, + "issue_url": "https://github.com/test/repo/issues/1" + } + mock_post.return_value = mock_post_response + agent = Agent( role="Test Agent", goal="Test goal", diff --git a/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml b/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml index 53b4c57e23..9a566393f6 100644 --- a/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml +++ b/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml @@ -1,98 +1,226 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You are Test Agent. Test backstory\nYour personal goal is: Test goal\n\nYou ONLY have access to the following tools, and should NEVER make up tools that are not listed here:\n\nTool Name: create_issue\nTool Arguments: {''title'': {''description'': ''Issue title'', ''type'': ''str''}, ''body'': {''description'': ''Issue body'', ''type'': ''Union[str, NoneType]''}}\nTool Description: Create a GitHub issue\nDetailed Parameter Structure:\nObject with properties:\n - title: Issue title (required)\n - body: Issue body (optional)\n\nIMPORTANT: Use the following format in your response:\n\n```\nThought: you should always think about what to do\nAction: the action to take, only one name of [create_issue], just the name, exactly as it''s written.\nAction Input: the input to the action, just a simple JSON object, enclosed in curly braces, using \" to wrap keys and values.\nObservation: the result of the action\n```\n\nOnce all necessary information - is gathered, return the following format:\n\n```\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question\n```"}, {"role": "user", "content": "Create a GitHub issue"}], "model": "gpt-3.5-turbo", "stream": false}' + body: '{"messages":[{"role":"system","content":"You are Test Agent. Test backstory\nYour + personal goal is: Test goal"},{"role":"user","content":"\nCurrent Task: Create + a GitHub issue"}],"model":"gpt-3.5-turbo","tool_choice":"auto","tools":[{"type":"function","function":{"name":"create_issue","description":"Create + a GitHub issue","strict":true,"parameters":{"additionalProperties":false,"properties":{"title":{"description":"Issue + title","title":"Title","type":"string"},"body":{"default":null,"description":"Issue + body","title":"Body","type":"string"}},"required":["title","body"],"type":"object"}}}]}' headers: + User-Agent: + - X-USER-AGENT-XXX accept: - application/json accept-encoding: - - gzip, deflate + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX connection: - keep-alive content-length: - - '1233' + - '596' content-type: - application/json host: - api.openai.com - user-agent: - - OpenAI/Python 1.109.1 x-stainless-arch: - - arm64 + - X-STAINLESS-ARCH-XXX x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - MacOS + - X-STAINLESS-OS-XXX x-stainless-package-version: - - 1.109.1 + - 1.83.0 x-stainless-read-timeout: - - '600' + - X-STAINLESS-READ-TIMEOUT-XXX x-stainless-retry-count: - '0' x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.13.3 + - 3.13.5 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-CULxKTEIB85AVItcEQ09z4Xi0JCID\",\n \"object\": \"chat.completion\",\n \"created\": 1761350274,\n \"model\": \"gpt-3.5-turbo-0125\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"I will need more specific information to create a GitHub issue. Could you please provide more details such as the title and body of the issue you would like to create?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 255,\n \"completion_tokens\": 33,\n \"total_tokens\": 288,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n \ - \ }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": null\n}\n" + string: "{\n \"id\": \"chatcmpl-D6IJbXrD9FB7wORkucCiQt57xTK5F\",\n \"object\": + \"chat.completion\",\n \"created\": 1770392743,\n \"model\": \"gpt-3.5-turbo-0125\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n + \ \"id\": \"call_cTkVNC4rVV7Jn1aVXAp7O6HM\",\n \"type\": + \"function\",\n \"function\": {\n \"name\": \"create_issue\",\n + \ \"arguments\": \"{\\\"title\\\":\\\"Update Documentation for + Feature X\\\",\\\"body\\\":\\\"The documentation for Feature X is outdated + and needs to be updated to reflect recent changes and improvements.\\\\n\\\\nTest + goal: Test goal\\\"}\"\n }\n }\n ],\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 93,\n \"completion_tokens\": 47,\n \"total_tokens\": 140,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": null\n}\n" headers: CF-RAY: - - 993d6b4be9862379-SJC + - CF-RAY-XXX Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 24 Oct 2025 23:57:54 GMT + - Fri, 06 Feb 2026 15:45:43 GMT Server: - cloudflare Set-Cookie: - - __cf_bm=WY9bgemMDI_hUYISAPlQ2a.DBGeZfM6AjVEa3SKNg1c-1761350274-1.0.1.1-K3Qm2cl6IlDAgmocoKZ8IMUTmue6Q81hH9stECprUq_SM8LF8rR9d1sHktvRCN3.jEM.twEuFFYDNpBnN8NBRJFZcea1yvpm8Uo0G_UhyDs; path=/; expires=Sat, 25-Oct-25 00:27:54 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None - - _cfuvid=JklLS4i3hBGELpS9cz1KMpTbj72hCwP41LyXDSxWIv8-1761350274521-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None + - SET-COOKIE-XXX Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload + - STS-XXX Transfer-Encoding: - chunked X-Content-Type-Options: - - nosniff + - X-CONTENT-TYPE-XXX access-control-expose-headers: - - X-Request-ID + - ACCESS-CONTROL-XXX alt-svc: - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC openai-organization: - - crewai-iuxna1 + - OPENAI-ORG-XXX openai-processing-ms: - - '487' + - '2668' openai-project: - - proj_xitITlrFeen7zjNSzML82h9x + - OPENAI-PROJECT-XXX openai-version: - '2020-10-01' - x-envoy-upstream-service-time: - - '526' x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-requests: - - '10000' + - X-RATELIMIT-LIMIT-REQUESTS-XXX x-ratelimit-limit-tokens: - - '50000000' + - X-RATELIMIT-LIMIT-TOKENS-XXX x-ratelimit-remaining-requests: - - '9999' + - X-RATELIMIT-REMAINING-REQUESTS-XXX x-ratelimit-remaining-tokens: - - '49999727' + - X-RATELIMIT-REMAINING-TOKENS-XXX x-ratelimit-reset-requests: - - 6ms + - X-RATELIMIT-RESET-REQUESTS-XXX x-ratelimit-reset-tokens: - - 0s + - X-RATELIMIT-RESET-TOKENS-XXX x-request-id: - - req_1708dc0928c64882aaa5bc2c168c140f + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Test Agent. Test backstory\nYour + personal goal is: Test goal"},{"role":"user","content":"\nCurrent Task: Create + a GitHub issue"}],"model":"gpt-3.5-turbo","tool_choice":"auto","tools":[{"type":"function","function":{"name":"create_issue","description":"Create + a GitHub issue","strict":true,"parameters":{"additionalProperties":false,"properties":{"title":{"description":"Issue + title","title":"Title","type":"string"},"body":{"default":null,"description":"Issue + body","title":"Body","type":"string"}},"required":["title","body"],"type":"object"}}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '596' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6IJcT2YIUtUErJXw46pMZWwpfsRE\",\n \"object\": + \"chat.completion\",\n \"created\": 1770392744,\n \"model\": \"gpt-3.5-turbo-0125\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Understood! What should be the title + and body of the GitHub issue you want to create?\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 93,\n \"completion_tokens\": 20,\n \"total_tokens\": 113,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": null\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 15:45:44 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '805' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX status: code: 200 message: OK diff --git a/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml b/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml index e5e104fef3..8ee13d70cc 100644 --- a/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml +++ b/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml @@ -1,400 +1,717 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You are an expert at gathering and organizing information. You carefully collect details and present them in a structured way.\nYour personal goal is: Gather information about the best soccer players\n\nTo give my best complete final answer to the task respond using the exact following format:\n\nThought: I now can give a great answer\nFinal Answer: Your final answer must be the great and the most complete as possible, it must be outcome described.\n\nI MUST use these formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players in the world?"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"]}' + body: '{"messages":[{"role":"system","content":"You are Sports Analyst. You are + an expert at gathering and organizing information. You carefully collect details + and present them in a structured way.\nYour personal goal is: Gather information + about the best soccer players"},{"role":"user","content":"\nCurrent Task: Top + 10 best players in the world?\n\nProvide your complete response:"}],"model":"gpt-4.1-mini"}' headers: + User-Agent: + - X-USER-AGENT-XXX accept: - application/json accept-encoding: - - gzip, deflate, zstd + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX connection: - keep-alive content-length: - - '694' + - '404' content-type: - application/json host: - api.openai.com - user-agent: - - OpenAI/Python 1.78.0 x-stainless-arch: - - arm64 + - X-STAINLESS-ARCH-XXX x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - MacOS + - X-STAINLESS-OS-XXX x-stainless-package-version: - - 1.78.0 - x-stainless-raw-response: - - 'true' + - 1.83.0 x-stainless-read-timeout: - - '600.0' + - X-STAINLESS-READ-TIMEOUT-XXX x-stainless-retry-count: - '0' x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.9 + - 3.13.5 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-BgufUtDqGzvqPZx2NmkqqxdW4G8rQ\",\n \"object\": \"chat.completion\",\n \"created\": 1749567308,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Thought: I now can give a great answer \\nFinal Answer: The top 10 best soccer players in the world, as of October 2023, can be identified based on their recent performances, skills, impact on games, and overall contributions to their teams. Here is the structured list:\\n\\n1. **Lionel Messi (Inter Miami CF)**\\n - Position: Forward\\n - Key Attributes: Dribbling, vision, goal-scoring ability.\\n - Achievements: Multiple Ballon d'Or winner, Copa America champion, World Cup champion (2022).\\n\\n2. **Kylian Mbappé (Paris Saint-Germain)**\\n - Position: Forward\\n - Key Attributes: Speed, technique, finishing.\\n - Achievements: FIFA World Cup champion (2018), Ligue 1 titles, multiple\ - \ domestic cups.\\n\\n3. **Erling Haaland (Manchester City)**\\n - Position: Forward\\n - Key Attributes: Power, speed, goal-scoring instinct.\\n - Achievements: Bundesliga top scorer, UEFA Champions League winner (2023), Premier League titles.\\n\\n4. **Kevin De Bruyne (Manchester City)**\\n - Position: Midfielder\\n - Key Attributes: Passing, vision, creativity.\\n - Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League winner (2023).\\n\\n5. **Karim Benzema (Al-Ittihad)**\\n - Position: Forward\\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\\n - Achievements: 2022 Ballon d'Or winner, multiple Champions Leagues with Real Madrid.\\n\\n6. **Neymar Jr. (Al Hilal)**\\n - Position: Forward\\n - Key Attributes: Flair, dribbling, creativity.\\n - Achievements: Multiple domestic league titles, Champions League runner-up.\\n\\n7. **Robert Lewandowski (FC Barcelona)**\\n - Position: Forward\\n - Key Attributes: Finishing,\ - \ positioning, aerial ability.\\n - Achievements: FIFA Best Men's Player, multiple Bundesliga titles, La Liga champion (2023).\\n\\n8. **Mohamed Salah (Liverpool)**\\n - Position: Forward\\n - Key Attributes: Speed, finishing, dribbling.\\n - Achievements: Premier League champion, FA Cup, UEFA Champions League winner.\\n\\n9. **Vinícius Júnior (Real Madrid)**\\n - Position: Forward\\n - Key Attributes: Speed, dribbling, creativity.\\n - Achievements: UEFA Champions League winner (2022), La Liga champion (2023).\\n\\n10. **Luka Modrić (Real Madrid)**\\n - Position: Midfielder\\n - Key Attributes: Passing, vision, tactical intelligence.\\n - Achievements: Multiple Champions League titles, Ballon d'Or winner (2018).\\n\\nThis list is compiled based on their current form, past performances, and contributions to their respective teams in both domestic and international competitions. Player rankings can vary based on personal opinion and specific criteria used for\ - \ evaluation, but these players have consistently been regarded as some of the best in the world as of October 2023.\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 122,\n \"completion_tokens\": 643,\n \"total_tokens\": 765,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_34a54ae93c\"\n}\n" + string: "{\n \"id\": \"chatcmpl-D6HVKLlq7AM6aadjN9eEyY3GcXGL6\",\n \"object\": + \"chat.completion\",\n \"created\": 1770389626,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Certainly! Here is a structured list + of the top 10 best soccer players in the world as of 2024, based on recent + performances, awards, skills, and impact in major leagues and tournaments:\\n\\n### + Top 10 Best Soccer Players in the World (2024)\\n\\n| Rank | Player Name | + Nationality | Current Club | Position | Key Achievements + (Recent) |\\n|-------|--------------------|-----------------|---------------------|-----------------|--------------------------------------------------------|\\n| + 1 | Kylian Mbapp\xE9 | French | Paris Saint-Germain | Forward + \ | 2022 World Cup winner, multiple Ligue 1 titles, exceptional goal-scoring + record |\\n| 2 | Erling Haaland | Norwegian | Manchester City + \ | Striker | Premier League top scorer, UEFA Champions League + top scorer 2022-23 season |\\n| 3 | Lionel Messi | Argentine + \ | Inter Miami | Forward/Playmaker| 2022 World Cup winner, multiple + Ballon d\u2019Or awards, La Liga & MLS titles |\\n| 4 | Kevin De + Bruyne | Belgian | Manchester City | Midfielder | Premier + League multiple titles, pivotal playmaker, consistent top assister |\\n| + 5 | Robert Lewandowski | Polish | FC Barcelona | Striker + \ | La Liga top scorer, multiple Bundesliga Golden Boots, consistent + goal scorer |\\n| 6 | Neymar Jr | Brazilian | Al Hilal + \ | Forward | World Cup quarterfinalist, Copa Libertadores + & Champions League winner |\\n| 7 | Virgil van Dijk | Dutch + \ | Liverpool | Defender | Premier League winner, + UEFA Champions League winner, defensive leader |\\n| 8 | Mohamed + Salah | Egyptian | Liverpool | Forward/Winger | Multiple + Premier League Golden Boots, Champions League winner |\\n| + 9 | Thibaut Courtois | Belgian | Real Madrid | Goalkeeper + \ | Multiple UEFA Champions League titles, La Liga titles, known for crucial + saves |\\n| 10 | Jude Bellingham | English | Real Madrid | + Midfielder | Emerging star, key player in Bundesliga & La Liga, creative + and dynamic playmaker |\\n\\n### Notes:\\n- The ranking combines individual + skills, recent achievements (2022-2024 period), influence on matches and teams, + and global reputation.\\n- Players like Lionel Messi and Kylian Mbapp\xE9 + continue to be prominent despite changing teams.\\n- Rising stars such as + Jude Bellingham show great promise and are quickly climbing the ranks.\\n- + Positions and roles are varied to reflect different contributions on the field.\\n\\nIf + you'd like, I can also provide a deeper analysis of each player or focus on + other criteria like defensive players or young talents.\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 68,\n \"completion_tokens\": 579,\n \"total_tokens\": 647,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" headers: CF-RAY: - - 94d9b5400dcd624b-GRU + - CF-RAY-XXX Connection: - keep-alive Content-Type: - application/json Date: - - Tue, 10 Jun 2025 14:55:42 GMT + - Fri, 06 Feb 2026 14:53:57 GMT Server: - cloudflare Set-Cookie: - - __cf_bm=8Yv8F0ZCFAo2lf.qoqxao70yxyjVvIV90zQqVF6bVzQ-1749567342-1.0.1.1-fZgnv3RDfunvCO1koxwwFJrHnxSx_rwS_FHvQ6xxDPpKHwYr7dTqIQLZrNgSX5twGyK4F22rUmkuiS6KMVogcinChk8lmHtJBTUVTFjr2KU; path=/; expires=Tue, 10-Jun-25 15:25:42 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None - - _cfuvid=wzh8YnmXvLq1G0RcIVijtzboQtCZyIe2uZiochkBLqE-1749567342267-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None + - SET-COOKIE-XXX + Strict-Transport-Security: + - STS-XXX Transfer-Encoding: - chunked X-Content-Type-Options: - - nosniff + - X-CONTENT-TYPE-XXX access-control-expose-headers: - - X-Request-ID + - ACCESS-CONTROL-XXX alt-svc: - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC openai-organization: - - crewai-iuxna1 + - OPENAI-ORG-XXX openai-processing-ms: - - '33288' + - '11341' + openai-project: + - OPENAI-PROJECT-XXX openai-version: - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-envoy-upstream-service-time: - - '33292' + x-openai-proxy-wasm: + - v0.1 x-ratelimit-limit-requests: - - '30000' + - X-RATELIMIT-LIMIT-REQUESTS-XXX x-ratelimit-limit-tokens: - - '150000000' + - X-RATELIMIT-LIMIT-TOKENS-XXX x-ratelimit-remaining-requests: - - '29999' + - X-RATELIMIT-REMAINING-REQUESTS-XXX x-ratelimit-remaining-tokens: - - '149999859' + - X-RATELIMIT-REMAINING-TOKENS-XXX x-ratelimit-reset-requests: - - 2ms + - X-RATELIMIT-RESET-REQUESTS-XXX x-ratelimit-reset-tokens: - - 0s + - X-RATELIMIT-RESET-TOKENS-XXX x-request-id: - - req_6a587ea22edef774ecdada790a320cab + - X-REQUEST-ID-XXX status: code: 200 message: OK - request: - body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You are an expert at gathering and organizing information. You carefully collect details and present them in a structured way.\nYour personal goal is: Gather information about the best soccer players\n\nTo give my best complete final answer to the task respond using the exact following format:\n\nThought: I now can give a great answer\nFinal Answer: Your final answer must be the great and the most complete as possible, it must be outcome described.\n\nI MUST use these formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players in the world?"}, {"role": "assistant", "content": "Thought: I now can give a great answer \nFinal Answer: The top 10 best soccer players in the world, as of October 2023, can be identified based on their recent performances, skills, impact on games, and overall contributions to their teams. Here is the structured list:\n\n1. **Lionel Messi (Inter Miami CF)**\n - - Position: Forward\n - Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements: Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2. **Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup champion (2018), Ligue 1 titles, multiple domestic cups.\n\n3. **Erling Haaland (Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed, goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n - Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements: - 2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6. **Neymar Jr. (Al Hilal)**\n - Position: Forward\n - Key Attributes: Flair, dribbling, creativity.\n - Achievements: Multiple domestic league titles, Champions League runner-up.\n\n7. **Robert Lewandowski (FC Barcelona)**\n - Position: Forward\n - Key Attributes: Finishing, positioning, aerial ability.\n - Achievements: FIFA Best Men''s Player, multiple Bundesliga titles, La Liga champion (2023).\n\n8. **Mohamed Salah (Liverpool)**\n - Position: Forward\n - Key Attributes: Speed, finishing, dribbling.\n - Achievements: Premier League champion, FA Cup, UEFA Champions League winner.\n\n9. **Vin\u00edcius J\u00fanior (Real Madrid)**\n - Position: Forward\n - Key Attributes: Speed, dribbling, creativity.\n - Achievements: UEFA Champions League winner (2022), La Liga champion (2023).\n\n10. **Luka Modri\u0107 (Real Madrid)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, - tactical intelligence.\n - Achievements: Multiple Champions League titles, Ballon d''Or winner (2018).\n\nThis list is compiled based on their current form, past performances, and contributions to their respective teams in both domestic and international competitions. Player rankings can vary based on personal opinion and specific criteria used for evaluation, but these players have consistently been regarded as some of the best in the world as of October 2023."}, {"role": "user", "content": "You are not allowed to include Brazilian players"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"]}' + body: '{"messages":[{"role":"system","content":"You are Sports Analyst. You are + an expert at gathering and organizing information. You carefully collect details + and present them in a structured way.\nYour personal goal is: Gather information + about the best soccer players"},{"role":"user","content":"\nCurrent Task: Top + 10 best players in the world?\n\nProvide your complete response:"}],"model":"gpt-4.1-mini"}' headers: + User-Agent: + - X-USER-AGENT-XXX accept: - application/json accept-encoding: - - gzip, deflate, zstd + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX connection: - keep-alive content-length: - - '3594' + - '404' content-type: - application/json cookie: - - __cf_bm=8Yv8F0ZCFAo2lf.qoqxao70yxyjVvIV90zQqVF6bVzQ-1749567342-1.0.1.1-fZgnv3RDfunvCO1koxwwFJrHnxSx_rwS_FHvQ6xxDPpKHwYr7dTqIQLZrNgSX5twGyK4F22rUmkuiS6KMVogcinChk8lmHtJBTUVTFjr2KU; _cfuvid=wzh8YnmXvLq1G0RcIVijtzboQtCZyIe2uZiochkBLqE-1749567342267-0.0.1.1-604800000 + - COOKIE-XXX host: - api.openai.com - user-agent: - - OpenAI/Python 1.78.0 x-stainless-arch: - - arm64 + - X-STAINLESS-ARCH-XXX x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - MacOS + - X-STAINLESS-OS-XXX x-stainless-package-version: - - 1.78.0 - x-stainless-raw-response: - - 'true' + - 1.83.0 x-stainless-read-timeout: - - '600.0' + - X-STAINLESS-READ-TIMEOUT-XXX x-stainless-retry-count: - '0' x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.9 + - 3.13.5 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-BgugJkCDtB2EfvAMiIFK0reeLKFBl\",\n \"object\": \"chat.completion\",\n \"created\": 1749567359,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Thought: I now can give a great answer \\nFinal Answer: Here is an updated list of the top 10 best soccer players in the world as of October 2023, excluding Brazilian players:\\n\\n1. **Lionel Messi (Inter Miami CF)**\\n - Position: Forward\\n - Key Attributes: Dribbling, vision, goal-scoring ability.\\n - Achievements: Multiple Ballon d'Or winner, Copa America champion, World Cup champion (2022).\\n\\n2. **Kylian Mbappé (Paris Saint-Germain)**\\n - Position: Forward\\n - Key Attributes: Speed, technique, finishing.\\n - Achievements: FIFA World Cup champion (2018), Ligue 1 titles, multiple domestic cups.\\n\\n3. **Erling Haaland (Manchester City)**\\n - Position: Forward\\\ - n - Key Attributes: Power, speed, goal-scoring instinct.\\n - Achievements: Bundesliga top scorer, UEFA Champions League winner (2023), Premier League titles.\\n\\n4. **Kevin De Bruyne (Manchester City)**\\n - Position: Midfielder\\n - Key Attributes: Passing, vision, creativity.\\n - Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League winner (2023).\\n\\n5. **Karim Benzema (Al-Ittihad)**\\n - Position: Forward\\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\\n - Achievements: 2022 Ballon d'Or winner, multiple Champions Leagues with Real Madrid.\\n\\n6. **Robert Lewandowski (FC Barcelona)**\\n - Position: Forward\\n - Key Attributes: Finishing, positioning, aerial ability.\\n - Achievements: FIFA Best Men's Player, multiple Bundesliga titles, La Liga champion (2023).\\n\\n7. **Mohamed Salah (Liverpool)**\\n - Position: Forward\\n - Key Attributes: Speed, finishing, dribbling.\\n - Achievements: Premier League\ - \ champion, FA Cup, UEFA Champions League winner.\\n\\n8. **Vinícius Júnior (Real Madrid)**\\n - Position: Forward\\n - Key Attributes: Speed, dribbling, creativity.\\n - Achievements: UEFA Champions League winner (2022), La Liga champion (2023).\\n\\n9. **Luka Modrić (Real Madrid)**\\n - Position: Midfielder\\n - Key Attributes: Passing, vision, tactical intelligence.\\n - Achievements: Multiple Champions League titles, Ballon d'Or winner (2018).\\n\\n10. **Harry Kane (Bayern Munich)**\\n - Position: Forward\\n - Key Attributes: Goal-scoring, technique, playmaking.\\n - Achievements: Golden Boot winner, Premier League titles, UEFA European Championship runner-up.\\n\\nThis list has been adjusted to exclude Brazilian players and focuses on those who have made significant impacts in their clubs and on the international stage as of October 2023. Each player is recognized for their exceptional skills, performances, and achievements.\",\n \"refusal\": null,\n\ - \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 781,\n \"completion_tokens\": 610,\n \"total_tokens\": 1391,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_34a54ae93c\"\n}\n" + string: "{\n \"id\": \"chatcmpl-D6HVVtt46NRCvFl3RKIorS6YjF0N4\",\n \"object\": + \"chat.completion\",\n \"created\": 1770389637,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Certainly! Here is a list of the top + 10 best soccer players in the world as of 2024, based on recent performances, + skills, achievements, and overall impact on the game:\\n\\n### Top 10 Best + Soccer Players in the World (2024)\\n\\n1. **Kylian Mbapp\xE9** (France, Paris + Saint-Germain)\\n - Position: Forward\\n - Key Attributes: Speed, dribbling, + goal-scoring ability\\n - Recent Highlights: Leading goal scorer in Ligue + 1, key player for France national team\\n\\n2. **Erling Haaland** (Norway, + Manchester City)\\n - Position: Striker\\n - Key Attributes: Physicality, + finishing, positioning\\n - Recent Highlights: Premier League top scorer, + instrumental in Manchester City's attacking line\\n\\n3. **Lionel Messi** + (Argentina, Inter Miami)\\n - Position: Forward\\n - Key Attributes: Vision, + passing, creativity\\n - Recent Highlights: Continued performance excellence, + influential in both club and national team\\n\\n4. **Kevin De Bruyne** (Belgium, + Manchester City)\\n - Position: Midfielder\\n - Key Attributes: Passing + accuracy, vision, leadership\\n - Recent Highlights: Playmaker behind Manchester + City's successes, consistent elite performance\\n\\n5. **Mohamed Salah** (Egypt, + Liverpool)\\n - Position: Winger\\n - Key Attributes: Pace, dribbling, + goal-scoring\\n - Recent Highlights: Key attacker for Liverpool, strong + performances in the Premier League and UEFA competitions\\n\\n6. **Karim Benzema** + (France, Al-Ittihad)\\n - Position: Striker\\n - Key Attributes: Technical + skills, finishing, experience\\n - Recent Highlights: Successful stint in + Saudi Pro League, former Ballon d'Or winner\\n\\n7. **Robert Lewandowski** + (Poland, Barcelona)\\n - Position: Striker\\n - Key Attributes: Finishing, + positioning, consistency\\n - Recent Highlights: Reliable goal scorer for + Barcelona and Poland\\n\\n8. **Vin\xEDcius J\xFAnior** (Brazil, Real Madrid)\\n + \ - Position: Winger\\n - Key Attributes: Dribbling, pace, creativity\\n + \ - Recent Highlights: Rising star, vital for Real Madrid in domestic and + European competitions\\n\\n9. **Jude Bellingham** (England, Real Madrid)\\n + \ - Position: Midfielder\\n - Key Attributes: Box-to-box ability, tackling, + vision\\n - Recent Highlights: Young talent with remarkable impact at club + and international level\\n\\n10. **Thibaut Courtois** (Belgium, Real Madrid)\\n + \ - Position: Goalkeeper\\n - Key Attributes: Shot-stopping, command + of area, reflexes\\n - Recent Highlights: Considered one of the best goalkeepers + globally, crucial for Real Madrid's defensive strength\\n\\n### Notes:\\n- + The ranking can vary based on different criteria such as individual awards, + statistics, and team success.\\n- Emerging talents and consistent veterans + are both considered.\\n- Positions span across forward, midfield, defense, + and goalkeeper to account for overall game impact.\\n\\nWould you like more + detailed profiles or statistics on any specific players?\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 68,\n \"completion_tokens\": 647,\n \"total_tokens\": 715,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" headers: CF-RAY: - - 94d9b6782db84d3b-GRU + - CF-RAY-XXX Connection: - keep-alive Content-Type: - application/json Date: - - Tue, 10 Jun 2025 14:56:30 GMT + - Fri, 06 Feb 2026 14:54:11 GMT Server: - cloudflare + Strict-Transport-Security: + - STS-XXX Transfer-Encoding: - chunked X-Content-Type-Options: - - nosniff + - X-CONTENT-TYPE-XXX access-control-expose-headers: - - X-Request-ID + - ACCESS-CONTROL-XXX alt-svc: - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC openai-organization: - - crewai-iuxna1 + - OPENAI-ORG-XXX openai-processing-ms: - - '31484' + - '13664' + openai-project: + - OPENAI-PROJECT-XXX openai-version: - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-envoy-upstream-service-time: - - '31490' + x-openai-proxy-wasm: + - v0.1 x-ratelimit-limit-requests: - - '30000' + - X-RATELIMIT-LIMIT-REQUESTS-XXX x-ratelimit-limit-tokens: - - '150000000' + - X-RATELIMIT-LIMIT-TOKENS-XXX x-ratelimit-remaining-requests: - - '29999' + - X-RATELIMIT-REMAINING-REQUESTS-XXX x-ratelimit-remaining-tokens: - - '149999166' + - X-RATELIMIT-REMAINING-TOKENS-XXX x-ratelimit-reset-requests: - - 2ms + - X-RATELIMIT-RESET-REQUESTS-XXX x-ratelimit-reset-tokens: - - 0s + - X-RATELIMIT-RESET-TOKENS-XXX x-request-id: - - req_aa737cf40bb76af9f458bfd35f7a77a1 + - X-REQUEST-ID-XXX status: code: 200 message: OK - request: - body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You are an expert at gathering and organizing information. You carefully collect details and present them in a structured way.\nYour personal goal is: Gather information about the best soccer players\n\nTo give my best complete final answer to the task respond using the exact following format:\n\nThought: I now can give a great answer\nFinal Answer: Your final answer must be the great and the most complete as possible, it must be outcome described.\n\nI MUST use these formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players in the world?"}, {"role": "assistant", "content": "Thought: I now can give a great answer \nFinal Answer: The top 10 best soccer players in the world, as of October 2023, can be identified based on their recent performances, skills, impact on games, and overall contributions to their teams. Here is the structured list:\n\n1. **Lionel Messi (Inter Miami CF)**\n - - Position: Forward\n - Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements: Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2. **Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup champion (2018), Ligue 1 titles, multiple domestic cups.\n\n3. **Erling Haaland (Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed, goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n - Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements: - 2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6. **Neymar Jr. (Al Hilal)**\n - Position: Forward\n - Key Attributes: Flair, dribbling, creativity.\n - Achievements: Multiple domestic league titles, Champions League runner-up.\n\n7. **Robert Lewandowski (FC Barcelona)**\n - Position: Forward\n - Key Attributes: Finishing, positioning, aerial ability.\n - Achievements: FIFA Best Men''s Player, multiple Bundesliga titles, La Liga champion (2023).\n\n8. **Mohamed Salah (Liverpool)**\n - Position: Forward\n - Key Attributes: Speed, finishing, dribbling.\n - Achievements: Premier League champion, FA Cup, UEFA Champions League winner.\n\n9. **Vin\u00edcius J\u00fanior (Real Madrid)**\n - Position: Forward\n - Key Attributes: Speed, dribbling, creativity.\n - Achievements: UEFA Champions League winner (2022), La Liga champion (2023).\n\n10. **Luka Modri\u0107 (Real Madrid)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, - tactical intelligence.\n - Achievements: Multiple Champions League titles, Ballon d''Or winner (2018).\n\nThis list is compiled based on their current form, past performances, and contributions to their respective teams in both domestic and international competitions. Player rankings can vary based on personal opinion and specific criteria used for evaluation, but these players have consistently been regarded as some of the best in the world as of October 2023."}, {"role": "user", "content": "You are not allowed to include Brazilian players"}, {"role": "assistant", "content": "Thought: I now can give a great answer \nFinal Answer: Here is an updated list of the top 10 best soccer players in the world as of October 2023, excluding Brazilian players:\n\n1. **Lionel Messi (Inter Miami CF)**\n - Position: Forward\n - Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements: Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2. - **Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup champion (2018), Ligue 1 titles, multiple domestic cups.\n\n3. **Erling Haaland (Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed, goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n - Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements: 2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6. **Robert Lewandowski (FC Barcelona)**\n - Position: Forward\n - Key Attributes: Finishing, positioning, - aerial ability.\n - Achievements: FIFA Best Men''s Player, multiple Bundesliga titles, La Liga champion (2023).\n\n7. **Mohamed Salah (Liverpool)**\n - Position: Forward\n - Key Attributes: Speed, finishing, dribbling.\n - Achievements: Premier League champion, FA Cup, UEFA Champions League winner.\n\n8. **Vin\u00edcius J\u00fanior (Real Madrid)**\n - Position: Forward\n - Key Attributes: Speed, dribbling, creativity.\n - Achievements: UEFA Champions League winner (2022), La Liga champion (2023).\n\n9. **Luka Modri\u0107 (Real Madrid)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, tactical intelligence.\n - Achievements: Multiple Champions League titles, Ballon d''Or winner (2018).\n\n10. **Harry Kane (Bayern Munich)**\n - Position: Forward\n - Key Attributes: Goal-scoring, technique, playmaking.\n - Achievements: Golden Boot winner, Premier League titles, UEFA European Championship runner-up.\n\nThis list has been adjusted to exclude Brazilian - players and focuses on those who have made significant impacts in their clubs and on the international stage as of October 2023. Each player is recognized for their exceptional skills, performances, and achievements."}, {"role": "user", "content": "You are not allowed to include Brazilian players"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"]}' + body: '{"messages":[{"role":"system","content":"You are Sports Analyst. You are + an expert at gathering and organizing information. You carefully collect details + and present them in a structured way.\nYour personal goal is: Gather information + about the best soccer players"},{"role":"user","content":"\nCurrent Task: Top + 10 best players in the world?\n\nProvide your complete response:"}],"model":"gpt-4.1-mini"}' headers: + User-Agent: + - X-USER-AGENT-XXX accept: - application/json accept-encoding: - - gzip, deflate, zstd + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX connection: - keep-alive content-length: - - '6337' + - '404' content-type: - application/json cookie: - - __cf_bm=8Yv8F0ZCFAo2lf.qoqxao70yxyjVvIV90zQqVF6bVzQ-1749567342-1.0.1.1-fZgnv3RDfunvCO1koxwwFJrHnxSx_rwS_FHvQ6xxDPpKHwYr7dTqIQLZrNgSX5twGyK4F22rUmkuiS6KMVogcinChk8lmHtJBTUVTFjr2KU; _cfuvid=wzh8YnmXvLq1G0RcIVijtzboQtCZyIe2uZiochkBLqE-1749567342267-0.0.1.1-604800000 + - COOKIE-XXX host: - api.openai.com - user-agent: - - OpenAI/Python 1.78.0 x-stainless-arch: - - arm64 + - X-STAINLESS-ARCH-XXX x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - MacOS + - X-STAINLESS-OS-XXX x-stainless-package-version: - - 1.78.0 - x-stainless-raw-response: - - 'true' + - 1.83.0 x-stainless-read-timeout: - - '600.0' + - X-STAINLESS-READ-TIMEOUT-XXX x-stainless-retry-count: - '0' x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.9 + - 3.13.5 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-BgugsAmyI50uQ6SpCp89ZZY4eD1Pz\",\n \"object\": \"chat.completion\",\n \"created\": 1749567394,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Thought: I now can give a great answer \\nFinal Answer: Here is the revised list of the top 10 best soccer players in the world as of October 2023, explicitly excluding Brazilian players:\\n\\n1. **Lionel Messi (Inter Miami CF)**\\n - Position: Forward\\n - Key Attributes: Dribbling, vision, goal-scoring ability.\\n - Achievements: Multiple Ballon d'Or winner, Copa America champion, World Cup champion (2022).\\n\\n2. **Kylian Mbappé (Paris Saint-Germain)**\\n - Position: Forward\\n - Key Attributes: Speed, technique, finishing.\\n - Achievements: FIFA World Cup champion (2018), multiple Ligue 1 titles, and various domestic cups.\\n\\n3. **Erling Haaland (Manchester City)**\\n\ - \ - Position: Forward\\n - Key Attributes: Power, speed, goal-scoring instinct.\\n - Achievements: Bundesliga top scorer, UEFA Champions League winner (2023), Premier League titles.\\n\\n4. **Kevin De Bruyne (Manchester City)**\\n - Position: Midfielder\\n - Key Attributes: Passing, vision, creativity.\\n - Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League winner (2023).\\n\\n5. **Karim Benzema (Al-Ittihad)**\\n - Position: Forward\\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\\n - Achievements: 2022 Ballon d'Or winner, multiple Champions Leagues with Real Madrid.\\n\\n6. **Robert Lewandowski (FC Barcelona)**\\n - Position: Forward\\n - Key Attributes: Finishing, positioning, aerial ability.\\n - Achievements: FIFA Best Men's Player, multiple Bundesliga titles, La Liga champion (2023).\\n\\n7. **Mohamed Salah (Liverpool)**\\n - Position: Forward\\n - Key Attributes: Speed, finishing, dribbling.\\n -\ - \ Achievements: Premier League champion, FA Cup, UEFA Champions League winner.\\n\\n8. **Luka Modrić (Real Madrid)**\\n - Position: Midfielder\\n - Key Attributes: Passing, vision, tactical intelligence.\\n - Achievements: Multiple Champions League titles, Ballon d'Or winner (2018).\\n\\n9. **Harry Kane (Bayern Munich)**\\n - Position: Forward\\n - Key Attributes: Goal-scoring, technique, playmaking.\\n - Achievements: Golden Boot winner, Premier League titles, UEFA European Championship runner-up.\\n\\n10. **Rodri (Manchester City)**\\n - Position: Midfielder\\n - Key Attributes: Defensive skills, passing, positional awareness.\\n - Achievements: Premier League titles, UEFA Champions League winner (2023).\\n\\nThis list is curated while adhering to the restriction of excluding Brazilian players. Each player included has demonstrated exceptional skills and remarkable performances, solidifying their status as some of the best in the world as of October 2023.\"\ - ,\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1407,\n \"completion_tokens\": 605,\n \"total_tokens\": 2012,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_62a23a81ef\"\n}\n" + string: "{\n \"id\": \"chatcmpl-D6HVj7ehAepZw6ifhetJ366keiloR\",\n \"object\": + \"chat.completion\",\n \"created\": 1770389651,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Certainly! Here's a comprehensive list + of the top 10 best soccer players in the world as of 2024. The ranking is + based on recent performances, individual skills, achievements, influence on + the game, and consistency:\\n\\n### Top 10 Best Soccer Players in the World + (2024)\\n\\n1. **Kylian Mbapp\xE9** \\n - Nationality: French \\n - + Position: Forward \\n - Key Highlights: Multiple Ligue 1 Golden Boot winner, + World Cup champion, known for explosive speed and clinical finishing.\\n\\n2. + **Erling Haaland** \\n - Nationality: Norwegian \\n - Position: Striker + \ \\n - Key Highlights: Premier League top scorer, prolific goal scorer + with physical presence, remarkable goal conversion rate.\\n\\n3. **Lionel + Messi** \\n - Nationality: Argentine \\n - Position: Forward/Playmaker + \ \\n - Key Highlights: Multiple Ballon d'Or winner, 2022 World Cup winner, + incredible dribbling, vision, and playmaking abilities.\\n\\n4. **Kevin De + Bruyne** \\n - Nationality: Belgian \\n - Position: Midfielder \\n + \ - Key Highlights: Premier League Playmaker of the Year, exceptional passing, + vision and leadership in midfield.\\n\\n5. **Karim Benzema** \\n - Nationality: + French \\n - Position: Striker \\n - Key Highlights: 2022 Ballon d'Or + winner, key player for Real Madrid with great technical and finishing skills.\\n\\n6. + **Robert Lewandowski** \\n - Nationality: Polish \\n - Position: Striker + \ \\n - Key Highlights: Consistent goal scorer, excellent positioning and + finishing, key figure in Bayern Munich and Barcelona.\\n\\n7. **Vin\xEDcius + J\xFAnior** \\n - Nationality: Brazilian \\n - Position: Winger \\n + \ - Key Highlights: Emerging star with great dribbling, pace, and creativity; + crucial in Real Madrid\u2019s offense.\\n\\n8. **Mohamed Salah** \\n - + Nationality: Egyptian \\n - Position: Winger/Forward \\n - Key Highlights: + Premier League top scorer multiple times, fast and skillful winger with an + eye for goals.\\n\\n9. **Jude Bellingham** \\n - Nationality: English \\n + \ - Position: Midfielder \\n - Key Highlights: Young versatile midfielder, + exceptional work rate, passing, and leadership for Real Madrid.\\n\\n10. **Thibaut + Courtois** \\n - Nationality: Belgian \\n - Position: Goalkeeper \\n + \ - Key Highlights: Among the best goalkeepers globally, known for shot-stopping + abilities and crucial saves, key in Real Madrid\u2019s defense.\\n\\n---\\n\\n### + Summary:\\n- The list balances goal scorers, playmakers, and key defensive + players.\\n- Includes a blend of proven veterans and emerging talents.\\n- + Reflects performances in major leagues, international tournaments, and club + competitions.\\n\\nIf you want, I can provide a detailed profile on any of + these players or a different selection based on specific criteria like position + or league.\",\n \"refusal\": null,\n \"annotations\": []\n },\n + \ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n + \ \"usage\": {\n \"prompt_tokens\": 68,\n \"completion_tokens\": 616,\n + \ \"total_tokens\": 684,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" headers: CF-RAY: - - 94d9b7561f204d3b-GRU + - CF-RAY-XXX Connection: - keep-alive Content-Type: - application/json Date: - - Tue, 10 Jun 2025 14:56:46 GMT + - Fri, 06 Feb 2026 14:54:24 GMT Server: - cloudflare + Strict-Transport-Security: + - STS-XXX Transfer-Encoding: - chunked X-Content-Type-Options: - - nosniff + - X-CONTENT-TYPE-XXX access-control-expose-headers: - - X-Request-ID + - ACCESS-CONTROL-XXX alt-svc: - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC openai-organization: - - crewai-iuxna1 + - OPENAI-ORG-XXX openai-processing-ms: - - '12189' + - '12694' + openai-project: + - OPENAI-PROJECT-XXX openai-version: - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-envoy-upstream-service-time: - - '12193' + x-openai-proxy-wasm: + - v0.1 x-ratelimit-limit-requests: - - '30000' + - X-RATELIMIT-LIMIT-REQUESTS-XXX x-ratelimit-limit-tokens: - - '150000000' + - X-RATELIMIT-LIMIT-TOKENS-XXX x-ratelimit-remaining-requests: - - '29999' + - X-RATELIMIT-REMAINING-REQUESTS-XXX x-ratelimit-remaining-tokens: - - '149998513' + - X-RATELIMIT-REMAINING-TOKENS-XXX x-ratelimit-reset-requests: - - 2ms + - X-RATELIMIT-RESET-REQUESTS-XXX x-ratelimit-reset-tokens: - - 0s + - X-RATELIMIT-RESET-TOKENS-XXX x-request-id: - - req_1098f5a5384f4a26aecf0c9e4e4d1fc0 + - X-REQUEST-ID-XXX status: code: 200 message: OK - request: - body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You are an expert at gathering and organizing information. You carefully collect details and present them in a structured way.\nYour personal goal is: Gather information about the best soccer players\n\nTo give my best complete final answer to the task respond using the exact following format:\n\nThought: I now can give a great answer\nFinal Answer: Your final answer must be the great and the most complete as possible, it must be outcome described.\n\nI MUST use these formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players in the world?"}, {"role": "assistant", "content": "Thought: I now can give a great answer \nFinal Answer: The top 10 best soccer players in the world, as of October 2023, can be identified based on their recent performances, skills, impact on games, and overall contributions to their teams. Here is the structured list:\n\n1. **Lionel Messi (Inter Miami CF)**\n - - Position: Forward\n - Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements: Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2. **Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup champion (2018), Ligue 1 titles, multiple domestic cups.\n\n3. **Erling Haaland (Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed, goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n - Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements: - 2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6. **Neymar Jr. (Al Hilal)**\n - Position: Forward\n - Key Attributes: Flair, dribbling, creativity.\n - Achievements: Multiple domestic league titles, Champions League runner-up.\n\n7. **Robert Lewandowski (FC Barcelona)**\n - Position: Forward\n - Key Attributes: Finishing, positioning, aerial ability.\n - Achievements: FIFA Best Men''s Player, multiple Bundesliga titles, La Liga champion (2023).\n\n8. **Mohamed Salah (Liverpool)**\n - Position: Forward\n - Key Attributes: Speed, finishing, dribbling.\n - Achievements: Premier League champion, FA Cup, UEFA Champions League winner.\n\n9. **Vin\u00edcius J\u00fanior (Real Madrid)**\n - Position: Forward\n - Key Attributes: Speed, dribbling, creativity.\n - Achievements: UEFA Champions League winner (2022), La Liga champion (2023).\n\n10. **Luka Modri\u0107 (Real Madrid)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, - tactical intelligence.\n - Achievements: Multiple Champions League titles, Ballon d''Or winner (2018).\n\nThis list is compiled based on their current form, past performances, and contributions to their respective teams in both domestic and international competitions. Player rankings can vary based on personal opinion and specific criteria used for evaluation, but these players have consistently been regarded as some of the best in the world as of October 2023."}, {"role": "user", "content": "You are not allowed to include Brazilian players"}, {"role": "assistant", "content": "Thought: I now can give a great answer \nFinal Answer: Here is an updated list of the top 10 best soccer players in the world as of October 2023, excluding Brazilian players:\n\n1. **Lionel Messi (Inter Miami CF)**\n - Position: Forward\n - Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements: Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2. - **Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup champion (2018), Ligue 1 titles, multiple domestic cups.\n\n3. **Erling Haaland (Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed, goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n - Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements: 2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6. **Robert Lewandowski (FC Barcelona)**\n - Position: Forward\n - Key Attributes: Finishing, positioning, - aerial ability.\n - Achievements: FIFA Best Men''s Player, multiple Bundesliga titles, La Liga champion (2023).\n\n7. **Mohamed Salah (Liverpool)**\n - Position: Forward\n - Key Attributes: Speed, finishing, dribbling.\n - Achievements: Premier League champion, FA Cup, UEFA Champions League winner.\n\n8. **Vin\u00edcius J\u00fanior (Real Madrid)**\n - Position: Forward\n - Key Attributes: Speed, dribbling, creativity.\n - Achievements: UEFA Champions League winner (2022), La Liga champion (2023).\n\n9. **Luka Modri\u0107 (Real Madrid)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, tactical intelligence.\n - Achievements: Multiple Champions League titles, Ballon d''Or winner (2018).\n\n10. **Harry Kane (Bayern Munich)**\n - Position: Forward\n - Key Attributes: Goal-scoring, technique, playmaking.\n - Achievements: Golden Boot winner, Premier League titles, UEFA European Championship runner-up.\n\nThis list has been adjusted to exclude Brazilian - players and focuses on those who have made significant impacts in their clubs and on the international stage as of October 2023. Each player is recognized for their exceptional skills, performances, and achievements."}, {"role": "user", "content": "You are not allowed to include Brazilian players"}, {"role": "assistant", "content": "Thought: I now can give a great answer \nFinal Answer: Here is the revised list of the top 10 best soccer players in the world as of October 2023, explicitly excluding Brazilian players:\n\n1. **Lionel Messi (Inter Miami CF)**\n - Position: Forward\n - Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements: Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2. **Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup champion (2018), multiple Ligue 1 titles, and various domestic cups.\n\n3. **Erling Haaland - (Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed, goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n - Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements: 2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6. **Robert Lewandowski (FC Barcelona)**\n - Position: Forward\n - Key Attributes: Finishing, positioning, aerial ability.\n - Achievements: FIFA Best Men''s Player, multiple Bundesliga titles, La Liga champion (2023).\n\n7. **Mohamed Salah (Liverpool)**\n - Position: Forward\n - Key Attributes: Speed, finishing, dribbling.\n - Achievements: - Premier League champion, FA Cup, UEFA Champions League winner.\n\n8. **Luka Modri\u0107 (Real Madrid)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, tactical intelligence.\n - Achievements: Multiple Champions League titles, Ballon d''Or winner (2018).\n\n9. **Harry Kane (Bayern Munich)**\n - Position: Forward\n - Key Attributes: Goal-scoring, technique, playmaking.\n - Achievements: Golden Boot winner, Premier League titles, UEFA European Championship runner-up.\n\n10. **Rodri (Manchester City)**\n - Position: Midfielder\n - Key Attributes: Defensive skills, passing, positional awareness.\n - Achievements: Premier League titles, UEFA Champions League winner (2023).\n\nThis list is curated while adhering to the restriction of excluding Brazilian players. Each player included has demonstrated exceptional skills and remarkable performances, solidifying their status as some of the best in the world as of October 2023."}, {"role": "user", "content": - "You are not allowed to include Brazilian players"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"]}' + body: '{"messages":[{"role":"system","content":"You are Sports Analyst. You are + an expert at gathering and organizing information. You carefully collect details + and present them in a structured way.\nYour personal goal is: Gather information + about the best soccer players"},{"role":"user","content":"\nCurrent Task: Top + 10 best players in the world?\n\nProvide your complete response:"}],"model":"gpt-4.1-mini"}' headers: + User-Agent: + - X-USER-AGENT-XXX accept: - application/json accept-encoding: - - gzip, deflate, zstd + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX connection: - keep-alive content-length: - - '9093' + - '404' content-type: - application/json cookie: - - __cf_bm=8Yv8F0ZCFAo2lf.qoqxao70yxyjVvIV90zQqVF6bVzQ-1749567342-1.0.1.1-fZgnv3RDfunvCO1koxwwFJrHnxSx_rwS_FHvQ6xxDPpKHwYr7dTqIQLZrNgSX5twGyK4F22rUmkuiS6KMVogcinChk8lmHtJBTUVTFjr2KU; _cfuvid=wzh8YnmXvLq1G0RcIVijtzboQtCZyIe2uZiochkBLqE-1749567342267-0.0.1.1-604800000 + - COOKIE-XXX host: - api.openai.com - user-agent: - - OpenAI/Python 1.78.0 x-stainless-arch: - - arm64 + - X-STAINLESS-ARCH-XXX x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - MacOS + - X-STAINLESS-OS-XXX x-stainless-package-version: - - 1.78.0 - x-stainless-raw-response: - - 'true' + - 1.83.0 x-stainless-read-timeout: - - '600.0' + - X-STAINLESS-READ-TIMEOUT-XXX x-stainless-retry-count: - '0' x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.9 + - 3.13.5 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-BguhCefN1bN2OeYRo5ChhUqNBLUda\",\n \"object\": \"chat.completion\",\n \"created\": 1749567414,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Thought: I now can give a great answer \\nFinal Answer: Here is a refined list of the top 10 best soccer players in the world as of October 2023, ensuring that no Brazilian players are included:\\n\\n1. **Lionel Messi (Inter Miami CF)**\\n - Position: Forward\\n - Key Attributes: Dribbling, vision, goal-scoring ability.\\n - Achievements: Multiple Ballon d'Or winner, Copa America champion, World Cup champion (2022).\\n\\n2. **Kylian Mbappé (Paris Saint-Germain)**\\n - Position: Forward\\n - Key Attributes: Speed, technique, finishing.\\n - Achievements: FIFA World Cup champion (2018), multiple Ligue 1 titles, various domestic cups.\\n\\n3. **Erling Haaland (Manchester City)**\\\ - n - Position: Forward\\n - Key Attributes: Power, speed, goal-scoring instinct.\\n - Achievements: Bundesliga top scorer, UEFA Champions League winner (2023), Premier League titles.\\n\\n4. **Kevin De Bruyne (Manchester City)**\\n - Position: Midfielder\\n - Key Attributes: Passing, vision, creativity.\\n - Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League winner (2023).\\n\\n5. **Karim Benzema (Al-Ittihad)**\\n - Position: Forward\\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\\n - Achievements: 2022 Ballon d'Or winner, multiple Champions Leagues with Real Madrid.\\n\\n6. **Robert Lewandowski (FC Barcelona)**\\n - Position: Forward\\n - Key Attributes: Finishing, positioning, aerial ability.\\n - Achievements: FIFA Best Men's Player, multiple Bundesliga titles, La Liga champion (2023).\\n\\n7. **Mohamed Salah (Liverpool)**\\n - Position: Forward\\n - Key Attributes: Speed, finishing, dribbling.\\n -\ - \ Achievements: Premier League champion, FA Cup, UEFA Champions League winner.\\n\\n8. **Luka Modrić (Real Madrid)**\\n - Position: Midfielder\\n - Key Attributes: Passing, vision, tactical intelligence.\\n - Achievements: Multiple Champions League titles, Ballon d'Or winner (2018).\\n\\n9. **Harry Kane (Bayern Munich)**\\n - Position: Forward\\n - Key Attributes: Goal-scoring, technique, playmaking.\\n - Achievements: Golden Boot winner, multiple Premier League titles, UEFA European Championship runner-up.\\n\\n10. **Son Heung-min (Tottenham Hotspur)**\\n - Position: Forward\\n - Key Attributes: Speed, finishing, playmaking.\\n - Achievements: Premier League Golden Boot winner, multiple domestic cup titles.\\n\\nThis list has been carefully revised to exclude all Brazilian players while highlighting some of the most talented individuals in soccer as of October 2023. Each player has showcased remarkable effectiveness and skill, contributing significantly to their\ - \ teams on both domestic and international stages.\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 2028,\n \"completion_tokens\": 614,\n \"total_tokens\": 2642,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 1280,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_34a54ae93c\"\n}\n" + string: "{\n \"id\": \"chatcmpl-D6HVwwi5Ho4QGTHUG2QEEW677oVMn\",\n \"object\": + \"chat.completion\",\n \"created\": 1770389664,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Certainly! Here is a list of the top + 10 best soccer players in the world as of 2024, based on recent performances, + skills, influence, and overall impact on the game:\\n\\n1. **Kylian Mbapp\xE9** + \ \\n - Nationality: French \\n - Position: Forward \\n - Key Attributes: + Exceptional speed, dribbling, finishing, and versatility. Leading PSG and + France to numerous victories.\\n\\n2. **Erling Haaland** \\n - Nationality: + Norwegian \\n - Position: Striker \\n - Key Attributes: Incredible goal-scoring + ability, physicality, and positioning. Dominant in the Premier League with + Manchester City.\\n\\n3. **Lionel Messi** \\n - Nationality: Argentine + \ \\n - Position: Forward/Attacking Midfielder \\n - Key Attributes: + Unmatched dribbling, creativity, vision, and goal-scoring record. Continuing + to influence the game with Inter Miami and Argentina.\\n\\n4. **Kevin De Bruyne** + \ \\n - Nationality: Belgian \\n - Position: Midfielder \\n - Key + Attributes: Playmaking, passing accuracy, set-pieces, and leadership for Manchester + City and Belgium.\\n\\n5. **Mohamed Salah** \\n - Nationality: Egyptian + \ \\n - Position: Forward/Winger \\n - Key Attributes: Pace, dribbling, + goal-scoring consistency, and work rate at Liverpool and the Egyptian national + team.\\n\\n6. **Karim Benzema** \\n - Nationality: French \\n - Position: + Forward \\n - Key Attributes: Intelligent positioning, link-up play, and + clinical finishing, having continued strong performances with Al-Ittihad.\\n\\n7. + **Neymar Jr.** \\n - Nationality: Brazilian \\n - Position: Forward/Winger + \ \\n - Key Attributes: Flair, dribbling skill, creativity, and experience, + contributing to Al-Hilal and Brazil\u2019s national team.\\n\\n8. **Robert + Lewandowski** \\n - Nationality: Polish \\n - Position: Striker \\n + \ - Key Attributes: Finishing, positioning, and consistency, now shining + for Barcelona.\\n\\n9. **Vin\xEDcius Jr.** \\n - Nationality: Brazilian + \ \\n - Position: Winger \\n - Key Attributes: Explosiveness, dribbling, + creativity, and goal-scoring with Real Madrid.\\n\\n10. **Jude Bellingham** + \ \\n - Nationality: English \\n - Position: Midfielder \\n - Key + Attributes: Vision, stamina, maturity beyond years, and box-to-box midfield + capabilities at Real Madrid and England.\\n\\nThis list is subjective but + reflects consensus among experts, recent awards, and current form in top leagues + and international competitions. If you'd like, I can provide more detailed + statistics or historical context on any player.\",\n \"refusal\": null,\n + \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": + \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 68,\n \"completion_tokens\": + 571,\n \"total_tokens\": 639,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" headers: CF-RAY: - - 94d9b7d24d991d2c-GRU + - CF-RAY-XXX Connection: - keep-alive Content-Type: - application/json Date: - - Tue, 10 Jun 2025 14:57:29 GMT + - Fri, 06 Feb 2026 14:54:34 GMT Server: - cloudflare + Strict-Transport-Security: + - STS-XXX Transfer-Encoding: - chunked X-Content-Type-Options: - - nosniff + - X-CONTENT-TYPE-XXX access-control-expose-headers: - - X-Request-ID + - ACCESS-CONTROL-XXX alt-svc: - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC openai-organization: - - crewai-iuxna1 + - OPENAI-ORG-XXX openai-processing-ms: - - '35291' + - '10235' + openai-project: + - OPENAI-PROJECT-XXX openai-version: - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-envoy-upstream-service-time: - - '35294' + x-openai-proxy-wasm: + - v0.1 x-ratelimit-limit-requests: - - '30000' + - X-RATELIMIT-LIMIT-REQUESTS-XXX x-ratelimit-limit-tokens: - - '150000000' + - X-RATELIMIT-LIMIT-TOKENS-XXX x-ratelimit-remaining-requests: - - '29999' + - X-RATELIMIT-REMAINING-REQUESTS-XXX x-ratelimit-remaining-tokens: - - '149997855' + - X-RATELIMIT-REMAINING-TOKENS-XXX x-ratelimit-reset-requests: - - 2ms + - X-RATELIMIT-RESET-REQUESTS-XXX x-ratelimit-reset-tokens: - - 0s + - X-RATELIMIT-RESET-TOKENS-XXX x-request-id: - - req_4676152d4227ac1825d1240ddef231d6 + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Sports Analyst. You are + an expert at gathering and organizing information. You carefully collect details + and present them in a structured way.\nYour personal goal is: Gather information + about the best soccer players"},{"role":"user","content":"\nCurrent Task: Top + 10 best players in the world?\n\nProvide your complete response:"}],"model":"gpt-4.1-mini"}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '404' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6HW6NpJUgdxmwrzrNCtC4OjMNSCU\",\n \"object\": + \"chat.completion\",\n \"created\": 1770389674,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Certainly! Here is a list of the top + 10 best soccer players in the world as of 2024, based on their recent performances, + skill levels, and overall impact on the game:\\n\\n1. **Lionel Messi** \\n + \ - Nationality: Argentina \\n - Position: Forward \\n - Club: Inter + Miami CF \\n - Highlights: Multiple Ballon d'Or awards; exceptional dribbling, + vision, and goal-scoring ability; recent success in MLS and Copa America.\\n\\n2. + **Kylian Mbapp\xE9** \\n - Nationality: France \\n - Position: Forward + \ \\n - Club: Paris Saint-Germain \\n - Highlights: Speed, skill, and + finishing; key player for both PSG and the French national team; World Cup + winner.\\n\\n3. **Erling Haaland** \\n - Nationality: Norway \\n - Position: + Striker \\n - Club: Manchester City \\n - Highlights: Prolific goal + scorer with incredible physicality and pace; record-breaking goal tally in + Premier League.\\n\\n4. **Kevin De Bruyne** \\n - Nationality: Belgium + \ \\n - Position: Midfielder \\n - Club: Manchester City \\n - Highlights: + Best midfielder in the world with outstanding passing, vision, and set-piece + delivery.\\n\\n5. **Karim Benzema** \\n - Nationality: France \\n - + Position: Forward \\n - Club: Al-Ittihad \\n - Highlights: Experienced + and versatile striker; Ballon d\u2019Or winner in 2022; exceptional goal-scoring + and playmaking.\\n\\n6. **Robert Lewandowski** \\n - Nationality: Poland + \ \\n - Position: Striker \\n - Club: FC Barcelona \\n - Highlights: + Clinical finisher and leader; consistent top scorer in European leagues.\\n\\n7. + **Neymar Jr.** \\n - Nationality: Brazil \\n - Position: Forward/Winger + \ \\n - Club: Al-Hilal \\n - Highlights: Flair, creativity, and dribbling + skills; significant influence in Brazil\u2019s national team.\\n\\n8. **Mohamed + Salah** \\n - Nationality: Egypt \\n - Position: Forward/Winger \\n + \ - Club: Liverpool \\n - Highlights: Speed, finishing, and consistency; + crucial player for Liverpool and Egypt.\\n\\n9. **Luka Modri\u0107** \\n + \ - Nationality: Croatia \\n - Position: Midfielder \\n - Club: Real + Madrid \\n - Highlights: Veteran playmaker with excellent control, passing, + and tactical awareness.\\n\\n10. **Vin\xEDcius J\xFAnior** \\n - Nationality: + Brazil \\n - Position: Winger \\n - Club: Real Madrid \\n - Highlights: + Explosive pace, dribbling, and growing goal-scoring threat.\\n\\nThese players + are currently regarded as some of the best globally, considering their individual + skills, impact in club and international competitions, and accolades.\",\n + \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": + null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 68,\n \"completion_tokens\": 595,\n \"total_tokens\": 663,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 14:54:46 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '12128' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX status: code: 200 message: OK diff --git a/lib/crewai/tests/cassettes/agents/test_multiple_agents_in_same_flow.yaml b/lib/crewai/tests/cassettes/agents/test_multiple_agents_in_same_flow.yaml index 46ba712c10..1bf365a9fc 100644 --- a/lib/crewai/tests/cassettes/agents/test_multiple_agents_in_same_flow.yaml +++ b/lib/crewai/tests/cassettes/agents/test_multiple_agents_in_same_flow.yaml @@ -1,13 +1,8 @@ interactions: - request: body: '{"messages":[{"role":"system","content":"You are First Agent. A friendly - greeter\nYour personal goal is: Greet users\nTo give my best complete final - answer to the task respond using the exact following format:\n\nThought: I now - can give a great answer\nFinal Answer: Your final answer must be the great and - the most complete as possible, it must be outcome described.\n\nI MUST use these - formats, my job depends on it!"},{"role":"user","content":"\nCurrent Task: Say - hello\n\nBegin! This is VERY important to you, use the tools available and give - your best Final Answer, your job depends on it!\n\nThought:"}],"model":"gpt-4o-mini"}' + greeter\nYour personal goal is: Greet users"},{"role":"user","content":"\nCurrent + Task: Say hello\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' headers: User-Agent: - X-USER-AGENT-XXX @@ -20,7 +15,7 @@ interactions: connection: - keep-alive content-length: - - '632' + - '231' content-type: - application/json host: @@ -42,24 +37,23 @@ interactions: x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.13.3 + - 3.13.5 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-CyRKzgODZ9yn3F9OkaXsscLk2Ln3N\",\n \"object\": - \"chat.completion\",\n \"created\": 1768520801,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-D6HWJuvgccP0g7J1qczN7C2Ub2F4X\",\n \"object\": + \"chat.completion\",\n \"created\": 1770389687,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"I now can give a great answer \\nFinal - Answer: Hello! Welcome! I'm so glad to see you here. If you need any assistance - or have any questions, feel free to ask. Have a wonderful day!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 127,\n \"completion_tokens\": 43,\n \"total_tokens\": 170,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \"assistant\",\n \"content\": \"Hello! Welcome! How can I assist you + today? \U0001F60A\",\n \"refusal\": null,\n \"annotations\": + []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 41,\n \"completion_tokens\": + 12,\n \"total_tokens\": 53,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_c4585b5b9c\"\n}\n" + \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" headers: CF-RAY: - CF-RAY-XXX @@ -68,7 +62,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 15 Jan 2026 23:46:42 GMT + - Fri, 06 Feb 2026 14:54:47 GMT Server: - cloudflare Set-Cookie: @@ -85,18 +79,121 @@ interactions: - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '442' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are First Agent. A friendly + greeter\nYour personal goal is: Greet users"},{"role":"user","content":"\nCurrent + Task: Say hello\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive content-length: - - '990' + - '231' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6HWJJH1nOZiFYtdDBQ99RghFi1VT\",\n \"object\": + \"chat.completion\",\n \"created\": 1770389687,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Hello! \U0001F44B How can I assist + you today?\",\n \"refusal\": null,\n \"annotations\": []\n },\n + \ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n + \ \"usage\": {\n \"prompt_tokens\": 41,\n \"completion_tokens\": 11,\n + \ \"total_tokens\": 52,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 14:54:48 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '880' + - '379' openai-project: - OPENAI-PROJECT-XXX openai-version: - '2020-10-01' - x-envoy-upstream-service-time: - - '1160' x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-requests: @@ -118,13 +215,8 @@ interactions: message: OK - request: body: '{"messages":[{"role":"system","content":"You are Second Agent. A polite - farewell agent\nYour personal goal is: Say goodbye\nTo give my best complete - final answer to the task respond using the exact following format:\n\nThought: - I now can give a great answer\nFinal Answer: Your final answer must be the great - and the most complete as possible, it must be outcome described.\n\nI MUST use - these formats, my job depends on it!"},{"role":"user","content":"\nCurrent Task: - Say goodbye\n\nBegin! This is VERY important to you, use the tools available - and give your best Final Answer, your job depends on it!\n\nThought:"}],"model":"gpt-4o-mini"}' + farewell agent\nYour personal goal is: Say goodbye"},{"role":"user","content":"\nCurrent + Task: Say goodbye\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' headers: User-Agent: - X-USER-AGENT-XXX @@ -137,7 +229,7 @@ interactions: connection: - keep-alive content-length: - - '640' + - '239' content-type: - application/json host: @@ -159,27 +251,23 @@ interactions: x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.13.3 + - 3.13.5 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-CyRL1Ua2PkK5xXPp3KeF0AnGAk3JP\",\n \"object\": - \"chat.completion\",\n \"created\": 1768520803,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-D6HWKrdlGlOzRR944Hd5Eai9rykmm\",\n \"object\": + \"chat.completion\",\n \"created\": 1770389688,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"I now can give a great answer \\nFinal - Answer: As we reach the end of our conversation, I want to express my gratitude - for the time we've shared. It's been a pleasure assisting you, and I hope - you found our interaction helpful and enjoyable. Remember, whenever you need - assistance, I'm just a message away. Wishing you all the best in your future - endeavors. Goodbye and take care!\",\n \"refusal\": null,\n \"annotations\": - []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 126,\n \"completion_tokens\": - 79,\n \"total_tokens\": 205,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \"assistant\",\n \"content\": \"Thank you for the time we've shared. + I wish you all the best in your future endeavors. Take care, and goodbye!\",\n + \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": + null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 40,\n \"completion_tokens\": 25,\n \"total_tokens\": 65,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_29330a9688\"\n}\n" + \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" headers: CF-RAY: - CF-RAY-XXX @@ -188,7 +276,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 15 Jan 2026 23:46:44 GMT + - Fri, 06 Feb 2026 14:54:49 GMT Server: - cloudflare Set-Cookie: @@ -205,18 +293,122 @@ interactions: - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '546' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Second Agent. A polite + farewell agent\nYour personal goal is: Say goodbye"},{"role":"user","content":"\nCurrent + Task: Say goodbye\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive content-length: - - '1189' + - '239' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6HWL6iE5TBc1OlsLy2u2vGjzJTMM\",\n \"object\": + \"chat.completion\",\n \"created\": 1770389689,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Thank you for the time we've shared! + It was a pleasure assisting you. If you have any more questions in the future, + don't hesitate to reach out. Wishing you all the best! Goodbye!\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 40,\n \"completion_tokens\": 40,\n \"total_tokens\": 80,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 14:54:50 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '1363' + - '995' openai-project: - OPENAI-PROJECT-XXX openai-version: - '2020-10-01' - x-envoy-upstream-service-time: - - '1605' x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-requests: From dddecba310b29cde4ea8a6e2273eb4e3790cbcc1 Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Fri, 6 Feb 2026 13:09:16 -0500 Subject: [PATCH 4/6] fix: thread-safe state proxies & native routing add thread-safe state proxies and refactor native tool routing. * introduce `LockedListProxy` and `LockedDictProxy` in `flow.py` and update `StateProxy` to return them for list/dict attrs so mutations are protected by the flow lock. * update `AgentExecutor` to use `StateProxy` on flow init, guard the messages setter with the state lock, and return a `StateProxy` from the temp state accessor. * convert `call_llm_native_tools` into a listener (no direct routing return) and add `route_native_tool_result` to route based on state (pending tool calls, final answer, or context error). * minor cleanup in `continue_iteration` to drop orphan listeners on init. * update test cassettes for new native tool call responses, timestamps, and ids. improves concurrency safety for shared state and makes native tool routing explicit. --- .../src/crewai/experimental/agent_executor.py | 49 +- lib/crewai/src/crewai/flow/flow.py | 143 ++- ...est_agent_kickoff_with_platform_tools.yaml | 49 +- ...st_native_tool_calling_error_handling.yaml | 983 ++++++++++++++++++ 4 files changed, 1185 insertions(+), 39 deletions(-) diff --git a/lib/crewai/src/crewai/experimental/agent_executor.py b/lib/crewai/src/crewai/experimental/agent_executor.py index f8ff965aaa..037df67935 100644 --- a/lib/crewai/src/crewai/experimental/agent_executor.py +++ b/lib/crewai/src/crewai/experimental/agent_executor.py @@ -32,7 +32,8 @@ ToolUsageFinishedEvent, ToolUsageStartedEvent, ) -from crewai.flow.flow import Flow, listen, or_, router, start +from crewai.flow.flow import Flow, StateProxy, listen, or_, router, start +from crewai.flow.types import FlowMethodName from crewai.hooks.llm_hooks import ( get_after_llm_call_hooks, get_before_llm_call_hooks, @@ -225,7 +226,11 @@ def messages(self) -> list[LLMMessage]: @messages.setter def messages(self, value: list[LLMMessage]) -> None: """Delegate to state for ExecutorContext conformance.""" - self._state.messages = value + if self._flow_initialized and hasattr(self, "_state_lock"): + with self._state_lock: + self._state.messages = value + else: + self._state.messages = value @property def ask_for_human_input(self) -> bool: @@ -353,6 +358,8 @@ def state(self) -> AgentReActState: Flow initialization is deferred to prevent event emission during agent setup. Returns the temporary state until invoke() is called. """ + if self._flow_initialized and hasattr(self, "_state_lock"): + return StateProxy(self._state, self._state_lock) # type: ignore[return-value] return self._state @property @@ -461,15 +468,14 @@ def call_llm_and_parse(self) -> Literal["parsed", "parser_error", "context_error raise @listen("continue_reasoning_native") - def call_llm_native_tools( - self, - ) -> Literal["native_tool_calls", "native_finished", "context_error"]: + def call_llm_native_tools(self) -> None: """Execute LLM call with native function calling. Always calls the LLM so it can read reflection prompts and decide whether to provide a final answer or request more tools. - Returns routing decision based on whether tool calls or final answer. + Note: This is a listener, not a router. The route_native_tool_result + router fires after this to determine the next step based on state. """ try: # Clear pending tools - LLM will decide what to do next after reading @@ -499,8 +505,7 @@ def call_llm_native_tools( if isinstance(answer, list) and answer and self._is_tool_call_list(answer): # Store tool calls for sequential processing self.state.pending_tool_calls = list(answer) - - return "native_tool_calls" + return # Router will check pending_tool_calls if isinstance(answer, BaseModel): self.state.current_answer = AgentFinish( @@ -510,7 +515,7 @@ def call_llm_native_tools( ) self._invoke_step_callback(self.state.current_answer) self._append_message_to_state(answer.model_dump_json()) - return "native_finished" + return # Router will check current_answer # Text response - this is the final answer if isinstance(answer, str): @@ -521,8 +526,7 @@ def call_llm_native_tools( ) self._invoke_step_callback(self.state.current_answer) self._append_message_to_state(answer) - - return "native_finished" + return # Router will check current_answer # Unexpected response type, treat as final answer self.state.current_answer = AgentFinish( @@ -532,13 +536,12 @@ def call_llm_native_tools( ) self._invoke_step_callback(self.state.current_answer) self._append_message_to_state(str(answer)) - - return "native_finished" + # Router will check current_answer except Exception as e: if is_context_length_exceeded(e): self._last_context_error = e - return "context_error" + return # Router will check _last_context_error if e.__class__.__module__.startswith("litellm"): raise e handle_unknown_error(self._printer, e, verbose=self.agent.verbose) @@ -551,6 +554,22 @@ def route_by_answer_type(self) -> Literal["execute_tool", "agent_finished"]: return "execute_tool" return "agent_finished" + @router(call_llm_native_tools) + def route_native_tool_result( + self, + ) -> Literal["native_tool_calls", "native_finished", "context_error"]: + """Route based on LLM response for native tool calling. + + Checks state set by call_llm_native_tools to determine next step. + This router is needed because only router return values trigger + downstream listeners. + """ + if self._last_context_error is not None: + return "context_error" + if self.state.pending_tool_calls: + return "native_tool_calls" + return "native_finished" + @listen("execute_tool") def execute_tool_action(self) -> Literal["tool_completed", "tool_result_is_final"]: """Execute the tool action and handle the result.""" @@ -911,6 +930,8 @@ def increment_native_and_continue(self) -> Literal["initialized"]: @listen(or_("initialized", "tool_completed", "native_tool_completed")) def continue_iteration(self) -> Literal["check_iteration"]: """Bridge listener that connects iteration loop back to iteration check.""" + if self._flow_initialized: + self._discard_or_listener(FlowMethodName("continue_iteration")) return "check_iteration" @router(or_(initialize_reasoning, continue_iteration)) diff --git a/lib/crewai/src/crewai/flow/flow.py b/lib/crewai/src/crewai/flow/flow.py index de89c190c6..96935e1bd8 100644 --- a/lib/crewai/src/crewai/flow/flow.py +++ b/lib/crewai/src/crewai/flow/flow.py @@ -7,7 +7,14 @@ from __future__ import annotations import asyncio -from collections.abc import Callable, Sequence +from collections.abc import ( + Callable, + ItemsView, + Iterator, + KeysView, + Sequence, + ValuesView, +) from concurrent.futures import Future import copy import inspect @@ -409,6 +416,132 @@ def and_(*conditions: str | FlowCondition | Callable[..., Any]) -> FlowCondition return {"type": AND_CONDITION, "conditions": processed_conditions} +class LockedListProxy(Generic[T]): + """Thread-safe proxy for list operations. + + Wraps a list and uses a lock for all mutating operations. + """ + + def __init__(self, lst: list[T], lock: threading.Lock) -> None: + self._list = lst + self._lock = lock + + def append(self, item: T) -> None: + with self._lock: + self._list.append(item) + + def extend(self, items: list[T]) -> None: + with self._lock: + self._list.extend(items) + + def insert(self, index: int, item: T) -> None: + with self._lock: + self._list.insert(index, item) + + def remove(self, item: T) -> None: + with self._lock: + self._list.remove(item) + + def pop(self, index: int = -1) -> T: + with self._lock: + return self._list.pop(index) + + def clear(self) -> None: + with self._lock: + self._list.clear() + + def __setitem__(self, index: int, value: T) -> None: + with self._lock: + self._list[index] = value + + def __delitem__(self, index: int) -> None: + with self._lock: + del self._list[index] + + def __getitem__(self, index: int) -> T: + return self._list[index] + + def __len__(self) -> int: + return len(self._list) + + def __iter__(self) -> Iterator[T]: + return iter(self._list) + + def __contains__(self, item: object) -> bool: + return item in self._list + + def __repr__(self) -> str: + return repr(self._list) + + def __bool__(self) -> bool: + return bool(self._list) + + +class LockedDictProxy(Generic[T]): + """Thread-safe proxy for dict operations. + + Wraps a dict and uses a lock for all mutating operations. + """ + + def __init__(self, d: dict[str, T], lock: threading.Lock) -> None: + self._dict = d + self._lock = lock + + def __setitem__(self, key: str, value: T) -> None: + with self._lock: + self._dict[key] = value + + def __delitem__(self, key: str) -> None: + with self._lock: + del self._dict[key] + + def pop(self, key: str, *default: T) -> T: + with self._lock: + return self._dict.pop(key, *default) + + def update(self, other: dict[str, T]) -> None: + with self._lock: + self._dict.update(other) + + def clear(self) -> None: + with self._lock: + self._dict.clear() + + def setdefault(self, key: str, default: T) -> T: + with self._lock: + return self._dict.setdefault(key, default) + + def __getitem__(self, key: str) -> T: + return self._dict[key] + + def __len__(self) -> int: + return len(self._dict) + + def __iter__(self) -> Iterator[str]: + return iter(self._dict) + + def __contains__(self, key: object) -> bool: + return key in self._dict + + def keys(self) -> KeysView[str]: + return self._dict.keys() + + def values(self) -> ValuesView[T]: + return self._dict.values() + + def items(self) -> ItemsView[str, T]: + return self._dict.items() + + def get(self, key: str, default: T | None = None) -> T | None: + return self._dict.get(key, default) + + def __repr__(self) -> str: + return repr(self._dict) + + def __bool__(self) -> bool: + return bool(self._dict) + + class StateProxy(Generic[T]): """Proxy that provides thread-safe access to flow state. @@ -423,7 +556,13 @@ def __init__(self, state: T, lock: threading.Lock) -> None: object.__setattr__(self, "_proxy_lock", lock) def __getattr__(self, name: str) -> Any: - return getattr(object.__getattribute__(self, "_proxy_state"), name) + value = getattr(object.__getattribute__(self, "_proxy_state"), name) + lock = object.__getattribute__(self, "_proxy_lock") + if isinstance(value, list): + return LockedListProxy(value, lock) + if isinstance(value, dict): + return LockedDictProxy(value, lock) + return value def __setattr__(self, name: str, value: Any) -> None: if name in ("_proxy_state", "_proxy_lock"): diff --git a/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml b/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml index 9a566393f6..264008db66 100644 --- a/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml +++ b/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml @@ -45,20 +45,19 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6IJbXrD9FB7wORkucCiQt57xTK5F\",\n \"object\": - \"chat.completion\",\n \"created\": 1770392743,\n \"model\": \"gpt-3.5-turbo-0125\",\n + string: "{\n \"id\": \"chatcmpl-D6JzzImfUNXOXfNEzCjQthEIS0RLb\",\n \"object\": + \"chat.completion\",\n \"created\": 1770399215,\n \"model\": \"gpt-3.5-turbo-0125\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_cTkVNC4rVV7Jn1aVXAp7O6HM\",\n \"type\": + \ \"id\": \"call_rYeX6OjYxPtdmI0uam3PllVf\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"create_issue\",\n - \ \"arguments\": \"{\\\"title\\\":\\\"Update Documentation for - Feature X\\\",\\\"body\\\":\\\"The documentation for Feature X is outdated - and needs to be updated to reflect recent changes and improvements.\\\\n\\\\nTest - goal: Test goal\\\"}\"\n }\n }\n ],\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 93,\n \"completion_tokens\": 47,\n \"total_tokens\": 140,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \ \"arguments\": \"{\\\"title\\\":\\\"Test Issue\\\",\\\"body\\\":\\\"This + is a test issue created for testing purposes.\\\"}\"\n }\n }\n + \ ],\n \"refusal\": null,\n \"annotations\": []\n },\n + \ \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n + \ ],\n \"usage\": {\n \"prompt_tokens\": 93,\n \"completion_tokens\": + 28,\n \"total_tokens\": 121,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": null\n}\n" @@ -70,7 +69,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 15:45:43 GMT + - Fri, 06 Feb 2026 17:33:36 GMT Server: - cloudflare Set-Cookie: @@ -90,7 +89,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '2668' + - '1042' openai-project: - OPENAI-PROJECT-XXX openai-version: @@ -162,15 +161,19 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6IJcT2YIUtUErJXw46pMZWwpfsRE\",\n \"object\": - \"chat.completion\",\n \"created\": 1770392744,\n \"model\": \"gpt-3.5-turbo-0125\",\n + string: "{\n \"id\": \"chatcmpl-D6K00aYJBAI3VM9AtFk1jOOmyQWQE\",\n \"object\": + \"chat.completion\",\n \"created\": 1770399216,\n \"model\": \"gpt-3.5-turbo-0125\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Understood! What should be the title - and body of the GitHub issue you want to create?\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 93,\n \"completion_tokens\": 20,\n \"total_tokens\": 113,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n + \ \"id\": \"call_gitvRym4MhYgyn6G7Cfi5tfE\",\n \"type\": + \"function\",\n \"function\": {\n \"name\": \"create_issue\",\n + \ \"arguments\": \"{\\\"title\\\":\\\"Test issue\\\",\\\"body\\\":\\\"This + is a test issue created for testing purposes.\\\"}\"\n }\n }\n + \ ],\n \"refusal\": null,\n \"annotations\": []\n },\n + \ \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n + \ ],\n \"usage\": {\n \"prompt_tokens\": 93,\n \"completion_tokens\": + 28,\n \"total_tokens\": 121,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": null\n}\n" @@ -182,7 +185,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 15:45:44 GMT + - Fri, 06 Feb 2026 17:33:37 GMT Server: - cloudflare Strict-Transport-Security: @@ -200,7 +203,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '805' + - '782' openai-project: - OPENAI-PROJECT-XXX openai-version: diff --git a/lib/crewai/tests/cassettes/agents/test_native_tool_calling_error_handling.yaml b/lib/crewai/tests/cassettes/agents/test_native_tool_calling_error_handling.yaml index f56e36c048..471fd3f087 100644 --- a/lib/crewai/tests/cassettes/agents/test_native_tool_calling_error_handling.yaml +++ b/lib/crewai/tests/cassettes/agents/test_native_tool_calling_error_handling.yaml @@ -226,4 +226,987 @@ interactions: status: code: 200 message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate + things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent + Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error + executing tool: This tool always fails"},{"role":"assistant","content":"Error: + This tool always fails."}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This + tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '842' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6K5UyfOvOaQm57DIdmTllgWkTKxB\",\n \"object\": + \"chat.completion\",\n \"created\": 1770399556,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"It seems that I'm unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 104,\n \"completion_tokens\": 36,\n \"total_tokens\": 140,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 17:39:17 GMT + Server: + - cloudflare + Set-Cookie: + - SET-COOKIE-XXX + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '826' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate + things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent + Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error + executing tool: This tool always fails"},{"role":"assistant","content":"Error: + This tool always fails."},{"role":"assistant","content":"It seems that I''m + unable to use the failing tool because it always results in an error. If you + have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This + tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '1234' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6K5VluoHbHd63gPzPelwvdkuXFDJ\",\n \"object\": + \"chat.completion\",\n \"created\": 1770399557,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"It seems that I'm unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 182,\n \"completion_tokens\": 36,\n \"total_tokens\": 218,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 17:39:18 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '807' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate + things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent + Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error + executing tool: This tool always fails"},{"role":"assistant","content":"Error: + This tool always fails."},{"role":"assistant","content":"It seems that I''m + unable to use the failing tool because it always results in an error. If you + have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This + tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '1626' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6K5WHyQKBRK6vWmna2XtA0z830Hu\",\n \"object\": + \"chat.completion\",\n \"created\": 1770399558,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"It seems that I'm unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 260,\n \"completion_tokens\": 36,\n \"total_tokens\": 296,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 17:39:19 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '914' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate + things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent + Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error + executing tool: This tool always fails"},{"role":"assistant","content":"Error: + This tool always fails."},{"role":"assistant","content":"It seems that I''m + unable to use the failing tool because it always results in an error. If you + have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This + tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '2018' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6K5XTHUnUPeAOA7iWMOWVV2qeipM\",\n \"object\": + \"chat.completion\",\n \"created\": 1770399559,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"It seems that I'm unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 338,\n \"completion_tokens\": 36,\n \"total_tokens\": 374,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 17:39:20 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '1021' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate + things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent + Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error + executing tool: This tool always fails"},{"role":"assistant","content":"Error: + This tool always fails."},{"role":"assistant","content":"It seems that I''m + unable to use the failing tool because it always results in an error. If you + have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This + tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '1626' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6K5qCfXTLlXzgadt12TzvVW0qVKs\",\n \"object\": + \"chat.completion\",\n \"created\": 1770399578,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"It seems that I'm unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 260,\n \"completion_tokens\": 36,\n \"total_tokens\": 296,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 17:39:39 GMT + Server: + - cloudflare + Set-Cookie: + - SET-COOKIE-XXX + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '885' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate + things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent + Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error + executing tool: This tool always fails"},{"role":"assistant","content":"Error: + This tool always fails."},{"role":"assistant","content":"It seems that I''m + unable to use the failing tool because it always results in an error. If you + have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This + tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '2018' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6K5rOH2IQ2zXjArqMl34AafyJfZP\",\n \"object\": + \"chat.completion\",\n \"created\": 1770399579,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"It seems that I'm unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 338,\n \"completion_tokens\": 36,\n \"total_tokens\": 374,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 17:39:40 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '830' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate + things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent + Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error + executing tool: This tool always fails"},{"role":"assistant","content":"Error: + This tool always fails."},{"role":"assistant","content":"It seems that I''m + unable to use the failing tool because it always results in an error. If you + have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This + tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '2018' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6K7K5ivzGwNbzu1mLLD7EYYQHmg4\",\n \"object\": + \"chat.completion\",\n \"created\": 1770399670,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"It seems that I'm unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 338,\n \"completion_tokens\": 36,\n \"total_tokens\": 374,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 17:41:11 GMT + Server: + - cloudflare + Set-Cookie: + - SET-COOKIE-XXX + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '712' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate + things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent + Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error + executing tool: This tool always fails"},{"role":"assistant","content":"Error: + This tool always fails."},{"role":"assistant","content":"It seems that I''m + unable to use the failing tool because it always results in an error. If you + have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It + seems that I''m unable to use the failing tool because it always results in + an error. If you have another task or calculation in mind, feel free to let + me know!"},{"role":"assistant","content":"It seems that I''m unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This + tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '2214' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6K8a3FFLW2WM6nkRaOpCQUpzhQXg\",\n \"object\": + \"chat.completion\",\n \"created\": 1770399748,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"It seems that I'm unable to use the + failing tool because it always results in an error. If you have another task + or calculation in mind, feel free to let me know!\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 377,\n \"completion_tokens\": 36,\n \"total_tokens\": 413,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 17:42:29 GMT + Server: + - cloudflare + Set-Cookie: + - SET-COOKIE-XXX + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '861' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK version: 1 From ba5302bed1d1c25504ef552724487178b239bc99 Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Fri, 6 Feb 2026 13:26:11 -0500 Subject: [PATCH 5/6] chore: regen cassettes --- .../test_guardrail_reached_attempt_limit.yaml | 556 +++++++++++------- .../test_lite_agent_inside_flow_sync.yaml | 141 ++++- ...est_lite_agent_standalone_still_works.yaml | 141 ++++- ..._kickoff_structured_output_with_tools.yaml | 120 +++- ...ckoff_structured_output_without_tools.yaml | 136 ++++- 5 files changed, 822 insertions(+), 272 deletions(-) diff --git a/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml b/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml index 8ee13d70cc..be521eeb85 100644 --- a/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml +++ b/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml @@ -44,48 +44,43 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6HVKLlq7AM6aadjN9eEyY3GcXGL6\",\n \"object\": - \"chat.completion\",\n \"created\": 1770389626,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + string: "{\n \"id\": \"chatcmpl-D6KlehBgjx5pSRz4ISVlWQhIPYSZI\",\n \"object\": + \"chat.completion\",\n \"created\": 1770402170,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Certainly! Here is a structured list of the top 10 best soccer players in the world as of 2024, based on recent - performances, awards, skills, and impact in major leagues and tournaments:\\n\\n### - Top 10 Best Soccer Players in the World (2024)\\n\\n| Rank | Player Name | - Nationality | Current Club | Position | Key Achievements - (Recent) |\\n|-------|--------------------|-----------------|---------------------|-----------------|--------------------------------------------------------|\\n| - 1 | Kylian Mbapp\xE9 | French | Paris Saint-Germain | Forward - \ | 2022 World Cup winner, multiple Ligue 1 titles, exceptional goal-scoring - record |\\n| 2 | Erling Haaland | Norwegian | Manchester City - \ | Striker | Premier League top scorer, UEFA Champions League - top scorer 2022-23 season |\\n| 3 | Lionel Messi | Argentine - \ | Inter Miami | Forward/Playmaker| 2022 World Cup winner, multiple - Ballon d\u2019Or awards, La Liga & MLS titles |\\n| 4 | Kevin De - Bruyne | Belgian | Manchester City | Midfielder | Premier - League multiple titles, pivotal playmaker, consistent top assister |\\n| - 5 | Robert Lewandowski | Polish | FC Barcelona | Striker - \ | La Liga top scorer, multiple Bundesliga Golden Boots, consistent - goal scorer |\\n| 6 | Neymar Jr | Brazilian | Al Hilal - \ | Forward | World Cup quarterfinalist, Copa Libertadores - & Champions League winner |\\n| 7 | Virgil van Dijk | Dutch - \ | Liverpool | Defender | Premier League winner, - UEFA Champions League winner, defensive leader |\\n| 8 | Mohamed - Salah | Egyptian | Liverpool | Forward/Winger | Multiple - Premier League Golden Boots, Champions League winner |\\n| - 9 | Thibaut Courtois | Belgian | Real Madrid | Goalkeeper - \ | Multiple UEFA Champions League titles, La Liga titles, known for crucial - saves |\\n| 10 | Jude Bellingham | English | Real Madrid | - Midfielder | Emerging star, key player in Bundesliga & La Liga, creative - and dynamic playmaker |\\n\\n### Notes:\\n- The ranking combines individual - skills, recent achievements (2022-2024 period), influence on matches and teams, - and global reputation.\\n- Players like Lionel Messi and Kylian Mbapp\xE9 - continue to be prominent despite changing teams.\\n- Rising stars such as - Jude Bellingham show great promise and are quickly climbing the ranks.\\n- - Positions and roles are varied to reflect different contributions on the field.\\n\\nIf - you'd like, I can also provide a deeper analysis of each player or focus on - other criteria like defensive players or young talents.\",\n \"refusal\": + performances, achievements, and overall skill level:\\n\\n### Top 10 Best + Soccer Players in the World (2024)\\n\\n1. **Kylian Mbapp\xE9** \\n - Nationality: + French \\n - Club: Paris Saint-Germain (PSG) \\n - Highlights: Exceptional + speed, dribbling, and goal-scoring ability; multiple Ligue 1 titles; 2018 + World Cup winner.\\n\\n2. **Erling Haaland** \\n - Nationality: Norwegian + \ \\n - Club: Manchester City \\n - Highlights: Prolific goal scorer; + Champions League winner; multiple Golden Boot awards.\\n\\n3. **Lionel Messi** + \ \\n - Nationality: Argentine \\n - Club: Inter Miami / PSG \\n - + Highlights: 7 Ballon d\u2019Or titles; 2022 World Cup winner; exceptional + vision and playmaking.\\n\\n4. **Kevin De Bruyne** \\n - Nationality: Belgian + \ \\n - Club: Manchester City \\n - Highlights: Elite midfielder known + for assists, passing accuracy, and game vision; multiple Premier League titles.\\n\\n5. + **Vin\xEDcius J\xFAnior** \\n - Nationality: Brazilian \\n - Club: Real + Madrid \\n - Highlights: Explosive winger with excellent dribbling; key + player in Real Madrid\u2019s La Liga and Champions League successes.\\n\\n6. + **Karim Benzema** \\n - Nationality: French \\n - Club: Al-Ittihad \\n + \ - Highlights: Ballon d\u2019Or 2022 winner; prolific striker with a great + eye for goal; Real Madrid legend.\\n\\n7. **Mohamed Salah** \\n - Nationality: + Egyptian \\n - Club: Liverpool \\n - Highlights: Consistent Premier + League top scorer; known for pace, finishing, and work rate.\\n\\n8. **Robert + Lewandowski** \\n - Nationality: Polish \\n - Club: FC Barcelona \\n + \ - Highlights: One of the best strikers of his generation; multiple Bundesliga + top scorer awards.\\n\\n9. **Neymar Jr.** \\n - Nationality: Brazilian + \ \\n - Club: Al-Hilal \\n - Highlights: Exceptional dribbler and playmaker; + former PSG star; influential in Brazil\u2019s national team.\\n\\n10. **Thibaut + Courtois** \\n - Nationality: Belgian \\n - Club: Real Madrid \\n + \ - Highlights: One of the best goalkeepers globally; key in Real Madrid\u2019s + major trophy wins including Champions League.\\n\\n---\\n\\nIf you need detailed + stats or specific rankings by position, let me know!\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 68,\n \"completion_tokens\": 579,\n \"total_tokens\": 647,\n \"prompt_tokens_details\": + 68,\n \"completion_tokens\": 546,\n \"total_tokens\": 614,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": @@ -98,7 +93,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 14:53:57 GMT + - Fri, 06 Feb 2026 18:22:58 GMT Server: - cloudflare Set-Cookie: @@ -118,7 +113,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '11341' + - '8052' openai-project: - OPENAI-PROJECT-XXX openai-version: @@ -189,51 +184,55 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6HVVtt46NRCvFl3RKIorS6YjF0N4\",\n \"object\": - \"chat.completion\",\n \"created\": 1770389637,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + string: "{\n \"id\": \"chatcmpl-D6KlmtUgqLSoxCnGjBxjaPlCPcFMv\",\n \"object\": + \"chat.completion\",\n \"created\": 1770402178,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Certainly! Here is a list of the top - 10 best soccer players in the world as of 2024, based on recent performances, - skills, achievements, and overall impact on the game:\\n\\n### Top 10 Best - Soccer Players in the World (2024)\\n\\n1. **Kylian Mbapp\xE9** (France, Paris - Saint-Germain)\\n - Position: Forward\\n - Key Attributes: Speed, dribbling, - goal-scoring ability\\n - Recent Highlights: Leading goal scorer in Ligue - 1, key player for France national team\\n\\n2. **Erling Haaland** (Norway, - Manchester City)\\n - Position: Striker\\n - Key Attributes: Physicality, - finishing, positioning\\n - Recent Highlights: Premier League top scorer, - instrumental in Manchester City's attacking line\\n\\n3. **Lionel Messi** - (Argentina, Inter Miami)\\n - Position: Forward\\n - Key Attributes: Vision, - passing, creativity\\n - Recent Highlights: Continued performance excellence, - influential in both club and national team\\n\\n4. **Kevin De Bruyne** (Belgium, - Manchester City)\\n - Position: Midfielder\\n - Key Attributes: Passing - accuracy, vision, leadership\\n - Recent Highlights: Playmaker behind Manchester - City's successes, consistent elite performance\\n\\n5. **Mohamed Salah** (Egypt, - Liverpool)\\n - Position: Winger\\n - Key Attributes: Pace, dribbling, - goal-scoring\\n - Recent Highlights: Key attacker for Liverpool, strong - performances in the Premier League and UEFA competitions\\n\\n6. **Karim Benzema** - (France, Al-Ittihad)\\n - Position: Striker\\n - Key Attributes: Technical - skills, finishing, experience\\n - Recent Highlights: Successful stint in - Saudi Pro League, former Ballon d'Or winner\\n\\n7. **Robert Lewandowski** - (Poland, Barcelona)\\n - Position: Striker\\n - Key Attributes: Finishing, - positioning, consistency\\n - Recent Highlights: Reliable goal scorer for - Barcelona and Poland\\n\\n8. **Vin\xEDcius J\xFAnior** (Brazil, Real Madrid)\\n - \ - Position: Winger\\n - Key Attributes: Dribbling, pace, creativity\\n - \ - Recent Highlights: Rising star, vital for Real Madrid in domestic and - European competitions\\n\\n9. **Jude Bellingham** (England, Real Madrid)\\n - \ - Position: Midfielder\\n - Key Attributes: Box-to-box ability, tackling, - vision\\n - Recent Highlights: Young talent with remarkable impact at club - and international level\\n\\n10. **Thibaut Courtois** (Belgium, Real Madrid)\\n - \ - Position: Goalkeeper\\n - Key Attributes: Shot-stopping, command - of area, reflexes\\n - Recent Highlights: Considered one of the best goalkeepers - globally, crucial for Real Madrid's defensive strength\\n\\n### Notes:\\n- - The ranking can vary based on different criteria such as individual awards, - statistics, and team success.\\n- Emerging talents and consistent veterans - are both considered.\\n- Positions span across forward, midfield, defense, - and goalkeeper to account for overall game impact.\\n\\nWould you like more - detailed profiles or statistics on any specific players?\",\n \"refusal\": + \"assistant\",\n \"content\": \"Certainly! Here is a structured list + of the top 10 best soccer players in the world as of 2024, based on recent + performances, skills, influence, and achievements:\\n\\n### Top 10 Best Soccer + Players in the World (2024)\\n\\n1. **Erling Haaland**\\n - Position: Striker\\n + \ - Club: Manchester City\\n - Nationality: Norwegian\\n - Key Attributes: + Exceptional goal-scoring ability, physical strength, pace, and positioning.\\n + \ - Notable Achievements: Premier League Golden Boot, Champions League top + scorer.\\n\\n2. **Kylian Mbapp\xE9**\\n - Position: Forward\\n - Club: + Paris Saint-Germain\\n - Nationality: French\\n - Key Attributes: Speed, + dribbling, finishing, and creativity.\\n - Notable Achievements: World Cup + winner (2018), multiple Ligue 1 titles.\\n\\n3. **Lionel Messi**\\n - Position: + Forward\\n - Club: Inter Miami (previously PSG)\\n - Nationality: Argentine\\n + \ - Key Attributes: Dribbling, vision, passing, and free-kicks.\\n - Notable + Achievements: Multiple Ballon d'Ors, Copa America winner, World Cup winner + (2022).\\n\\n4. **Kevin De Bruyne**\\n - Position: Midfielder\\n - Club: + Manchester City\\n - Nationality: Belgian\\n - Key Attributes: Playmaking, + passing range, vision, and work rate.\\n - Notable Achievements: PFA Player + of the Year, multiple Premier League titles.\\n\\n5. **Karim Benzema**\\n + \ - Position: Striker\\n - Club: Al-Ittihad (previously Real Madrid)\\n + \ - Nationality: French\\n - Key Attributes: Technical skills, finishing, + link-up play.\\n - Notable Achievements: Ballon d'Or 2022, multiple Champions + League titles.\\n\\n6. **Neymar Jr.**\\n - Position: Forward\\n - Club: + Al-Hilal\\n - Nationality: Brazilian\\n - Key Attributes: Dribbling, creativity, + flair.\\n - Notable Achievements: Copa Libertadores winner, multiple domestic + titles.\\n\\n7. **Mohamed Salah**\\n - Position: Forward\\n - Club: Liverpool\\n + \ - Nationality: Egyptian\\n - Key Attributes: Pace, finishing, work ethic.\\n + \ - Notable Achievements: Premier League Golden Boots, Champions League winner.\\n\\n8. + **Vin\xEDcius J\xFAnior**\\n - Position: Winger\\n - Club: Real Madrid\\n + \ - Nationality: Brazilian\\n - Key Attributes: Dribbling, speed, goal + contribution.\\n - Notable Achievements: Champions League winner, pivotal + player for Real Madrid.\\n\\n9. **Jude Bellingham**\\n - Position: Midfielder\\n + \ - Club: Real Madrid\\n - Nationality: English\\n - Key Attributes: + Versatility, stamina, passing, tactical intelligence.\\n - Notable Achievements: + World Cup standout, emerging as a top midfielder.\\n\\n10. **Thibaut Courtois**\\n + \ - Position: Goalkeeper\\n - Club: Real Madrid\\n - Nationality: + Belgian\\n - Key Attributes: Shot-stopping, positioning, consistency.\\n + \ - Notable Achievements: World Cup Golden Glove (2022), multiple Champions + League titles.\\n\\n---\\n\\n### Summary:\\nThese players represent a blend + of established superstars and emerging talents who have significantly impacted + both club and international football recently. Their skills span attacking + prowess, midfield creativity, and defensive reliability, highlighting the + varied roles vital in modern soccer.\\n\\nIf you want detailed stats, recent + season performances, or historical comparisons, feel free to ask!\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 68,\n \"completion_tokens\": 647,\n \"total_tokens\": 715,\n \"prompt_tokens_details\": + 68,\n \"completion_tokens\": 760,\n \"total_tokens\": 828,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": @@ -246,7 +245,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 14:54:11 GMT + - Fri, 06 Feb 2026 18:23:11 GMT Server: - cloudflare Strict-Transport-Security: @@ -264,7 +263,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '13664' + - '12766' openai-project: - OPENAI-PROJECT-XXX openai-version: @@ -335,51 +334,48 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6HVj7ehAepZw6ifhetJ366keiloR\",\n \"object\": - \"chat.completion\",\n \"created\": 1770389651,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + string: "{\n \"id\": \"chatcmpl-D6KlzL6DxYoxY77iP35wBK11ZpK0r\",\n \"object\": + \"chat.completion\",\n \"created\": 1770402191,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Certainly! Here's a comprehensive list - of the top 10 best soccer players in the world as of 2024. The ranking is - based on recent performances, individual skills, achievements, influence on - the game, and consistency:\\n\\n### Top 10 Best Soccer Players in the World - (2024)\\n\\n1. **Kylian Mbapp\xE9** \\n - Nationality: French \\n - - Position: Forward \\n - Key Highlights: Multiple Ligue 1 Golden Boot winner, - World Cup champion, known for explosive speed and clinical finishing.\\n\\n2. - **Erling Haaland** \\n - Nationality: Norwegian \\n - Position: Striker - \ \\n - Key Highlights: Premier League top scorer, prolific goal scorer - with physical presence, remarkable goal conversion rate.\\n\\n3. **Lionel - Messi** \\n - Nationality: Argentine \\n - Position: Forward/Playmaker - \ \\n - Key Highlights: Multiple Ballon d'Or winner, 2022 World Cup winner, - incredible dribbling, vision, and playmaking abilities.\\n\\n4. **Kevin De - Bruyne** \\n - Nationality: Belgian \\n - Position: Midfielder \\n - \ - Key Highlights: Premier League Playmaker of the Year, exceptional passing, - vision and leadership in midfield.\\n\\n5. **Karim Benzema** \\n - Nationality: - French \\n - Position: Striker \\n - Key Highlights: 2022 Ballon d'Or - winner, key player for Real Madrid with great technical and finishing skills.\\n\\n6. - **Robert Lewandowski** \\n - Nationality: Polish \\n - Position: Striker - \ \\n - Key Highlights: Consistent goal scorer, excellent positioning and - finishing, key figure in Bayern Munich and Barcelona.\\n\\n7. **Vin\xEDcius - J\xFAnior** \\n - Nationality: Brazilian \\n - Position: Winger \\n - \ - Key Highlights: Emerging star with great dribbling, pace, and creativity; - crucial in Real Madrid\u2019s offense.\\n\\n8. **Mohamed Salah** \\n - - Nationality: Egyptian \\n - Position: Winger/Forward \\n - Key Highlights: - Premier League top scorer multiple times, fast and skillful winger with an - eye for goals.\\n\\n9. **Jude Bellingham** \\n - Nationality: English \\n - \ - Position: Midfielder \\n - Key Highlights: Young versatile midfielder, - exceptional work rate, passing, and leadership for Real Madrid.\\n\\n10. **Thibaut - Courtois** \\n - Nationality: Belgian \\n - Position: Goalkeeper \\n - \ - Key Highlights: Among the best goalkeepers globally, known for shot-stopping - abilities and crucial saves, key in Real Madrid\u2019s defense.\\n\\n---\\n\\n### - Summary:\\n- The list balances goal scorers, playmakers, and key defensive - players.\\n- Includes a blend of proven veterans and emerging talents.\\n- - Reflects performances in major leagues, international tournaments, and club - competitions.\\n\\nIf you want, I can provide a detailed profile on any of - these players or a different selection based on specific criteria like position - or league.\",\n \"refusal\": null,\n \"annotations\": []\n },\n - \ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n - \ \"usage\": {\n \"prompt_tokens\": 68,\n \"completion_tokens\": 616,\n - \ \"total_tokens\": 684,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \"assistant\",\n \"content\": \"Certainly! As of mid-2024, here is + a structured list of the top 10 best soccer players in the world, based on + recent performances, accolades, and overall impact on the sport:\\n\\n1. **Kylian + Mbapp\xE9** \\n - Nationality: French \\n - Club: Paris Saint-Germain + (PSG) \\n - Position: Forward \\n - Highlights: Known for his incredible + speed, dribbling, and goal-scoring ability. Key player for both PSG and the + French national team.\\n\\n2. **Erling Haaland** \\n - Nationality: Norwegian + \ \\n - Club: Manchester City \\n - Position: Striker \\n - Highlights: + Outstanding goal-scoring record, physical presence, and finishing skills. + Dominant in both the Premier League and Champions League.\\n\\n3. **Lionel + Messi** \\n - Nationality: Argentine \\n - Club: Inter Miami (MLS) \\n + \ - Position: Forward/Playmaker \\n - Highlights: Legendary career with + multiple Ballon d'Or awards, exceptional vision, dribbling, and creativity.\\n\\n4. + **Kevin De Bruyne** \\n - Nationality: Belgian \\n - Club: Manchester + City \\n - Position: Midfielder \\n - Highlights: Renowned for his passing + accuracy, vision, and ability to control the midfield.\\n\\n5. **Karim Benzema** + \ \\n - Nationality: French \\n - Club: Al-Ittihad \\n - Position: + Striker \\n - Highlights: Proven goal scorer with excellent link-up play + and leadership qualities.\\n\\n6. **Mohamed Salah** \\n - Nationality: + Egyptian \\n - Club: Liverpool \\n - Position: Winger \\n - Highlights: + Consistently among the top scorers in the Premier League, known for pace and + finishing.\\n\\n7. **Vin\xEDcius J\xFAnior** \\n - Nationality: Brazilian + \ \\n - Club: Real Madrid \\n - Position: Winger \\n - Highlights: + Rising star with impressive dribbling, creativity, and goal contributions.\\n\\n8. + **Jude Bellingham** \\n - Nationality: English \\n - Club: Real Madrid + \ \\n - Position: Midfielder \\n - Highlights: Young but highly influential, + combines physicality with technical skill.\\n\\n9. **Neymar Jr.** \\n - + Nationality: Brazilian \\n - Club: Al-Hilal \\n - Position: Forward + \ \\n - Highlights: Exceptional dribbler, playmaker, and goal contributor, + experienced at the highest level.\\n\\n10. **Thibaut Courtois** \\n - + Nationality: Belgian \\n - Club: Real Madrid \\n - Position: Goalkeeper + \ \\n - Highlights: Considered one of the best goalkeepers currently, consistently + performs in crucial matches.\\n\\nThis list reflects a mix of attacking prowess, + creative midfielders, and a top goalkeeper to represent different roles essential + for a balanced evaluation of the best players globally.\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 68,\n \"completion_tokens\": 606,\n \"total_tokens\": 674,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" @@ -391,7 +387,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 14:54:24 GMT + - Fri, 06 Feb 2026 18:23:19 GMT Server: - cloudflare Strict-Transport-Security: @@ -409,7 +405,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '12694' + - '8265' openai-project: - OPENAI-PROJECT-XXX openai-version: @@ -480,47 +476,42 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6HVwwi5Ho4QGTHUG2QEEW677oVMn\",\n \"object\": - \"chat.completion\",\n \"created\": 1770389664,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + string: "{\n \"id\": \"chatcmpl-D6Km8T7VvmNRRyEap9W8rEBnemO70\",\n \"object\": + \"chat.completion\",\n \"created\": 1770402200,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Certainly! Here is a list of the top - 10 best soccer players in the world as of 2024, based on recent performances, - skills, influence, and overall impact on the game:\\n\\n1. **Kylian Mbapp\xE9** - \ \\n - Nationality: French \\n - Position: Forward \\n - Key Attributes: - Exceptional speed, dribbling, finishing, and versatility. Leading PSG and - France to numerous victories.\\n\\n2. **Erling Haaland** \\n - Nationality: - Norwegian \\n - Position: Striker \\n - Key Attributes: Incredible goal-scoring - ability, physicality, and positioning. Dominant in the Premier League with - Manchester City.\\n\\n3. **Lionel Messi** \\n - Nationality: Argentine - \ \\n - Position: Forward/Attacking Midfielder \\n - Key Attributes: - Unmatched dribbling, creativity, vision, and goal-scoring record. Continuing - to influence the game with Inter Miami and Argentina.\\n\\n4. **Kevin De Bruyne** - \ \\n - Nationality: Belgian \\n - Position: Midfielder \\n - Key - Attributes: Playmaking, passing accuracy, set-pieces, and leadership for Manchester - City and Belgium.\\n\\n5. **Mohamed Salah** \\n - Nationality: Egyptian - \ \\n - Position: Forward/Winger \\n - Key Attributes: Pace, dribbling, - goal-scoring consistency, and work rate at Liverpool and the Egyptian national - team.\\n\\n6. **Karim Benzema** \\n - Nationality: French \\n - Position: - Forward \\n - Key Attributes: Intelligent positioning, link-up play, and - clinical finishing, having continued strong performances with Al-Ittihad.\\n\\n7. - **Neymar Jr.** \\n - Nationality: Brazilian \\n - Position: Forward/Winger - \ \\n - Key Attributes: Flair, dribbling skill, creativity, and experience, - contributing to Al-Hilal and Brazil\u2019s national team.\\n\\n8. **Robert - Lewandowski** \\n - Nationality: Polish \\n - Position: Striker \\n - \ - Key Attributes: Finishing, positioning, and consistency, now shining - for Barcelona.\\n\\n9. **Vin\xEDcius Jr.** \\n - Nationality: Brazilian - \ \\n - Position: Winger \\n - Key Attributes: Explosiveness, dribbling, - creativity, and goal-scoring with Real Madrid.\\n\\n10. **Jude Bellingham** - \ \\n - Nationality: English \\n - Position: Midfielder \\n - Key - Attributes: Vision, stamina, maturity beyond years, and box-to-box midfield - capabilities at Real Madrid and England.\\n\\nThis list is subjective but - reflects consensus among experts, recent awards, and current form in top leagues - and international competitions. If you'd like, I can provide more detailed - statistics or historical context on any player.\",\n \"refusal\": null,\n - \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": - \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 68,\n \"completion_tokens\": - 571,\n \"total_tokens\": 639,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \"assistant\",\n \"content\": \"Sure! Here is a list of the top 10 + best soccer players in the world as of 2024, based on their recent performances, + skills, impact on the game, and recognition:\\n\\n1. **Kylian Mbapp\xE9** + (Paris Saint-Germain / France) \\n - Known for lightning speed, dribbling + skills, and goal-scoring ability. \\n - Key player for both club and national + team.\\n\\n2. **Erling Haaland** (Manchester City / Norway) \\n - Prolific + goal scorer with incredible physicality and finishing. \\n - Has set records + for goals in multiple competitions.\\n\\n3. **Lionel Messi** (Inter Miami + / Argentina) \\n - Legendary playmaker with extraordinary vision, dribbling, + and scoring. \\n - Continues to influence games at club and international + level.\\n\\n4. **Kevin De Bruyne** (Manchester City / Belgium) \\n - One + of the best midfielders globally for passing, creativity, and leadership. + \ \\n - Often dictates the tempo of matches.\\n\\n5. **Karim Benzema** (Al-Ittihad + / France) \\n - Highly skilled striker known for technical ability and + finishing. \\n - Won the Ballon d\u2019Or in 2022.\\n\\n6. **Robert Lewandowski** + (Barcelona / Poland) \\n - Consistent goal scorer with excellent positioning + and technique. \\n - Vital striker for club and country.\\n\\n7. **Vin\xEDcius + J\xFAnior** (Real Madrid / Brazil) \\n - Explosive winger with great dribbling + and pace. \\n - Key contributor to Real Madrid\u2019s recent successes.\\n\\n8. + **Jude Bellingham** (Real Madrid / England) \\n - Young dynamic midfielder + with superb skills on and off the ball. \\n - Quickly becoming one of the + best in his position.\\n\\n9. **Mohamed Salah** (Liverpool / Egypt) \\n - + Renowned for speed, finishing, and ability to perform in big games. \\n - + Vital player for Liverpool and Egypt.\\n\\n10. **Thibaut Courtois** (Real + Madrid / Belgium) \\n - Regarded as one of the best goalkeepers with crucial + saves and consistency. \\n - Key reason for Real Madrid\u2019s defensive + strength.\\n\\nThese rankings can shift frequently based on form, injuries, + and achievements, but this list reflects the current top performers in world + soccer as of mid-2024. Would you like details on their stats or recent highlights?\",\n + \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": + null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 68,\n \"completion_tokens\": 506,\n \"total_tokens\": 574,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" @@ -532,7 +523,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 14:54:34 GMT + - Fri, 06 Feb 2026 18:23:27 GMT Server: - cloudflare Strict-Transport-Security: @@ -550,7 +541,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '10235' + - '7378' openai-project: - OPENAI-PROJECT-XXX openai-version: @@ -621,46 +612,193 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6HW6NpJUgdxmwrzrNCtC4OjMNSCU\",\n \"object\": - \"chat.completion\",\n \"created\": 1770389674,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + string: "{\n \"id\": \"chatcmpl-D6KmG5tKFDLCDjjq8XQ9fPKcg27Nk\",\n \"object\": + \"chat.completion\",\n \"created\": 1770402208,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Certainly! Here is a list of the top - 10 best soccer players in the world as of 2024, based on their recent performances, - skill levels, and overall impact on the game:\\n\\n1. **Lionel Messi** \\n - \ - Nationality: Argentina \\n - Position: Forward \\n - Club: Inter - Miami CF \\n - Highlights: Multiple Ballon d'Or awards; exceptional dribbling, - vision, and goal-scoring ability; recent success in MLS and Copa America.\\n\\n2. - **Kylian Mbapp\xE9** \\n - Nationality: France \\n - Position: Forward - \ \\n - Club: Paris Saint-Germain \\n - Highlights: Speed, skill, and - finishing; key player for both PSG and the French national team; World Cup - winner.\\n\\n3. **Erling Haaland** \\n - Nationality: Norway \\n - Position: - Striker \\n - Club: Manchester City \\n - Highlights: Prolific goal - scorer with incredible physicality and pace; record-breaking goal tally in - Premier League.\\n\\n4. **Kevin De Bruyne** \\n - Nationality: Belgium - \ \\n - Position: Midfielder \\n - Club: Manchester City \\n - Highlights: - Best midfielder in the world with outstanding passing, vision, and set-piece - delivery.\\n\\n5. **Karim Benzema** \\n - Nationality: France \\n - - Position: Forward \\n - Club: Al-Ittihad \\n - Highlights: Experienced - and versatile striker; Ballon d\u2019Or winner in 2022; exceptional goal-scoring - and playmaking.\\n\\n6. **Robert Lewandowski** \\n - Nationality: Poland - \ \\n - Position: Striker \\n - Club: FC Barcelona \\n - Highlights: - Clinical finisher and leader; consistent top scorer in European leagues.\\n\\n7. - **Neymar Jr.** \\n - Nationality: Brazil \\n - Position: Forward/Winger - \ \\n - Club: Al-Hilal \\n - Highlights: Flair, creativity, and dribbling - skills; significant influence in Brazil\u2019s national team.\\n\\n8. **Mohamed - Salah** \\n - Nationality: Egypt \\n - Position: Forward/Winger \\n - \ - Club: Liverpool \\n - Highlights: Speed, finishing, and consistency; - crucial player for Liverpool and Egypt.\\n\\n9. **Luka Modri\u0107** \\n - \ - Nationality: Croatia \\n - Position: Midfielder \\n - Club: Real - Madrid \\n - Highlights: Veteran playmaker with excellent control, passing, - and tactical awareness.\\n\\n10. **Vin\xEDcius J\xFAnior** \\n - Nationality: - Brazil \\n - Position: Winger \\n - Club: Real Madrid \\n - Highlights: - Explosive pace, dribbling, and growing goal-scoring threat.\\n\\nThese players - are currently regarded as some of the best globally, considering their individual - skills, impact in club and international competitions, and accolades.\",\n + 10 best soccer players in the world as of 2024, based on recent performances, + individual skills, achievements, and overall impact on the game:\\n\\n1. **Lionel + Messi** \\n - Nationality: Argentine \\n - Current Club: Inter Miami + \ \\n - Highlights: Multiple Ballon d'Or awards, led Argentina to 2021 Copa + America and 2022 FIFA World Cup victories, exceptional playmaking and scoring.\\n\\n2. + **Kylian Mbapp\xE9** \\n - Nationality: French \\n - Current Club: Paris + Saint-Germain (PSG) \\n - Highlights: World Cup 2018 winner, known for + incredible speed, dribbling, and goal-scoring ability.\\n\\n3. **Erling Haaland** + \ \\n - Nationality: Norwegian \\n - Current Club: Manchester City \\n + \ - Highlights: Prolific goal scorer in the Premier League and UEFA Champions + League, physical dominance and clinical finishing.\\n\\n4. **Kevin De Bruyne** + \ \\n - Nationality: Belgian \\n - Current Club: Manchester City \\n + \ - Highlights: Elite playmaker with vision, creativity, and passing accuracy, + multiple Premier League titles.\\n\\n5. **Karim Benzema** \\n - Nationality: + French \\n - Current Club: Al-Ittihad \\n - Highlights: 2022 Ballon + d'Or winner, instrumental in Real Madrid's recent successes including multiple + Champions League titles.\\n\\n6. **Mohamed Salah** \\n - Nationality: Egyptian + \ \\n - Current Club: Liverpool \\n - Highlights: Consistent top scorer + in the Premier League, exceptional speed and dribbling, crucial influence + for Liverpool.\\n\\n7. **Robert Lewandowski** \\n - Nationality: Polish + \ \\n - Current Club: FC Barcelona \\n - Highlights: One of the best + strikers worldwide, numerous Bundesliga top scorer awards, great positioning + and finishing.\\n\\n8. **Vin\xEDcius Jr.** \\n - Nationality: Brazilian + \ \\n - Current Club: Real Madrid \\n - Highlights: Outstanding winger + with great pace and dribbling, key player in Real Madrid\u2019s recent successes.\\n\\n9. + **Jude Bellingham** \\n - Nationality: English \\n - Current Club: Real + Madrid \\n - Highlights: Young midfielder with exceptional talent, work + rate, and leadership, rapidly becoming one of the best in his position.\\n\\n10. + **Luka Modri\u0107** \\n - Nationality: Croatian \\n - Current Club: + Real Madrid \\n - Highlights: Veteran playmaker, 2018 Ballon d'Or winner, + known for his vision, passing, and ability to control the midfield.\\n\\nThis + list represents a mix of established legends and rising stars, reflecting + their influence on both club and international stages. Let me know if you + would like detailed statistics or information on additional players!\",\n \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 68,\n \"completion_tokens\": 595,\n \"total_tokens\": 663,\n \"prompt_tokens_details\": + 68,\n \"completion_tokens\": 585,\n \"total_tokens\": 653,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 18:23:37 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '8691' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Sports Analyst. You are + an expert at gathering and organizing information. You carefully collect details + and present them in a structured way.\nYour personal goal is: Gather information + about the best soccer players"},{"role":"user","content":"\nCurrent Task: Top + 10 best players in the world?\n\nProvide your complete response:"}],"model":"gpt-4.1-mini"}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '404' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6KmPP82iFaU3OaLkMu2rytLCxa5m\",\n \"object\": + \"chat.completion\",\n \"created\": 1770402217,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Certainly! Here is a list of the current + top 10 best soccer players in the world as of 2024, considering recent performance, + skill level, achievements, and overall impact on the game:\\n\\n1. **Kylian + Mbapp\xE9** (France / Paris Saint-Germain)\\n - Position: Forward\\n - + Key strengths: Speed, finishing, dribbling, and versatility\\n - Notable + achievements: World Cup winner (2018), multiple Ligue 1 titles, consistent + top scorer\\n\\n2. **Erling Haaland** (Norway / Manchester City)\\n - Position: + Striker\\n - Key strengths: Physicality, goal-scoring instinct, pace\\n + \ - Notable achievements: Premier League Golden Boot, record goal scorer + in several competitions\\n\\n3. **Lionel Messi** (Argentina / Inter Miami)\\n + \ - Position: Forward\\n - Key strengths: Dribbling, vision, passing, free + kicks\\n - Notable achievements: Ballon d'Or winner (7 times), Copa America + winner, multiple La Liga and Champions League titles\\n\\n4. **Kevin De Bruyne** + (Belgium / Manchester City)\\n - Position: Midfielder\\n - Key strengths: + Passing accuracy, vision, crossing, shooting\\n - Notable achievements: + Multiple Premier League titles, several Player of the Season awards\\n\\n5. + **Karim Benzema** (France / Al-Ittihad)\\n - Position: Striker\\n - Key + strengths: Creativity, finishing, positioning\\n - Notable achievements: + Ballon d'Or (2022), Champions League winner, top scorer in La Liga (2021)\\n\\n6. + **Neymar Jr.** (Brazil / Al-Hilal)\\n - Position: Forward\\n - Key strengths: + Dribbling, flair, creativity, passing\\n - Notable achievements: Copa Libertadores + winner, multiple Ligue 1 titles, key Brazil national team player\\n\\n7. **Mohamed + Salah** (Egypt / Liverpool)\\n - Position: Winger\\n - Key strengths: + Pace, dribbling, finishing\\n - Notable achievements: Premier League Golden + Boot, multiple domestic and international titles with Liverpool\\n\\n8. **Robert + Lewandowski** (Poland / Barcelona)\\n - Position: Striker\\n - Key strengths: + Finishing, positioning, consistency\\n - Notable achievements: Multiple + Bundesliga top scorer awards, Champions League performer\\n\\n9. **Virgil + van Dijk** (Netherlands / Liverpool)\\n - Position: Defender\\n - Key + strengths: Strength, aerial ability, leadership\\n - Notable achievements: + UEFA Men's Player of the Year, Premier League title winner\\n\\n10. **Jude + Bellingham** (England / Real Madrid)\\n - Position: Midfielder\\n - + Key strengths: Passing, work rate, versatility, leadership at a young age\\n + \ - Notable achievements: Emerging as one of the world's best midfielders + with standout performances in La Liga and Champions League\\n\\nThese players + are ranked based on a combination of their current form, influence on their + teams, individual skill set, and recent accolades. The list can vary slightly + based on personal opinions and specific criteria, but these players are widely + recognized as the top talents in world soccer today.\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 68,\n \"completion_tokens\": 664,\n \"total_tokens\": 732,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": @@ -673,7 +811,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 14:54:46 GMT + - Fri, 06 Feb 2026 18:23:46 GMT Server: - cloudflare Strict-Transport-Security: @@ -691,7 +829,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '12128' + - '9772' openai-project: - OPENAI-PROJECT-XXX openai-version: diff --git a/lib/crewai/tests/cassettes/agents/test_lite_agent_inside_flow_sync.yaml b/lib/crewai/tests/cassettes/agents/test_lite_agent_inside_flow_sync.yaml index 89749c4902..5a6a027b1b 100644 --- a/lib/crewai/tests/cassettes/agents/test_lite_agent_inside_flow_sync.yaml +++ b/lib/crewai/tests/cassettes/agents/test_lite_agent_inside_flow_sync.yaml @@ -1,14 +1,8 @@ interactions: - request: body: '{"messages":[{"role":"system","content":"You are Test Agent. A helpful - test assistant\nYour personal goal is: Answer questions\nTo give my best complete - final answer to the task respond using the exact following format:\n\nThought: - I now can give a great answer\nFinal Answer: Your final answer must be the great - and the most complete as possible, it must be outcome described.\n\nI MUST use - these formats, my job depends on it!"},{"role":"user","content":"\nCurrent Task: - What is 2+2? Reply with just the number.\n\nBegin! This is VERY important to - you, use the tools available and give your best Final Answer, your job depends - on it!\n\nThought:"}],"model":"gpt-4o-mini"}' + test assistant\nYour personal goal is: Answer questions"},{"role":"user","content":"\nCurrent + Task: What is 2+2? Reply with just the number.\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' headers: User-Agent: - X-USER-AGENT-XXX @@ -21,7 +15,7 @@ interactions: connection: - keep-alive content-length: - - '673' + - '272' content-type: - application/json host: @@ -43,23 +37,22 @@ interactions: x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.13.3 + - 3.13.5 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-Cy7b0HjL79y39EkUcMLrRhPFe3XGj\",\n \"object\": - \"chat.completion\",\n \"created\": 1768444914,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-D6Klbce3kaVKcgvOZBmNromelEFs3\",\n \"object\": + \"chat.completion\",\n \"created\": 1770402167,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"I now can give a great answer \\nFinal - Answer: 4\",\n \"refusal\": null,\n \"annotations\": []\n },\n - \ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n - \ \"usage\": {\n \"prompt_tokens\": 136,\n \"completion_tokens\": 13,\n - \ \"total_tokens\": 149,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + \"assistant\",\n \"content\": \"4\",\n \"refusal\": null,\n + \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": + \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 50,\n \"completion_tokens\": + 1,\n \"total_tokens\": 51,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_8bbc38b4db\"\n}\n" + \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" headers: CF-RAY: - CF-RAY-XXX @@ -68,7 +61,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 15 Jan 2026 02:41:55 GMT + - Fri, 06 Feb 2026 18:22:47 GMT Server: - cloudflare Set-Cookie: @@ -85,18 +78,120 @@ interactions: - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '363' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Test Agent. A helpful + test assistant\nYour personal goal is: Answer questions"},{"role":"user","content":"\nCurrent + Task: What is 2+2? Reply with just the number.\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive content-length: - - '857' + - '272' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6KlbWh0i69jixgiCuQv3ArpU19vT\",\n \"object\": + \"chat.completion\",\n \"created\": 1770402167,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"4\",\n \"refusal\": null,\n + \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": + \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 50,\n \"completion_tokens\": + 1,\n \"total_tokens\": 51,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 18:22:48 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '341' + - '346' openai-project: - OPENAI-PROJECT-XXX openai-version: - '2020-10-01' - x-envoy-upstream-service-time: - - '358' x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-requests: diff --git a/lib/crewai/tests/cassettes/agents/test_lite_agent_standalone_still_works.yaml b/lib/crewai/tests/cassettes/agents/test_lite_agent_standalone_still_works.yaml index 83bec39ce8..43328f5133 100644 --- a/lib/crewai/tests/cassettes/agents/test_lite_agent_standalone_still_works.yaml +++ b/lib/crewai/tests/cassettes/agents/test_lite_agent_standalone_still_works.yaml @@ -1,14 +1,8 @@ interactions: - request: body: '{"messages":[{"role":"system","content":"You are Standalone Agent. A helpful - assistant\nYour personal goal is: Answer questions\nTo give my best complete - final answer to the task respond using the exact following format:\n\nThought: - I now can give a great answer\nFinal Answer: Your final answer must be the great - and the most complete as possible, it must be outcome described.\n\nI MUST use - these formats, my job depends on it!"},{"role":"user","content":"\nCurrent Task: - What is 5+5? Reply with just the number.\n\nBegin! This is VERY important to - you, use the tools available and give your best Final Answer, your job depends - on it!\n\nThought:"}],"model":"gpt-4o-mini"}' + assistant\nYour personal goal is: Answer questions"},{"role":"user","content":"\nCurrent + Task: What is 5+5? Reply with just the number.\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' headers: User-Agent: - X-USER-AGENT-XXX @@ -21,7 +15,7 @@ interactions: connection: - keep-alive content-length: - - '674' + - '273' content-type: - application/json host: @@ -43,23 +37,22 @@ interactions: x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.13.3 + - 3.13.5 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-Cy7azhPwUHQ0p5tdhxSAmLPoE8UgC\",\n \"object\": - \"chat.completion\",\n \"created\": 1768444913,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-D6KlcAeKCY1EOydWn2I1x8D3VwAIF\",\n \"object\": + \"chat.completion\",\n \"created\": 1770402168,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"I now can give a great answer \\nFinal - Answer: 10\",\n \"refusal\": null,\n \"annotations\": []\n },\n - \ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n - \ \"usage\": {\n \"prompt_tokens\": 136,\n \"completion_tokens\": 13,\n - \ \"total_tokens\": 149,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + \"assistant\",\n \"content\": \"10\",\n \"refusal\": null,\n + \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": + \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 50,\n \"completion_tokens\": + 1,\n \"total_tokens\": 51,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_29330a9688\"\n}\n" + \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" headers: CF-RAY: - CF-RAY-XXX @@ -68,7 +61,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 15 Jan 2026 02:41:54 GMT + - Fri, 06 Feb 2026 18:22:48 GMT Server: - cloudflare Set-Cookie: @@ -85,18 +78,120 @@ interactions: - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '251' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"system","content":"You are Standalone Agent. A helpful + assistant\nYour personal goal is: Answer questions"},{"role":"user","content":"\nCurrent + Task: What is 5+5? Reply with just the number.\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive content-length: - - '858' + - '273' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D6KldxqJRrXg3E0K1b7NpVEseRpyB\",\n \"object\": + \"chat.completion\",\n \"created\": 1770402169,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"10\",\n \"refusal\": null,\n + \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": + \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 50,\n \"completion_tokens\": + 1,\n \"total_tokens\": 51,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 18:22:49 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '455' + - '318' openai-project: - OPENAI-PROJECT-XXX openai-version: - '2020-10-01' - x-envoy-upstream-service-time: - - '583' x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-requests: diff --git a/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_with_tools.yaml b/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_with_tools.yaml index 879eea9e6b..6f5bf63541 100644 --- a/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_with_tools.yaml +++ b/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_with_tools.yaml @@ -43,15 +43,15 @@ interactions: x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.13.3 + - 3.13.5 x-stainless-timeout: - NOT_GIVEN method: POST uri: https://api.anthropic.com/v1/messages response: body: - string: '{"model":"claude-3-5-haiku-20241022","id":"msg_0149zKBgM47utdBdrfJjM6YZ","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_011jnBYLgtzXqdmSi7JDyQHj","name":"structured_output","input":{"operation":"Addition","result":42,"explanation":"Adding - 15 and 27 together results in 42"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":573,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":79,"service_tier":"standard"}}' + string: '{"model":"claude-3-5-haiku-20241022","id":"msg_013R86eq5RfpWJvZNQZ9z26F","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01A7hp3h5sE6VHNJkz5zJDVa","name":"structured_output","input":{"operation":"addition","result":42,"explanation":"Calculated + 15 + 27 by adding the two numbers together"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":573,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":81,"service_tier":"standard","inference_geo":"not_available"}}' headers: CF-RAY: - CF-RAY-XXX @@ -62,7 +62,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 30 Jan 2026 18:56:15 GMT + - Fri, 06 Feb 2026 18:22:49 GMT Server: - cloudflare Transfer-Encoding: @@ -88,7 +88,7 @@ interactions: anthropic-ratelimit-requests-remaining: - '3999' anthropic-ratelimit-requests-reset: - - '2026-01-30T18:56:14Z' + - '2026-02-06T18:22:47Z' anthropic-ratelimit-tokens-limit: - ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX anthropic-ratelimit-tokens-remaining: @@ -102,7 +102,115 @@ interactions: strict-transport-security: - STS-XXX x-envoy-upstream-service-time: - - '1473' + - '1772' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":4096,"messages":[{"role":"user","content":"\nCurrent Task: + Calculate 15 + 27 using your add_numbers tool. Report the result."},{"role":"assistant","content":"{\"operation\":\"addition\",\"result\":42,\"explanation\":\"Calculated + 15 + 27 by adding the two numbers together\"}"}],"model":"claude-3-5-haiku-20241022","stop_sequences":["\nObservation:"],"stream":false,"system":"You + are Calculator. You are a calculator assistant that uses tools to compute results.\nYour + personal goal is: Perform calculations using available tools","tool_choice":{"type":"tool","name":"structured_output"},"tools":[{"name":"structured_output","description":"Output + the structured response","input_schema":{"type":"object","description":"Structured + output for calculation results.","title":"CalculationResult","properties":{"operation":{"type":"string","description":"The + mathematical operation performed","title":"Operation"},"result":{"type":"integer","description":"The + result of the calculation","title":"Result"},"explanation":{"type":"string","description":"Brief + explanation of the calculation","title":"Explanation"}},"additionalProperties":false,"required":["operation","result","explanation"]}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + anthropic-version: + - '2023-06-01' + connection: + - keep-alive + content-length: + - '1200' + content-type: + - application/json + host: + - api.anthropic.com + x-api-key: + - X-API-KEY-XXX + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 0.73.0 + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: '{"model":"claude-3-5-haiku-20241022","id":"msg_0133RSRzrjN4wuAA1s3h3Dte","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01P7rTdbBhCFuGMSocabwAAH","name":"structured_output","input":{"operation":"addition","result":42,"explanation":"Calculated + 15 + 27 by adding the two numbers together"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":601,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":81,"service_tier":"standard","inference_geo":"not_available"}}' + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Security-Policy: + - CSP-FILTERED + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 18:22:50 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-organization-id: + - ANTHROPIC-ORGANIZATION-ID-XXX + anthropic-ratelimit-input-tokens-limit: + - ANTHROPIC-RATELIMIT-INPUT-TOKENS-LIMIT-XXX + anthropic-ratelimit-input-tokens-remaining: + - ANTHROPIC-RATELIMIT-INPUT-TOKENS-REMAINING-XXX + anthropic-ratelimit-input-tokens-reset: + - ANTHROPIC-RATELIMIT-INPUT-TOKENS-RESET-XXX + anthropic-ratelimit-output-tokens-limit: + - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-LIMIT-XXX + anthropic-ratelimit-output-tokens-remaining: + - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-REMAINING-XXX + anthropic-ratelimit-output-tokens-reset: + - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-RESET-XXX + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2026-02-06T18:22:49Z' + anthropic-ratelimit-tokens-limit: + - ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX + anthropic-ratelimit-tokens-remaining: + - ANTHROPIC-RATELIMIT-TOKENS-REMAINING-XXX + anthropic-ratelimit-tokens-reset: + - ANTHROPIC-RATELIMIT-TOKENS-RESET-XXX + cf-cache-status: + - DYNAMIC + request-id: + - REQUEST-ID-XXX + strict-transport-security: + - STS-XXX + x-envoy-upstream-service-time: + - '1199' status: code: 200 message: OK diff --git a/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_without_tools.yaml b/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_without_tools.yaml index 02739fef14..105c4f631c 100644 --- a/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_without_tools.yaml +++ b/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_without_tools.yaml @@ -44,21 +44,135 @@ interactions: x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.13.3 + - 3.13.5 x-stainless-timeout: - NOT_GIVEN method: POST uri: https://api.anthropic.com/v1/messages response: body: - string: '{"model":"claude-3-5-haiku-20241022","id":"msg_013iHkpmto99iyH5kDvn8uER","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01Kpda2DzHBqWq9a2FS2Bdw6","name":"structured_output","input":{"topic":"Benefits + string: '{"model":"claude-3-5-haiku-20241022","id":"msg_01EErGsizLmKxQDqPFRsVRZ5","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01KwbRfvGRuUMGdWAZ45cgiy","name":"structured_output","input":{"topic":"Benefits + of Remote Work","key_points":["Increased flexibility in work schedule","Reduced + commuting time and costs","Improved work-life balance","Enhanced productivity + for many employees","Cost savings for employers on office space","Access to + a global talent pool"],"summary":"Remote work offers significant advantages + for both employees and employers, providing greater flexibility, cost savings, + and improved overall work experience by eliminating geographical constraints + and traditional office limitations."}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":589,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":151,"service_tier":"standard","inference_geo":"not_available"}}' + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Security-Policy: + - CSP-FILTERED + Content-Type: + - application/json + Date: + - Fri, 06 Feb 2026 18:22:53 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-organization-id: + - ANTHROPIC-ORGANIZATION-ID-XXX + anthropic-ratelimit-input-tokens-limit: + - ANTHROPIC-RATELIMIT-INPUT-TOKENS-LIMIT-XXX + anthropic-ratelimit-input-tokens-remaining: + - ANTHROPIC-RATELIMIT-INPUT-TOKENS-REMAINING-XXX + anthropic-ratelimit-input-tokens-reset: + - ANTHROPIC-RATELIMIT-INPUT-TOKENS-RESET-XXX + anthropic-ratelimit-output-tokens-limit: + - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-LIMIT-XXX + anthropic-ratelimit-output-tokens-remaining: + - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-REMAINING-XXX + anthropic-ratelimit-output-tokens-reset: + - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-RESET-XXX + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2026-02-06T18:22:50Z' + anthropic-ratelimit-tokens-limit: + - ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX + anthropic-ratelimit-tokens-remaining: + - ANTHROPIC-RATELIMIT-TOKENS-REMAINING-XXX + anthropic-ratelimit-tokens-reset: + - ANTHROPIC-RATELIMIT-TOKENS-RESET-XXX + cf-cache-status: + - DYNAMIC + request-id: + - REQUEST-ID-XXX + strict-transport-security: + - STS-XXX + x-envoy-upstream-service-time: + - '2750' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":4096,"messages":[{"role":"user","content":"\nCurrent Task: + Analyze the benefits of remote work briefly. Keep it concise.\n\nProvide your + complete response:"}],"model":"claude-3-5-haiku-20241022","stop_sequences":["\nObservation:"],"stream":false,"system":"You + are Analyst. You are an expert analyst who provides clear, structured insights.\nYour + personal goal is: Provide structured analysis on topics","tool_choice":{"type":"tool","name":"structured_output"},"tools":[{"name":"structured_output","description":"Output + the structured response","input_schema":{"type":"object","description":"Structured + output for analysis results.","title":"AnalysisResult","properties":{"topic":{"type":"string","description":"The + topic analyzed","title":"Topic"},"key_points":{"type":"array","description":"Key + insights from the analysis","title":"Key Points","items":{"type":"string"}},"summary":{"type":"string","description":"Brief + summary of findings","title":"Summary"}},"additionalProperties":false,"required":["topic","key_points","summary"]}}]}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + anthropic-version: + - '2023-06-01' + connection: + - keep-alive + content-length: + - '1051' + content-type: + - application/json + host: + - api.anthropic.com + x-api-key: + - X-API-KEY-XXX + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 0.73.0 + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.5 + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: '{"model":"claude-3-5-haiku-20241022","id":"msg_01SDJhHqEzHWHEXNjBvRZ5qr","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_016HyadrkUyRQPFTFuMLyZPr","name":"structured_output","input":{"topic":"Benefits of Remote Work","summary":"Remote work offers significant advantages for both - employees and employers, transforming traditional work paradigms by providing - flexibility, increased productivity, and cost savings.","key_points":["Increased - employee flexibility and work-life balance","Reduced commuting time and associated - stress","Cost savings for companies on office infrastructure","Access to a - global talent pool","Higher employee productivity and job satisfaction","Lower - carbon footprint due to reduced travel"]}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":589,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":153,"service_tier":"standard"}}' + employees and employers, transforming traditional work models by providing + flexibility, cost savings, and improved productivity.","key_points":["Increased + employee work-life balance","Reduced commuting time and transportation costs","Greater + flexibility in work scheduling","Lower overhead expenses for companies","Access + to a wider talent pool","Improved employee job satisfaction and retention","Enhanced + productivity through personalized work environments"]}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":589,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":155,"service_tier":"standard","inference_geo":"not_available"}}' headers: CF-RAY: - CF-RAY-XXX @@ -69,7 +183,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 30 Jan 2026 18:56:19 GMT + - Fri, 06 Feb 2026 18:22:56 GMT Server: - cloudflare Transfer-Encoding: @@ -95,7 +209,7 @@ interactions: anthropic-ratelimit-requests-remaining: - '3999' anthropic-ratelimit-requests-reset: - - '2026-01-30T18:56:16Z' + - '2026-02-06T18:22:53Z' anthropic-ratelimit-tokens-limit: - ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX anthropic-ratelimit-tokens-remaining: @@ -109,7 +223,7 @@ interactions: strict-transport-security: - STS-XXX x-envoy-upstream-service-time: - - '3107' + - '2887' status: code: 200 message: OK From 747f9b47e007ea5ad034bfc5fdb498684d6a838d Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Fri, 6 Feb 2026 13:43:13 -0500 Subject: [PATCH 6/6] chore: regen cassettes, remove duplicate listener call path --- lib/crewai/src/crewai/flow/flow.py | 39 - ...est_agent_kickoff_with_platform_tools.yaml | 42 +- .../test_guardrail_reached_attempt_limit.yaml | 683 ++--------- .../test_lite_agent_inside_flow_sync.yaml | 114 +- ...est_lite_agent_standalone_still_works.yaml | 114 +- .../test_multiple_agents_in_same_flow.yaml | 253 +--- ...st_native_tool_calling_error_handling.yaml | 1040 +---------------- ..._kickoff_structured_output_with_tools.yaml | 118 +- ...ckoff_structured_output_without_tools.yaml | 133 +-- 9 files changed, 215 insertions(+), 2321 deletions(-) diff --git a/lib/crewai/src/crewai/flow/flow.py b/lib/crewai/src/crewai/flow/flow.py index 96935e1bd8..5a6ac45578 100644 --- a/lib/crewai/src/crewai/flow/flow.py +++ b/lib/crewai/src/crewai/flow/flow.py @@ -2489,45 +2489,6 @@ async def _execute_single_listener( listener_name, listener_result, finished_event_id ) - # If this listener is also a router (e.g., has @human_feedback with emit), - # we need to trigger listeners for the router result as well - if listener_name in self._routers and listener_result is not None: - router_result_trigger = FlowMethodName(str(listener_result)) - listeners_for_result = self._find_triggered_methods( - router_result_trigger, router_only=False - ) - if listeners_for_result: - # Pass the HumanFeedbackResult if available - feedback_result = ( - self.last_human_feedback - if self.last_human_feedback is not None - else listener_result - ) - racing_group = self._get_racing_group_for_listeners( - listeners_for_result - ) - if racing_group: - racing_members, _ = racing_group - other_listeners = [ - name - for name in listeners_for_result - if name not in racing_members - ] - await self._execute_racing_listeners( - racing_members, - other_listeners, - feedback_result, - finished_event_id, - ) - else: - tasks = [ - self._execute_single_listener( - name, feedback_result, finished_event_id - ) - for name in listeners_for_result - ] - await asyncio.gather(*tasks) - return (listener_result, finished_event_id) except Exception as e: diff --git a/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml b/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml index 264008db66..72c629c70f 100644 --- a/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml +++ b/lib/crewai/tests/cassettes/agents/test_agent_kickoff_with_platform_tools.yaml @@ -45,13 +45,13 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6JzzImfUNXOXfNEzCjQthEIS0RLb\",\n \"object\": - \"chat.completion\",\n \"created\": 1770399215,\n \"model\": \"gpt-3.5-turbo-0125\",\n + string: "{\n \"id\": \"chatcmpl-D6L3fqygkUIZ3bN4wvSpAhdaSk7MF\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403287,\n \"model\": \"gpt-3.5-turbo-0125\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_rYeX6OjYxPtdmI0uam3PllVf\",\n \"type\": + \ \"id\": \"call_RuWuYzjzgRL3byVGhLlPi0rq\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"create_issue\",\n - \ \"arguments\": \"{\\\"title\\\":\\\"Test Issue\\\",\\\"body\\\":\\\"This + \ \"arguments\": \"{\\\"title\\\":\\\"Test issue\\\",\\\"body\\\":\\\"This is a test issue created for testing purposes.\\\"}\"\n }\n }\n \ ],\n \"refusal\": null,\n \"annotations\": []\n },\n \ \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n @@ -69,7 +69,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 17:33:36 GMT + - Fri, 06 Feb 2026 18:41:28 GMT Server: - cloudflare Set-Cookie: @@ -89,7 +89,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '1042' + - '1406' openai-project: - OPENAI-PROJECT-XXX openai-version: @@ -116,7 +116,9 @@ interactions: - request: body: '{"messages":[{"role":"system","content":"You are Test Agent. Test backstory\nYour personal goal is: Test goal"},{"role":"user","content":"\nCurrent Task: Create - a GitHub issue"}],"model":"gpt-3.5-turbo","tool_choice":"auto","tools":[{"type":"function","function":{"name":"create_issue","description":"Create + a GitHub issue"},{"role":"assistant","content":null,"tool_calls":[{"id":"call_RuWuYzjzgRL3byVGhLlPi0rq","type":"function","function":{"name":"create_issue","arguments":"{\"title\":\"Test + issue\",\"body\":\"This is a test issue created for testing purposes.\"}"}}]},{"role":"tool","tool_call_id":"call_RuWuYzjzgRL3byVGhLlPi0rq","name":"create_issue","content":"{\n \"success\": + true,\n \"issue_url\": \"https://github.com/test/repo/issues/1\"\n}"}],"model":"gpt-3.5-turbo","tool_choice":"auto","tools":[{"type":"function","function":{"name":"create_issue","description":"Create a GitHub issue","strict":true,"parameters":{"additionalProperties":false,"properties":{"title":{"description":"Issue title","title":"Title","type":"string"},"body":{"default":null,"description":"Issue body","title":"Body","type":"string"}},"required":["title","body"],"type":"object"}}}]}' @@ -132,7 +134,7 @@ interactions: connection: - keep-alive content-length: - - '596' + - '1028' content-type: - application/json cookie: @@ -161,19 +163,15 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6K00aYJBAI3VM9AtFk1jOOmyQWQE\",\n \"object\": - \"chat.completion\",\n \"created\": 1770399216,\n \"model\": \"gpt-3.5-turbo-0125\",\n + string: "{\n \"id\": \"chatcmpl-D6L3hfuBxk36LIb3ekD1IVwFD5VVL\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403289,\n \"model\": \"gpt-3.5-turbo-0125\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_gitvRym4MhYgyn6G7Cfi5tfE\",\n \"type\": - \"function\",\n \"function\": {\n \"name\": \"create_issue\",\n - \ \"arguments\": \"{\\\"title\\\":\\\"Test issue\\\",\\\"body\\\":\\\"This - is a test issue created for testing purposes.\\\"}\"\n }\n }\n - \ ],\n \"refusal\": null,\n \"annotations\": []\n },\n - \ \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n - \ ],\n \"usage\": {\n \"prompt_tokens\": 93,\n \"completion_tokens\": - 28,\n \"total_tokens\": 121,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \"assistant\",\n \"content\": \"I have successfully created a GitHub + issue for testing purposes. You can view the issue at this URL: [Test issue](https://github.com/test/repo/issues/1)\",\n + \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": + null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 154,\n \"completion_tokens\": 36,\n \"total_tokens\": 190,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": null\n}\n" @@ -185,7 +183,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 17:33:37 GMT + - Fri, 06 Feb 2026 18:41:29 GMT Server: - cloudflare Strict-Transport-Security: @@ -203,7 +201,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '782' + - '888' openai-project: - OPENAI-PROJECT-XXX openai-version: diff --git a/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml b/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml index be521eeb85..fb04df4125 100644 --- a/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml +++ b/lib/crewai/tests/cassettes/agents/test_guardrail_reached_attempt_limit.yaml @@ -44,44 +44,50 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6KlehBgjx5pSRz4ISVlWQhIPYSZI\",\n \"object\": - \"chat.completion\",\n \"created\": 1770402170,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + string: "{\n \"id\": \"chatcmpl-D6L3hzoRVVEa07HZsM9wpi2RVRKQp\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403289,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Certainly! Here is a structured list - of the top 10 best soccer players in the world as of 2024, based on recent - performances, achievements, and overall skill level:\\n\\n### Top 10 Best - Soccer Players in the World (2024)\\n\\n1. **Kylian Mbapp\xE9** \\n - Nationality: - French \\n - Club: Paris Saint-Germain (PSG) \\n - Highlights: Exceptional - speed, dribbling, and goal-scoring ability; multiple Ligue 1 titles; 2018 - World Cup winner.\\n\\n2. **Erling Haaland** \\n - Nationality: Norwegian - \ \\n - Club: Manchester City \\n - Highlights: Prolific goal scorer; - Champions League winner; multiple Golden Boot awards.\\n\\n3. **Lionel Messi** - \ \\n - Nationality: Argentine \\n - Club: Inter Miami / PSG \\n - - Highlights: 7 Ballon d\u2019Or titles; 2022 World Cup winner; exceptional - vision and playmaking.\\n\\n4. **Kevin De Bruyne** \\n - Nationality: Belgian - \ \\n - Club: Manchester City \\n - Highlights: Elite midfielder known - for assists, passing accuracy, and game vision; multiple Premier League titles.\\n\\n5. - **Vin\xEDcius J\xFAnior** \\n - Nationality: Brazilian \\n - Club: Real - Madrid \\n - Highlights: Explosive winger with excellent dribbling; key - player in Real Madrid\u2019s La Liga and Champions League successes.\\n\\n6. - **Karim Benzema** \\n - Nationality: French \\n - Club: Al-Ittihad \\n - \ - Highlights: Ballon d\u2019Or 2022 winner; prolific striker with a great - eye for goal; Real Madrid legend.\\n\\n7. **Mohamed Salah** \\n - Nationality: - Egyptian \\n - Club: Liverpool \\n - Highlights: Consistent Premier - League top scorer; known for pace, finishing, and work rate.\\n\\n8. **Robert + \"assistant\",\n \"content\": \"Here is a structured list of the top + 10 best soccer players in the world as of 2024, based on recent performances, + awards, and overall impact on the game:\\n\\n1. **Kylian Mbapp\xE9** \\n + \ - Nationality: French \\n - Club: Paris Saint-Germain (PSG) \\n - + Position: Forward \\n - Key Highlights: Multiple Ligue 1 titles, World + Cup winner (2018), known for speed, dribbling, and scoring prowess.\\n\\n2. + **Erling Haaland** \\n - Nationality: Norwegian \\n - Club: Manchester + City \\n - Position: Striker \\n - Key Highlights: Premier League Golden + Boot winner, incredible goal-scoring record, physical presence, and finishing + skills.\\n\\n3. **Lionel Messi** \\n - Nationality: Argentine \\n - + Club: Inter Miami \\n - Position: Forward/Attacking Midfielder \\n - + Key Highlights: Seven Ballon d\u2019Or awards, World Cup winner (2022), exceptional + playmaking and dribbling ability.\\n\\n4. **Kevin De Bruyne** \\n - Nationality: + Belgian \\n - Club: Manchester City \\n - Position: Midfielder \\n + \ - Key Highlights: One of the best playmakers globally, assists leader, + consistent high-level performance in the Premier League.\\n\\n5. **Robert Lewandowski** \\n - Nationality: Polish \\n - Club: FC Barcelona \\n - \ - Highlights: One of the best strikers of his generation; multiple Bundesliga - top scorer awards.\\n\\n9. **Neymar Jr.** \\n - Nationality: Brazilian - \ \\n - Club: Al-Hilal \\n - Highlights: Exceptional dribbler and playmaker; - former PSG star; influential in Brazil\u2019s national team.\\n\\n10. **Thibaut - Courtois** \\n - Nationality: Belgian \\n - Club: Real Madrid \\n - \ - Highlights: One of the best goalkeepers globally; key in Real Madrid\u2019s - major trophy wins including Champions League.\\n\\n---\\n\\nIf you need detailed - stats or specific rankings by position, let me know!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 68,\n \"completion_tokens\": 546,\n \"total_tokens\": 614,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \ - Position: Striker \\n - Key Highlights: Exceptional goal-scoring record, + multiple Bundesliga top scorer awards, key figure in Bayern Munich\u2019s + dominance before transferring.\\n\\n6. **Karim Benzema** \\n - Nationality: + French \\n - Club: Al-Ittihad \\n - Position: Striker \\n - Key Highlights: + Ballon d\u2019Or winner (2022), excellent technical skills, leadership at + Real Madrid before recent transfer.\\n\\n7. **Mohamed Salah** \\n - Nationality: + Egyptian \\n - Club: Liverpool \\n - Position: Forward \\n - Key + Highlights: Premier League Golden Boot winner, known for speed, dribbling, + and goal-scoring consistency.\\n\\n8. **Vin\xEDcius J\xFAnior** \\n - Nationality: + Brazilian \\n - Club: Real Madrid \\n - Position: Winger \\n - Key + Highlights: Key player for Real Madrid, exceptional dribbling and pace, rising + star in world football.\\n\\n9. **Jude Bellingham** \\n - Nationality: + English \\n - Club: Real Madrid \\n - Position: Midfielder \\n - + Key Highlights: Young talent with maturity beyond years, influential midfielder + with great vision and work rate.\\n\\n10. **Thibaut Courtois** \\n - Nationality: + Belgian \\n - Club: Real Madrid \\n - Position: Goalkeeper \\n - + Key Highlights: One of the best goalkeepers globally, crucial performances + in La Liga and Champions League.\\n\\nThese rankings consider individual talent, + recent achievements, influence on matches, and overall contribution to club + and country.\",\n \"refusal\": null,\n \"annotations\": []\n + \ },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n + \ ],\n \"usage\": {\n \"prompt_tokens\": 68,\n \"completion_tokens\": + 621,\n \"total_tokens\": 689,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" @@ -93,7 +99,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 18:22:58 GMT + - Fri, 06 Feb 2026 18:41:40 GMT Server: - cloudflare Set-Cookie: @@ -113,157 +119,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '8052' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Sports Analyst. You are - an expert at gathering and organizing information. You carefully collect details - and present them in a structured way.\nYour personal goal is: Gather information - about the best soccer players"},{"role":"user","content":"\nCurrent Task: Top - 10 best players in the world?\n\nProvide your complete response:"}],"model":"gpt-4.1-mini"}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '404' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6KlmtUgqLSoxCnGjBxjaPlCPcFMv\",\n \"object\": - \"chat.completion\",\n \"created\": 1770402178,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Certainly! Here is a structured list - of the top 10 best soccer players in the world as of 2024, based on recent - performances, skills, influence, and achievements:\\n\\n### Top 10 Best Soccer - Players in the World (2024)\\n\\n1. **Erling Haaland**\\n - Position: Striker\\n - \ - Club: Manchester City\\n - Nationality: Norwegian\\n - Key Attributes: - Exceptional goal-scoring ability, physical strength, pace, and positioning.\\n - \ - Notable Achievements: Premier League Golden Boot, Champions League top - scorer.\\n\\n2. **Kylian Mbapp\xE9**\\n - Position: Forward\\n - Club: - Paris Saint-Germain\\n - Nationality: French\\n - Key Attributes: Speed, - dribbling, finishing, and creativity.\\n - Notable Achievements: World Cup - winner (2018), multiple Ligue 1 titles.\\n\\n3. **Lionel Messi**\\n - Position: - Forward\\n - Club: Inter Miami (previously PSG)\\n - Nationality: Argentine\\n - \ - Key Attributes: Dribbling, vision, passing, and free-kicks.\\n - Notable - Achievements: Multiple Ballon d'Ors, Copa America winner, World Cup winner - (2022).\\n\\n4. **Kevin De Bruyne**\\n - Position: Midfielder\\n - Club: - Manchester City\\n - Nationality: Belgian\\n - Key Attributes: Playmaking, - passing range, vision, and work rate.\\n - Notable Achievements: PFA Player - of the Year, multiple Premier League titles.\\n\\n5. **Karim Benzema**\\n - \ - Position: Striker\\n - Club: Al-Ittihad (previously Real Madrid)\\n - \ - Nationality: French\\n - Key Attributes: Technical skills, finishing, - link-up play.\\n - Notable Achievements: Ballon d'Or 2022, multiple Champions - League titles.\\n\\n6. **Neymar Jr.**\\n - Position: Forward\\n - Club: - Al-Hilal\\n - Nationality: Brazilian\\n - Key Attributes: Dribbling, creativity, - flair.\\n - Notable Achievements: Copa Libertadores winner, multiple domestic - titles.\\n\\n7. **Mohamed Salah**\\n - Position: Forward\\n - Club: Liverpool\\n - \ - Nationality: Egyptian\\n - Key Attributes: Pace, finishing, work ethic.\\n - \ - Notable Achievements: Premier League Golden Boots, Champions League winner.\\n\\n8. - **Vin\xEDcius J\xFAnior**\\n - Position: Winger\\n - Club: Real Madrid\\n - \ - Nationality: Brazilian\\n - Key Attributes: Dribbling, speed, goal - contribution.\\n - Notable Achievements: Champions League winner, pivotal - player for Real Madrid.\\n\\n9. **Jude Bellingham**\\n - Position: Midfielder\\n - \ - Club: Real Madrid\\n - Nationality: English\\n - Key Attributes: - Versatility, stamina, passing, tactical intelligence.\\n - Notable Achievements: - World Cup standout, emerging as a top midfielder.\\n\\n10. **Thibaut Courtois**\\n - \ - Position: Goalkeeper\\n - Club: Real Madrid\\n - Nationality: - Belgian\\n - Key Attributes: Shot-stopping, positioning, consistency.\\n - \ - Notable Achievements: World Cup Golden Glove (2022), multiple Champions - League titles.\\n\\n---\\n\\n### Summary:\\nThese players represent a blend - of established superstars and emerging talents who have significantly impacted - both club and international football recently. Their skills span attacking - prowess, midfield creativity, and defensive reliability, highlighting the - varied roles vital in modern soccer.\\n\\nIf you want detailed stats, recent - season performances, or historical comparisons, feel free to ask!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 68,\n \"completion_tokens\": 760,\n \"total_tokens\": 828,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 18:23:11 GMT - Server: - - cloudflare - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '12766' + - '10634' openai-project: - OPENAI-PROJECT-XXX openai-version: @@ -334,48 +190,48 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6KlzL6DxYoxY77iP35wBK11ZpK0r\",\n \"object\": - \"chat.completion\",\n \"created\": 1770402191,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + string: "{\n \"id\": \"chatcmpl-D6L3sn9nSnGGOMKrS88avliVF7XTv\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403300,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Certainly! As of mid-2024, here is - a structured list of the top 10 best soccer players in the world, based on - recent performances, accolades, and overall impact on the sport:\\n\\n1. **Kylian - Mbapp\xE9** \\n - Nationality: French \\n - Club: Paris Saint-Germain - (PSG) \\n - Position: Forward \\n - Highlights: Known for his incredible - speed, dribbling, and goal-scoring ability. Key player for both PSG and the - French national team.\\n\\n2. **Erling Haaland** \\n - Nationality: Norwegian - \ \\n - Club: Manchester City \\n - Position: Striker \\n - Highlights: - Outstanding goal-scoring record, physical presence, and finishing skills. - Dominant in both the Premier League and Champions League.\\n\\n3. **Lionel - Messi** \\n - Nationality: Argentine \\n - Club: Inter Miami (MLS) \\n - \ - Position: Forward/Playmaker \\n - Highlights: Legendary career with - multiple Ballon d'Or awards, exceptional vision, dribbling, and creativity.\\n\\n4. - **Kevin De Bruyne** \\n - Nationality: Belgian \\n - Club: Manchester - City \\n - Position: Midfielder \\n - Highlights: Renowned for his passing - accuracy, vision, and ability to control the midfield.\\n\\n5. **Karim Benzema** - \ \\n - Nationality: French \\n - Club: Al-Ittihad \\n - Position: - Striker \\n - Highlights: Proven goal scorer with excellent link-up play - and leadership qualities.\\n\\n6. **Mohamed Salah** \\n - Nationality: - Egyptian \\n - Club: Liverpool \\n - Position: Winger \\n - Highlights: - Consistently among the top scorers in the Premier League, known for pace and - finishing.\\n\\n7. **Vin\xEDcius J\xFAnior** \\n - Nationality: Brazilian - \ \\n - Club: Real Madrid \\n - Position: Winger \\n - Highlights: - Rising star with impressive dribbling, creativity, and goal contributions.\\n\\n8. - **Jude Bellingham** \\n - Nationality: English \\n - Club: Real Madrid - \ \\n - Position: Midfielder \\n - Highlights: Young but highly influential, - combines physicality with technical skill.\\n\\n9. **Neymar Jr.** \\n - - Nationality: Brazilian \\n - Club: Al-Hilal \\n - Position: Forward - \ \\n - Highlights: Exceptional dribbler, playmaker, and goal contributor, - experienced at the highest level.\\n\\n10. **Thibaut Courtois** \\n - - Nationality: Belgian \\n - Club: Real Madrid \\n - Position: Goalkeeper - \ \\n - Highlights: Considered one of the best goalkeepers currently, consistently - performs in crucial matches.\\n\\nThis list reflects a mix of attacking prowess, - creative midfielders, and a top goalkeeper to represent different roles essential - for a balanced evaluation of the best players globally.\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 68,\n \"completion_tokens\": 606,\n \"total_tokens\": 674,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \"assistant\",\n \"content\": \"Certainly! Here's a structured list + of the top 10 best soccer players in the world as of 2024, considering their + performance, skills, achievements, and impact in recent seasons:\\n\\n### + Top 10 Best Soccer Players in the World (2024)\\n\\n| Rank | Player Name | + Nationality | Club (2023/24 Season) | Position | Key Attributes + \ | Recent Achievements |\\n|-------|---------------------|-------------|----------------------------|------------------|---------------------------------|------------------------------------|\\n| + 1 | Lionel Messi | Argentina | Paris Saint-Germain (PSG) | + Forward/Playmaker| Dribbling, Vision, Free kicks | 2023 World Cup Golden + Ball, Club Successes |\\n| 2 | Kylian Mbapp\xE9 | France | + Paris Saint-Germain (PSG) | Forward | Speed, Finishing, Dribbling + \ | Ligue 1 Top Scorer, World Cup Winner 2018|\\n| 3 | Erling Haaland + \ | Norway | Manchester City | Striker | Strength, + Finishing, Positioning| Premier League Golden Boot, Champions League Impact|\\n| + 4 | Kevin De Bruyne | Belgium | Manchester City | + Midfielder | Passing, Vision, Creativity | Premier League Titles, + Key Playmaker|\\n| 5 | Robert Lewandowski | Poland | FC Barcelona + \ | Striker | Finishing, Positioning, Composure| La + Liga Top Scorer, Consistent Scorer|\\n| 6 | Neymar Jr. | Brazil + \ | Al-Hilal | Forward/Winger | Dribbling, Creativity, + Flair | Copa America Titles, Club Success |\\n| 7 | Mohamed Salah | + Egypt | Liverpool | Forward/Winger | Pace, Finishing, + Work Rate | Premier League Golden Boot, Champions League Winner|\\n| + 8 | Vin\xEDcius Jr. | Brazil | Real Madrid | + Winger | Speed, Dribbling, Crossing | La Liga Titles, UEFA Champions + League Winner|\\n| 9 | Luka Modri\u0107 | Croatia | Real Madrid + \ | Midfielder | Passing, Control, Experience | Ballon + d\u2019Or 2018, Multiple Champions League Titles|\\n| 10 | Karim Benzema + \ | France | Al-Ittihad | Striker | Finishing, + Link-up Play, Movements| Ballon d\u2019Or 2022, UEFA Champions League Top + Scorer |\\n\\n### Notes:\\n- The rankings reflect a combination of individual + skill, recent performance, consistency, and influence on the game.\\n- Players\u2019 + clubs are based on the 2023/24 season affiliations.\\n- Achievements highlight + recent titles, awards, or standout contributions.\\n\\nIf you would like me + to focus on specific leagues, historical players, or emerging talents, just + let me know!\",\n \"refusal\": null,\n \"annotations\": []\n + \ },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n + \ ],\n \"usage\": {\n \"prompt_tokens\": 68,\n \"completion_tokens\": + 605,\n \"total_tokens\": 673,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" @@ -387,7 +243,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 18:23:19 GMT + - Fri, 06 Feb 2026 18:41:49 GMT Server: - cloudflare Strict-Transport-Security: @@ -405,7 +261,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '8265' + - '9044' openai-project: - OPENAI-PROJECT-XXX openai-version: @@ -476,330 +332,47 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6Km8T7VvmNRRyEap9W8rEBnemO70\",\n \"object\": - \"chat.completion\",\n \"created\": 1770402200,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Sure! Here is a list of the top 10 - best soccer players in the world as of 2024, based on their recent performances, - skills, impact on the game, and recognition:\\n\\n1. **Kylian Mbapp\xE9** - (Paris Saint-Germain / France) \\n - Known for lightning speed, dribbling - skills, and goal-scoring ability. \\n - Key player for both club and national - team.\\n\\n2. **Erling Haaland** (Manchester City / Norway) \\n - Prolific - goal scorer with incredible physicality and finishing. \\n - Has set records - for goals in multiple competitions.\\n\\n3. **Lionel Messi** (Inter Miami - / Argentina) \\n - Legendary playmaker with extraordinary vision, dribbling, - and scoring. \\n - Continues to influence games at club and international - level.\\n\\n4. **Kevin De Bruyne** (Manchester City / Belgium) \\n - One - of the best midfielders globally for passing, creativity, and leadership. - \ \\n - Often dictates the tempo of matches.\\n\\n5. **Karim Benzema** (Al-Ittihad - / France) \\n - Highly skilled striker known for technical ability and - finishing. \\n - Won the Ballon d\u2019Or in 2022.\\n\\n6. **Robert Lewandowski** - (Barcelona / Poland) \\n - Consistent goal scorer with excellent positioning - and technique. \\n - Vital striker for club and country.\\n\\n7. **Vin\xEDcius - J\xFAnior** (Real Madrid / Brazil) \\n - Explosive winger with great dribbling - and pace. \\n - Key contributor to Real Madrid\u2019s recent successes.\\n\\n8. - **Jude Bellingham** (Real Madrid / England) \\n - Young dynamic midfielder - with superb skills on and off the ball. \\n - Quickly becoming one of the - best in his position.\\n\\n9. **Mohamed Salah** (Liverpool / Egypt) \\n - - Renowned for speed, finishing, and ability to perform in big games. \\n - - Vital player for Liverpool and Egypt.\\n\\n10. **Thibaut Courtois** (Real - Madrid / Belgium) \\n - Regarded as one of the best goalkeepers with crucial - saves and consistency. \\n - Key reason for Real Madrid\u2019s defensive - strength.\\n\\nThese rankings can shift frequently based on form, injuries, - and achievements, but this list reflects the current top performers in world - soccer as of mid-2024. Would you like details on their stats or recent highlights?\",\n - \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 68,\n \"completion_tokens\": 506,\n \"total_tokens\": 574,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 18:23:27 GMT - Server: - - cloudflare - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '7378' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Sports Analyst. You are - an expert at gathering and organizing information. You carefully collect details - and present them in a structured way.\nYour personal goal is: Gather information - about the best soccer players"},{"role":"user","content":"\nCurrent Task: Top - 10 best players in the world?\n\nProvide your complete response:"}],"model":"gpt-4.1-mini"}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '404' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6KmG5tKFDLCDjjq8XQ9fPKcg27Nk\",\n \"object\": - \"chat.completion\",\n \"created\": 1770402208,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n + string: "{\n \"id\": \"chatcmpl-D6L4102eMwTEPeHxfyN9Kh7rjBoX6\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403309,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Certainly! Here is a list of the top - 10 best soccer players in the world as of 2024, based on recent performances, - individual skills, achievements, and overall impact on the game:\\n\\n1. **Lionel - Messi** \\n - Nationality: Argentine \\n - Current Club: Inter Miami - \ \\n - Highlights: Multiple Ballon d'Or awards, led Argentina to 2021 Copa - America and 2022 FIFA World Cup victories, exceptional playmaking and scoring.\\n\\n2. - **Kylian Mbapp\xE9** \\n - Nationality: French \\n - Current Club: Paris - Saint-Germain (PSG) \\n - Highlights: World Cup 2018 winner, known for - incredible speed, dribbling, and goal-scoring ability.\\n\\n3. **Erling Haaland** - \ \\n - Nationality: Norwegian \\n - Current Club: Manchester City \\n - \ - Highlights: Prolific goal scorer in the Premier League and UEFA Champions - League, physical dominance and clinical finishing.\\n\\n4. **Kevin De Bruyne** - \ \\n - Nationality: Belgian \\n - Current Club: Manchester City \\n - \ - Highlights: Elite playmaker with vision, creativity, and passing accuracy, - multiple Premier League titles.\\n\\n5. **Karim Benzema** \\n - Nationality: - French \\n - Current Club: Al-Ittihad \\n - Highlights: 2022 Ballon - d'Or winner, instrumental in Real Madrid's recent successes including multiple - Champions League titles.\\n\\n6. **Mohamed Salah** \\n - Nationality: Egyptian - \ \\n - Current Club: Liverpool \\n - Highlights: Consistent top scorer - in the Premier League, exceptional speed and dribbling, crucial influence - for Liverpool.\\n\\n7. **Robert Lewandowski** \\n - Nationality: Polish - \ \\n - Current Club: FC Barcelona \\n - Highlights: One of the best - strikers worldwide, numerous Bundesliga top scorer awards, great positioning - and finishing.\\n\\n8. **Vin\xEDcius Jr.** \\n - Nationality: Brazilian - \ \\n - Current Club: Real Madrid \\n - Highlights: Outstanding winger - with great pace and dribbling, key player in Real Madrid\u2019s recent successes.\\n\\n9. - **Jude Bellingham** \\n - Nationality: English \\n - Current Club: Real - Madrid \\n - Highlights: Young midfielder with exceptional talent, work - rate, and leadership, rapidly becoming one of the best in his position.\\n\\n10. - **Luka Modri\u0107** \\n - Nationality: Croatian \\n - Current Club: - Real Madrid \\n - Highlights: Veteran playmaker, 2018 Ballon d'Or winner, - known for his vision, passing, and ability to control the midfield.\\n\\nThis - list represents a mix of established legends and rising stars, reflecting - their influence on both club and international stages. Let me know if you - would like detailed statistics or information on additional players!\",\n - \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 68,\n \"completion_tokens\": 585,\n \"total_tokens\": 653,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 18:23:37 GMT - Server: - - cloudflare - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '8691' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Sports Analyst. You are - an expert at gathering and organizing information. You carefully collect details - and present them in a structured way.\nYour personal goal is: Gather information - about the best soccer players"},{"role":"user","content":"\nCurrent Task: Top - 10 best players in the world?\n\nProvide your complete response:"}],"model":"gpt-4.1-mini"}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '404' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6KmPP82iFaU3OaLkMu2rytLCxa5m\",\n \"object\": - \"chat.completion\",\n \"created\": 1770402217,\n \"model\": \"gpt-4.1-mini-2025-04-14\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Certainly! Here is a list of the current - top 10 best soccer players in the world as of 2024, considering recent performance, - skill level, achievements, and overall impact on the game:\\n\\n1. **Kylian - Mbapp\xE9** (France / Paris Saint-Germain)\\n - Position: Forward\\n - - Key strengths: Speed, finishing, dribbling, and versatility\\n - Notable - achievements: World Cup winner (2018), multiple Ligue 1 titles, consistent - top scorer\\n\\n2. **Erling Haaland** (Norway / Manchester City)\\n - Position: - Striker\\n - Key strengths: Physicality, goal-scoring instinct, pace\\n - \ - Notable achievements: Premier League Golden Boot, record goal scorer - in several competitions\\n\\n3. **Lionel Messi** (Argentina / Inter Miami)\\n - \ - Position: Forward\\n - Key strengths: Dribbling, vision, passing, free - kicks\\n - Notable achievements: Ballon d'Or winner (7 times), Copa America - winner, multiple La Liga and Champions League titles\\n\\n4. **Kevin De Bruyne** - (Belgium / Manchester City)\\n - Position: Midfielder\\n - Key strengths: - Passing accuracy, vision, crossing, shooting\\n - Notable achievements: - Multiple Premier League titles, several Player of the Season awards\\n\\n5. - **Karim Benzema** (France / Al-Ittihad)\\n - Position: Striker\\n - Key - strengths: Creativity, finishing, positioning\\n - Notable achievements: - Ballon d'Or (2022), Champions League winner, top scorer in La Liga (2021)\\n\\n6. - **Neymar Jr.** (Brazil / Al-Hilal)\\n - Position: Forward\\n - Key strengths: - Dribbling, flair, creativity, passing\\n - Notable achievements: Copa Libertadores - winner, multiple Ligue 1 titles, key Brazil national team player\\n\\n7. **Mohamed - Salah** (Egypt / Liverpool)\\n - Position: Winger\\n - Key strengths: - Pace, dribbling, finishing\\n - Notable achievements: Premier League Golden - Boot, multiple domestic and international titles with Liverpool\\n\\n8. **Robert - Lewandowski** (Poland / Barcelona)\\n - Position: Striker\\n - Key strengths: - Finishing, positioning, consistency\\n - Notable achievements: Multiple - Bundesliga top scorer awards, Champions League performer\\n\\n9. **Virgil - van Dijk** (Netherlands / Liverpool)\\n - Position: Defender\\n - Key - strengths: Strength, aerial ability, leadership\\n - Notable achievements: - UEFA Men's Player of the Year, Premier League title winner\\n\\n10. **Jude - Bellingham** (England / Real Madrid)\\n - Position: Midfielder\\n - - Key strengths: Passing, work rate, versatility, leadership at a young age\\n - \ - Notable achievements: Emerging as one of the world's best midfielders - with standout performances in La Liga and Champions League\\n\\nThese players - are ranked based on a combination of their current form, influence on their - teams, individual skill set, and recent accolades. The list can vary slightly - based on personal opinions and specific criteria, but these players are widely - recognized as the top talents in world soccer today.\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 68,\n \"completion_tokens\": 664,\n \"total_tokens\": 732,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + 10 best soccer players in the world as of 2024, considering their recent performances, + skills, impact, and accolades:\\n\\n1. **Lionel Messi** \\n - Nationality: + Argentine \\n - Position: Forward \\n - Key Achievements: 7 Ballon d'Or + awards, led Argentina to 2021 Copa Am\xE9rica victory and 2022 FIFA World + Cup triumph, exceptional dribbling and playmaking skills.\\n\\n2. **Kylian + Mbapp\xE9** \\n - Nationality: French \\n - Position: Forward \\n - + Key Achievements: FIFA World Cup winner (2018), multiple Ligue 1 titles, known + for incredible speed, finishing, and consistency.\\n\\n3. **Erling Haaland** + \ \\n - Nationality: Norwegian \\n - Position: Striker \\n - Key Achievements: + Premier League Golden Boot winner (2022-23), prolific goal scorer, physical + presence, and finishing ability.\\n\\n4. **Karim Benzema** \\n - Nationality: + French \\n - Position: Forward \\n - Key Achievements: 2022 Ballon d'Or + winner, key player for Real Madrid\u2019s recent Champions League victories, + excellent technical skills and leadership.\\n\\n5. **Kevin De Bruyne** \\n + \ - Nationality: Belgian \\n - Position: Midfielder \\n - Key Achievements: + Premier League playmaker, known for vision, passing accuracy, and creativity.\\n\\n6. + **Robert Lewandowski** \\n - Nationality: Polish \\n - Position: Striker + \ \\n - Key Achievements: Multiple Bundesliga top scorer titles, consistent + goal scorer, known for positioning and finishing.\\n\\n7. **Neymar Jr.** \\n + \ - Nationality: Brazilian \\n - Position: Forward \\n - Key Achievements: + Exceptional dribbling, creativity, and flair; multiple domestic titles and + Copa Libertadores winner.\\n\\n8. **Mohamed Salah** \\n - Nationality: + Egyptian \\n - Position: Forward \\n - Key Achievements: Premier League + Golden Boot, consistent goal scoring with Liverpool, known for speed and finishing.\\n\\n9. + **Luka Modri\u0107** \\n - Nationality: Croatian \\n - Position: Midfielder + \ \\n - Key Achievements: 2018 Ballon d\u2019Or winner, pivotal midfield + maestro, excellent passing and control.\\n\\n10. **Thibaut Courtois** \\n + \ - Nationality: Belgian \\n - Position: Goalkeeper \\n - Key Achievements: + Exceptional shot-stopper, key player in Real Madrid's recent successes.\\n\\nThis + list includes a blend of forwards, midfielders, and a goalkeeper, showcasing + the best talents in various positions worldwide. The rankings may vary slightly + depending on current form and opinions, but these players consistently rank + among the best globally.\",\n \"refusal\": null,\n \"annotations\": + []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 68,\n \"completion_tokens\": + 575,\n \"total_tokens\": 643,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_75546bd1a7\"\n}\n" @@ -811,7 +384,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 18:23:46 GMT + - Fri, 06 Feb 2026 18:41:57 GMT Server: - cloudflare Strict-Transport-Security: @@ -829,7 +402,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '9772' + - '7948' openai-project: - OPENAI-PROJECT-XXX openai-version: diff --git a/lib/crewai/tests/cassettes/agents/test_lite_agent_inside_flow_sync.yaml b/lib/crewai/tests/cassettes/agents/test_lite_agent_inside_flow_sync.yaml index 5a6a027b1b..10a5cfcaac 100644 --- a/lib/crewai/tests/cassettes/agents/test_lite_agent_inside_flow_sync.yaml +++ b/lib/crewai/tests/cassettes/agents/test_lite_agent_inside_flow_sync.yaml @@ -42,8 +42,8 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6Klbce3kaVKcgvOZBmNromelEFs3\",\n \"object\": - \"chat.completion\",\n \"created\": 1770402167,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-D6L4AzMHXLXDfyclWS6fJSwS0cvOl\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403318,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"4\",\n \"refusal\": null,\n \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": @@ -61,7 +61,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 18:22:47 GMT + - Fri, 06 Feb 2026 18:41:58 GMT Server: - cloudflare Set-Cookie: @@ -81,113 +81,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '363' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Test Agent. A helpful - test assistant\nYour personal goal is: Answer questions"},{"role":"user","content":"\nCurrent - Task: What is 2+2? Reply with just the number.\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '272' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6KlbWh0i69jixgiCuQv3ArpU19vT\",\n \"object\": - \"chat.completion\",\n \"created\": 1770402167,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"4\",\n \"refusal\": null,\n - \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": - \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 50,\n \"completion_tokens\": - 1,\n \"total_tokens\": 51,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 18:22:48 GMT - Server: - - cloudflare - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '346' + - '264' openai-project: - OPENAI-PROJECT-XXX openai-version: diff --git a/lib/crewai/tests/cassettes/agents/test_lite_agent_standalone_still_works.yaml b/lib/crewai/tests/cassettes/agents/test_lite_agent_standalone_still_works.yaml index 43328f5133..d3f8bb9e5b 100644 --- a/lib/crewai/tests/cassettes/agents/test_lite_agent_standalone_still_works.yaml +++ b/lib/crewai/tests/cassettes/agents/test_lite_agent_standalone_still_works.yaml @@ -42,8 +42,8 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6KlcAeKCY1EOydWn2I1x8D3VwAIF\",\n \"object\": - \"chat.completion\",\n \"created\": 1770402168,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-D6L3cLs2ndBaXV2wnqYCdi6X1ykvv\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403284,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"10\",\n \"refusal\": null,\n \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": @@ -61,7 +61,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 18:22:48 GMT + - Fri, 06 Feb 2026 18:41:25 GMT Server: - cloudflare Set-Cookie: @@ -81,113 +81,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '251' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Standalone Agent. A helpful - assistant\nYour personal goal is: Answer questions"},{"role":"user","content":"\nCurrent - Task: What is 5+5? Reply with just the number.\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '273' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6KldxqJRrXg3E0K1b7NpVEseRpyB\",\n \"object\": - \"chat.completion\",\n \"created\": 1770402169,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"10\",\n \"refusal\": null,\n - \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": - \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 50,\n \"completion_tokens\": - 1,\n \"total_tokens\": 51,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 18:22:49 GMT - Server: - - cloudflare - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '318' + - '270' openai-project: - OPENAI-PROJECT-XXX openai-version: diff --git a/lib/crewai/tests/cassettes/agents/test_multiple_agents_in_same_flow.yaml b/lib/crewai/tests/cassettes/agents/test_multiple_agents_in_same_flow.yaml index 1bf365a9fc..e66c25d992 100644 --- a/lib/crewai/tests/cassettes/agents/test_multiple_agents_in_same_flow.yaml +++ b/lib/crewai/tests/cassettes/agents/test_multiple_agents_in_same_flow.yaml @@ -42,228 +42,13 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6HWJuvgccP0g7J1qczN7C2Ub2F4X\",\n \"object\": - \"chat.completion\",\n \"created\": 1770389687,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-D6L4A8Aad6P1YUxWjQpvyltn8GaKT\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403318,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Hello! Welcome! How can I assist you - today? \U0001F60A\",\n \"refusal\": null,\n \"annotations\": - []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 41,\n \"completion_tokens\": - 12,\n \"total_tokens\": 53,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 14:54:47 GMT - Server: - - cloudflare - Set-Cookie: - - SET-COOKIE-XXX - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '442' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are First Agent. A friendly - greeter\nYour personal goal is: Greet users"},{"role":"user","content":"\nCurrent - Task: Say hello\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '231' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6HWJJH1nOZiFYtdDBQ99RghFi1VT\",\n \"object\": - \"chat.completion\",\n \"created\": 1770389687,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Hello! \U0001F44B How can I assist - you today?\",\n \"refusal\": null,\n \"annotations\": []\n },\n - \ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n - \ \"usage\": {\n \"prompt_tokens\": 41,\n \"completion_tokens\": 11,\n - \ \"total_tokens\": 52,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 14:54:48 GMT - Server: - - cloudflare - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '379' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Second Agent. A polite - farewell agent\nYour personal goal is: Say goodbye"},{"role":"user","content":"\nCurrent - Task: Say goodbye\n\nProvide your complete response:"}],"model":"gpt-4o-mini"}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '239' - content-type: - - application/json - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6HWKrdlGlOzRR944Hd5Eai9rykmm\",\n \"object\": - \"chat.completion\",\n \"created\": 1770389688,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Thank you for the time we've shared. - I wish you all the best in your future endeavors. Take care, and goodbye!\",\n + \"assistant\",\n \"content\": \"Hello! \U0001F60A How are you today?\",\n \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 40,\n \"completion_tokens\": 25,\n \"total_tokens\": 65,\n \"prompt_tokens_details\": + 41,\n \"completion_tokens\": 8,\n \"total_tokens\": 49,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": @@ -276,7 +61,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 14:54:49 GMT + - Fri, 06 Feb 2026 18:41:58 GMT Server: - cloudflare Set-Cookie: @@ -296,7 +81,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '546' + - '325' openai-project: - OPENAI-PROJECT-XXX openai-version: @@ -339,8 +124,6 @@ interactions: - '239' content-type: - application/json - cookie: - - COOKIE-XXX host: - api.openai.com x-stainless-arch: @@ -365,16 +148,16 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6HWL6iE5TBc1OlsLy2u2vGjzJTMM\",\n \"object\": - \"chat.completion\",\n \"created\": 1770389689,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-D6L4BLMYC3ODccwbKfBIdtrEyd3no\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403319,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Thank you for the time we've shared! - It was a pleasure assisting you. If you have any more questions in the future, - don't hesitate to reach out. Wishing you all the best! Goodbye!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 40,\n \"completion_tokens\": 40,\n \"total_tokens\": 80,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \"assistant\",\n \"content\": \"Thank you for the time we've spent + together! I wish you all the best in your future endeavors. Take care, and + until we meet again, goodbye!\",\n \"refusal\": null,\n \"annotations\": + []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 40,\n \"completion_tokens\": + 31,\n \"total_tokens\": 71,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_f4ae844694\"\n}\n" @@ -386,9 +169,11 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 14:54:50 GMT + - Fri, 06 Feb 2026 18:41:59 GMT Server: - cloudflare + Set-Cookie: + - SET-COOKIE-XXX Strict-Transport-Security: - STS-XXX Transfer-Encoding: @@ -404,7 +189,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '995' + - '726' openai-project: - OPENAI-PROJECT-XXX openai-version: diff --git a/lib/crewai/tests/cassettes/agents/test_native_tool_calling_error_handling.yaml b/lib/crewai/tests/cassettes/agents/test_native_tool_calling_error_handling.yaml index 471fd3f087..c61d2c0348 100644 --- a/lib/crewai/tests/cassettes/agents/test_native_tool_calling_error_handling.yaml +++ b/lib/crewai/tests/cassettes/agents/test_native_tool_calling_error_handling.yaml @@ -2,9 +2,8 @@ interactions: - request: body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent - Task: Use the failing_tool to do something.\n\nThis is VERY important to you, - your job depends on it!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This - tool always fails","parameters":{"properties":{},"type":"object"}}}]}' + Task: Use the failing_tool to do something."}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This + tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' headers: User-Agent: - X-USER-AGENT-XXX @@ -17,7 +16,7 @@ interactions: connection: - keep-alive content-length: - - '477' + - '476' content-type: - application/json host: @@ -39,253 +38,25 @@ interactions: x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.13.3 + - 3.13.5 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D0vm2JDsOmy0czXPAr4vnw3wvuqYZ\",\n \"object\": - \"chat.completion\",\n \"created\": 1769114454,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-D6L3dV6acwapgRyxmnzGfuOXemtjJ\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403285,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_8xr8rPUDWzLfQ3LOWPHtBUjK\",\n \"type\": + \ \"id\": \"call_GCdaOdo32pr1sSk4RzO0tiB9\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"failing_tool\",\n \ \"arguments\": \"{}\"\n }\n }\n ],\n \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": - {\n \"prompt_tokens\": 78,\n \"completion_tokens\": 11,\n \"total_tokens\": - 89,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": + {\n \"prompt_tokens\": 65,\n \"completion_tokens\": 11,\n \"total_tokens\": + 76,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \ \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_c4585b5b9c\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Thu, 22 Jan 2026 20:40:54 GMT - Server: - - cloudflare - Set-Cookie: - - SET-COOKIE-XXX - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '593' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-envoy-upstream-service-time: - - '621' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate - things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent - Task: Use the failing_tool to do something.\n\nThis is VERY important to you, - your job depends on it!"},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","content":"Error - executing tool: This tool always fails"},{"role":"user","content":"Analyze the - tool result. If requirements are met, provide the Final Answer. Otherwise, call - the next tool. Deliver only the answer without meta-commentary."}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This - tool always fails","parameters":{"properties":{},"type":"object"}}}]}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '941' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.3 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D0vm3xcywoKBW75bhBXfkGJNim6Th\",\n \"object\": - \"chat.completion\",\n \"created\": 1769114455,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Error: This tool always fails.\",\n - \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 141,\n \"completion_tokens\": 8,\n \"total_tokens\": 149,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_c4585b5b9c\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Thu, 22 Jan 2026 20:40:55 GMT - Server: - - cloudflare - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '420' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-envoy-upstream-service-time: - - '436' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate - things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent - Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error - executing tool: This tool always fails"},{"role":"assistant","content":"Error: - This tool always fails."}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This - tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '842' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6K5UyfOvOaQm57DIdmTllgWkTKxB\",\n \"object\": - \"chat.completion\",\n \"created\": 1770399556,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"It seems that I'm unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 104,\n \"completion_tokens\": 36,\n \"total_tokens\": 140,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" headers: CF-RAY: @@ -295,7 +66,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 17:39:17 GMT + - Fri, 06 Feb 2026 18:41:25 GMT Server: - cloudflare Set-Cookie: @@ -315,7 +86,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '826' + - '436' openai-project: - OPENAI-PROJECT-XXX openai-version: @@ -342,14 +113,8 @@ interactions: - request: body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent - Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error - executing tool: This tool always fails"},{"role":"assistant","content":"Error: - This tool always fails."},{"role":"assistant","content":"It seems that I''m - unable to use the failing tool because it always results in an error. If you - have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This + Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_GCdaOdo32pr1sSk4RzO0tiB9","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_GCdaOdo32pr1sSk4RzO0tiB9","name":"failing_tool","content":"Error + executing tool: This tool always fails"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' headers: User-Agent: @@ -363,7 +128,7 @@ interactions: connection: - keep-alive content-length: - - '1234' + - '778' content-type: - application/json cookie: @@ -392,16 +157,17 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-D6K5VluoHbHd63gPzPelwvdkuXFDJ\",\n \"object\": - \"chat.completion\",\n \"created\": 1770399557,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-D6L3dhjDZOoihHvXvRpbJD3ReGu0z\",\n \"object\": + \"chat.completion\",\n \"created\": 1770403285,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"It seems that I'm unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 182,\n \"completion_tokens\": 36,\n \"total_tokens\": 218,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + \"assistant\",\n \"content\": \"The attempt to use the failing tool + resulted in an error, as expected since it is designed to always fail. If + there's anything else you would like to calculate or explore, please let me + know!\",\n \"refusal\": null,\n \"annotations\": []\n },\n + \ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n + \ \"usage\": {\n \"prompt_tokens\": 93,\n \"completion_tokens\": 40,\n + \ \"total_tokens\": 133,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" @@ -413,7 +179,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 17:39:18 GMT + - Fri, 06 Feb 2026 18:41:26 GMT Server: - cloudflare Strict-Transport-Security: @@ -431,761 +197,7 @@ interactions: openai-organization: - OPENAI-ORG-XXX openai-processing-ms: - - '807' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate - things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent - Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error - executing tool: This tool always fails"},{"role":"assistant","content":"Error: - This tool always fails."},{"role":"assistant","content":"It seems that I''m - unable to use the failing tool because it always results in an error. If you - have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This - tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '1626' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6K5WHyQKBRK6vWmna2XtA0z830Hu\",\n \"object\": - \"chat.completion\",\n \"created\": 1770399558,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"It seems that I'm unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 260,\n \"completion_tokens\": 36,\n \"total_tokens\": 296,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 17:39:19 GMT - Server: - - cloudflare - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '914' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate - things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent - Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error - executing tool: This tool always fails"},{"role":"assistant","content":"Error: - This tool always fails."},{"role":"assistant","content":"It seems that I''m - unable to use the failing tool because it always results in an error. If you - have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This - tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '2018' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6K5XTHUnUPeAOA7iWMOWVV2qeipM\",\n \"object\": - \"chat.completion\",\n \"created\": 1770399559,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"It seems that I'm unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 338,\n \"completion_tokens\": 36,\n \"total_tokens\": 374,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 17:39:20 GMT - Server: - - cloudflare - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '1021' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate - things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent - Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error - executing tool: This tool always fails"},{"role":"assistant","content":"Error: - This tool always fails."},{"role":"assistant","content":"It seems that I''m - unable to use the failing tool because it always results in an error. If you - have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This - tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '1626' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6K5qCfXTLlXzgadt12TzvVW0qVKs\",\n \"object\": - \"chat.completion\",\n \"created\": 1770399578,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"It seems that I'm unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 260,\n \"completion_tokens\": 36,\n \"total_tokens\": 296,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 17:39:39 GMT - Server: - - cloudflare - Set-Cookie: - - SET-COOKIE-XXX - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '885' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate - things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent - Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error - executing tool: This tool always fails"},{"role":"assistant","content":"Error: - This tool always fails."},{"role":"assistant","content":"It seems that I''m - unable to use the failing tool because it always results in an error. If you - have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This - tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '2018' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6K5rOH2IQ2zXjArqMl34AafyJfZP\",\n \"object\": - \"chat.completion\",\n \"created\": 1770399579,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"It seems that I'm unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 338,\n \"completion_tokens\": 36,\n \"total_tokens\": 374,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 17:39:40 GMT - Server: - - cloudflare - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '830' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate - things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent - Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error - executing tool: This tool always fails"},{"role":"assistant","content":"Error: - This tool always fails."},{"role":"assistant","content":"It seems that I''m - unable to use the failing tool because it always results in an error. If you - have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This - tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '2018' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6K7K5ivzGwNbzu1mLLD7EYYQHmg4\",\n \"object\": - \"chat.completion\",\n \"created\": 1770399670,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"It seems that I'm unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 338,\n \"completion_tokens\": 36,\n \"total_tokens\": 374,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 17:41:11 GMT - Server: - - cloudflare - Set-Cookie: - - SET-COOKIE-XXX - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '712' - openai-project: - - OPENAI-PROJECT-XXX - openai-version: - - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - X-RATELIMIT-LIMIT-REQUESTS-XXX - x-ratelimit-limit-tokens: - - X-RATELIMIT-LIMIT-TOKENS-XXX - x-ratelimit-remaining-requests: - - X-RATELIMIT-REMAINING-REQUESTS-XXX - x-ratelimit-remaining-tokens: - - X-RATELIMIT-REMAINING-TOKENS-XXX - x-ratelimit-reset-requests: - - X-RATELIMIT-RESET-REQUESTS-XXX - x-ratelimit-reset-tokens: - - X-RATELIMIT-RESET-TOKENS-XXX - x-request-id: - - X-REQUEST-ID-XXX - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"You are Calculator. You calculate - things.\nYour personal goal is: Perform calculations efficiently"},{"role":"user","content":"\nCurrent - Task: Use the failing_tool to do something."},{"role":"assistant","content":null,"tool_calls":[{"id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","type":"function","function":{"name":"failing_tool","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_8xr8rPUDWzLfQ3LOWPHtBUjK","name":"failing_tool","content":"Error - executing tool: This tool always fails"},{"role":"assistant","content":"Error: - This tool always fails."},{"role":"assistant","content":"It seems that I''m - unable to use the failing tool because it always results in an error. If you - have another task or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"},{"role":"assistant","content":"It - seems that I''m unable to use the failing tool because it always results in - an error. If you have another task or calculation in mind, feel free to let - me know!"},{"role":"assistant","content":"It seems that I''m unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!"}],"model":"gpt-4o-mini","tool_choice":"auto","tools":[{"type":"function","function":{"name":"failing_tool","description":"This - tool always fails","strict":true,"parameters":{"properties":{},"type":"object","additionalProperties":false,"required":[]}}}]}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - authorization: - - AUTHORIZATION-XXX - connection: - - keep-alive - content-length: - - '2214' - content-type: - - application/json - cookie: - - COOKIE-XXX - host: - - api.openai.com - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 1.83.0 - x-stainless-read-timeout: - - X-STAINLESS-READ-TIMEOUT-XXX - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-D6K8a3FFLW2WM6nkRaOpCQUpzhQXg\",\n \"object\": - \"chat.completion\",\n \"created\": 1770399748,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"It seems that I'm unable to use the - failing tool because it always results in an error. If you have another task - or calculation in mind, feel free to let me know!\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 377,\n \"completion_tokens\": 36,\n \"total_tokens\": 413,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_6c0d1490cb\"\n}\n" - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 17:42:29 GMT - Server: - - cloudflare - Set-Cookie: - - SET-COOKIE-XXX - Strict-Transport-Security: - - STS-XXX - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - X-CONTENT-TYPE-XXX - access-control-expose-headers: - - ACCESS-CONTROL-XXX - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - openai-organization: - - OPENAI-ORG-XXX - openai-processing-ms: - - '861' + - '776' openai-project: - OPENAI-PROJECT-XXX openai-version: diff --git a/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_with_tools.yaml b/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_with_tools.yaml index 6f5bf63541..31124d09c5 100644 --- a/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_with_tools.yaml +++ b/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_with_tools.yaml @@ -50,8 +50,8 @@ interactions: uri: https://api.anthropic.com/v1/messages response: body: - string: '{"model":"claude-3-5-haiku-20241022","id":"msg_013R86eq5RfpWJvZNQZ9z26F","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01A7hp3h5sE6VHNJkz5zJDVa","name":"structured_output","input":{"operation":"addition","result":42,"explanation":"Calculated - 15 + 27 by adding the two numbers together"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":573,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":81,"service_tier":"standard","inference_geo":"not_available"}}' + string: '{"model":"claude-3-5-haiku-20241022","id":"msg_01A41GpDoJbZLUhR8dQzUcUX","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01UNPdzpayoWyqDYVE7fR5oA","name":"structured_output","input":{"operation":"Addition","result":42,"explanation":"Added + 15 and 27 together"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":573,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":75,"service_tier":"standard","inference_geo":"not_available"}}' headers: CF-RAY: - CF-RAY-XXX @@ -62,7 +62,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 18:22:49 GMT + - Fri, 06 Feb 2026 18:41:25 GMT Server: - cloudflare Transfer-Encoding: @@ -88,7 +88,7 @@ interactions: anthropic-ratelimit-requests-remaining: - '3999' anthropic-ratelimit-requests-reset: - - '2026-02-06T18:22:47Z' + - '2026-02-06T18:41:24Z' anthropic-ratelimit-tokens-limit: - ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX anthropic-ratelimit-tokens-remaining: @@ -102,115 +102,7 @@ interactions: strict-transport-security: - STS-XXX x-envoy-upstream-service-time: - - '1772' - status: - code: 200 - message: OK -- request: - body: '{"max_tokens":4096,"messages":[{"role":"user","content":"\nCurrent Task: - Calculate 15 + 27 using your add_numbers tool. Report the result."},{"role":"assistant","content":"{\"operation\":\"addition\",\"result\":42,\"explanation\":\"Calculated - 15 + 27 by adding the two numbers together\"}"}],"model":"claude-3-5-haiku-20241022","stop_sequences":["\nObservation:"],"stream":false,"system":"You - are Calculator. You are a calculator assistant that uses tools to compute results.\nYour - personal goal is: Perform calculations using available tools","tool_choice":{"type":"tool","name":"structured_output"},"tools":[{"name":"structured_output","description":"Output - the structured response","input_schema":{"type":"object","description":"Structured - output for calculation results.","title":"CalculationResult","properties":{"operation":{"type":"string","description":"The - mathematical operation performed","title":"Operation"},"result":{"type":"integer","description":"The - result of the calculation","title":"Result"},"explanation":{"type":"string","description":"Brief - explanation of the calculation","title":"Explanation"}},"additionalProperties":false,"required":["operation","result","explanation"]}}]}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - anthropic-version: - - '2023-06-01' - connection: - - keep-alive - content-length: - - '1200' - content-type: - - application/json - host: - - api.anthropic.com - x-api-key: - - X-API-KEY-XXX - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 0.73.0 - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - x-stainless-timeout: - - NOT_GIVEN - method: POST - uri: https://api.anthropic.com/v1/messages - response: - body: - string: '{"model":"claude-3-5-haiku-20241022","id":"msg_0133RSRzrjN4wuAA1s3h3Dte","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01P7rTdbBhCFuGMSocabwAAH","name":"structured_output","input":{"operation":"addition","result":42,"explanation":"Calculated - 15 + 27 by adding the two numbers together"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":601,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":81,"service_tier":"standard","inference_geo":"not_available"}}' - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Security-Policy: - - CSP-FILTERED - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 18:22:50 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - X-Robots-Tag: - - none - anthropic-organization-id: - - ANTHROPIC-ORGANIZATION-ID-XXX - anthropic-ratelimit-input-tokens-limit: - - ANTHROPIC-RATELIMIT-INPUT-TOKENS-LIMIT-XXX - anthropic-ratelimit-input-tokens-remaining: - - ANTHROPIC-RATELIMIT-INPUT-TOKENS-REMAINING-XXX - anthropic-ratelimit-input-tokens-reset: - - ANTHROPIC-RATELIMIT-INPUT-TOKENS-RESET-XXX - anthropic-ratelimit-output-tokens-limit: - - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-LIMIT-XXX - anthropic-ratelimit-output-tokens-remaining: - - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-REMAINING-XXX - anthropic-ratelimit-output-tokens-reset: - - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-RESET-XXX - anthropic-ratelimit-requests-limit: - - '4000' - anthropic-ratelimit-requests-remaining: - - '3999' - anthropic-ratelimit-requests-reset: - - '2026-02-06T18:22:49Z' - anthropic-ratelimit-tokens-limit: - - ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX - anthropic-ratelimit-tokens-remaining: - - ANTHROPIC-RATELIMIT-TOKENS-REMAINING-XXX - anthropic-ratelimit-tokens-reset: - - ANTHROPIC-RATELIMIT-TOKENS-RESET-XXX - cf-cache-status: - - DYNAMIC - request-id: - - REQUEST-ID-XXX - strict-transport-security: - - STS-XXX - x-envoy-upstream-service-time: - - '1199' + - '1247' status: code: 200 message: OK diff --git a/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_without_tools.yaml b/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_without_tools.yaml index 105c4f631c..70478203b2 100644 --- a/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_without_tools.yaml +++ b/lib/crewai/tests/cassettes/llms/anthropic/test_anthropic_agent_kickoff_structured_output_without_tools.yaml @@ -51,128 +51,13 @@ interactions: uri: https://api.anthropic.com/v1/messages response: body: - string: '{"model":"claude-3-5-haiku-20241022","id":"msg_01EErGsizLmKxQDqPFRsVRZ5","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01KwbRfvGRuUMGdWAZ45cgiy","name":"structured_output","input":{"topic":"Benefits - of Remote Work","key_points":["Increased flexibility in work schedule","Reduced - commuting time and costs","Improved work-life balance","Enhanced productivity - for many employees","Cost savings for employers on office space","Access to - a global talent pool"],"summary":"Remote work offers significant advantages - for both employees and employers, providing greater flexibility, cost savings, - and improved overall work experience by eliminating geographical constraints - and traditional office limitations."}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":589,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":151,"service_tier":"standard","inference_geo":"not_available"}}' - headers: - CF-RAY: - - CF-RAY-XXX - Connection: - - keep-alive - Content-Security-Policy: - - CSP-FILTERED - Content-Type: - - application/json - Date: - - Fri, 06 Feb 2026 18:22:53 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - X-Robots-Tag: - - none - anthropic-organization-id: - - ANTHROPIC-ORGANIZATION-ID-XXX - anthropic-ratelimit-input-tokens-limit: - - ANTHROPIC-RATELIMIT-INPUT-TOKENS-LIMIT-XXX - anthropic-ratelimit-input-tokens-remaining: - - ANTHROPIC-RATELIMIT-INPUT-TOKENS-REMAINING-XXX - anthropic-ratelimit-input-tokens-reset: - - ANTHROPIC-RATELIMIT-INPUT-TOKENS-RESET-XXX - anthropic-ratelimit-output-tokens-limit: - - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-LIMIT-XXX - anthropic-ratelimit-output-tokens-remaining: - - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-REMAINING-XXX - anthropic-ratelimit-output-tokens-reset: - - ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-RESET-XXX - anthropic-ratelimit-requests-limit: - - '4000' - anthropic-ratelimit-requests-remaining: - - '3999' - anthropic-ratelimit-requests-reset: - - '2026-02-06T18:22:50Z' - anthropic-ratelimit-tokens-limit: - - ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX - anthropic-ratelimit-tokens-remaining: - - ANTHROPIC-RATELIMIT-TOKENS-REMAINING-XXX - anthropic-ratelimit-tokens-reset: - - ANTHROPIC-RATELIMIT-TOKENS-RESET-XXX - cf-cache-status: - - DYNAMIC - request-id: - - REQUEST-ID-XXX - strict-transport-security: - - STS-XXX - x-envoy-upstream-service-time: - - '2750' - status: - code: 200 - message: OK -- request: - body: '{"max_tokens":4096,"messages":[{"role":"user","content":"\nCurrent Task: - Analyze the benefits of remote work briefly. Keep it concise.\n\nProvide your - complete response:"}],"model":"claude-3-5-haiku-20241022","stop_sequences":["\nObservation:"],"stream":false,"system":"You - are Analyst. You are an expert analyst who provides clear, structured insights.\nYour - personal goal is: Provide structured analysis on topics","tool_choice":{"type":"tool","name":"structured_output"},"tools":[{"name":"structured_output","description":"Output - the structured response","input_schema":{"type":"object","description":"Structured - output for analysis results.","title":"AnalysisResult","properties":{"topic":{"type":"string","description":"The - topic analyzed","title":"Topic"},"key_points":{"type":"array","description":"Key - insights from the analysis","title":"Key Points","items":{"type":"string"}},"summary":{"type":"string","description":"Brief - summary of findings","title":"Summary"}},"additionalProperties":false,"required":["topic","key_points","summary"]}}]}' - headers: - User-Agent: - - X-USER-AGENT-XXX - accept: - - application/json - accept-encoding: - - ACCEPT-ENCODING-XXX - anthropic-version: - - '2023-06-01' - connection: - - keep-alive - content-length: - - '1051' - content-type: - - application/json - host: - - api.anthropic.com - x-api-key: - - X-API-KEY-XXX - x-stainless-arch: - - X-STAINLESS-ARCH-XXX - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - X-STAINLESS-OS-XXX - x-stainless-package-version: - - 0.73.0 - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.13.5 - x-stainless-timeout: - - NOT_GIVEN - method: POST - uri: https://api.anthropic.com/v1/messages - response: - body: - string: '{"model":"claude-3-5-haiku-20241022","id":"msg_01SDJhHqEzHWHEXNjBvRZ5qr","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_016HyadrkUyRQPFTFuMLyZPr","name":"structured_output","input":{"topic":"Benefits + string: '{"model":"claude-3-5-haiku-20241022","id":"msg_016wrV83wm3FLYD4JoTy2Piw","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01V6Pzr7eGfuG4Q3mc25ZXwN","name":"structured_output","input":{"topic":"Benefits of Remote Work","summary":"Remote work offers significant advantages for both - employees and employers, transforming traditional work models by providing - flexibility, cost savings, and improved productivity.","key_points":["Increased - employee work-life balance","Reduced commuting time and transportation costs","Greater - flexibility in work scheduling","Lower overhead expenses for companies","Access - to a wider talent pool","Improved employee job satisfaction and retention","Enhanced - productivity through personalized work environments"]}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":589,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":155,"service_tier":"standard","inference_geo":"not_available"}}' + employees and employers, transforming traditional workplace dynamics.","key_points":["Increased + flexibility in work schedule","Reduced commute time and transportation costs","Improved + work-life balance","Higher productivity for many employees","Cost savings + for companies on office infrastructure","Expanded talent pool for hiring","Enhanced + employee job satisfaction"]}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":589,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":142,"service_tier":"standard","inference_geo":"not_available"}}' headers: CF-RAY: - CF-RAY-XXX @@ -183,7 +68,7 @@ interactions: Content-Type: - application/json Date: - - Fri, 06 Feb 2026 18:22:56 GMT + - Fri, 06 Feb 2026 18:41:28 GMT Server: - cloudflare Transfer-Encoding: @@ -209,7 +94,7 @@ interactions: anthropic-ratelimit-requests-remaining: - '3999' anthropic-ratelimit-requests-reset: - - '2026-02-06T18:22:53Z' + - '2026-02-06T18:41:26Z' anthropic-ratelimit-tokens-limit: - ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX anthropic-ratelimit-tokens-remaining: @@ -223,7 +108,7 @@ interactions: strict-transport-security: - STS-XXX x-envoy-upstream-service-time: - - '2887' + - '2650' status: code: 200 message: OK