Commit Graph

2027 Commits

Author SHA1 Message Date
Greyson LaLonde
4bd32f6626 fix: import Self from typing_extensions for Python 3.10 compatibility 2026-01-22 20:16:25 -05:00
Greyson LaLonde
4decb15c61 Merge branch 'lorenze/imp/native-tool-calling' into gl/feat/native-multimodal-files 2026-01-22 20:09:53 -05:00
Greyson LaLonde
80f7410683 Merge branch 'lorenze/imp/native-tool-calling' of https://github.com/crewAIInc/crewAI into lorenze/imp/native-tool-calling 2026-01-22 20:05:41 -05:00
Greyson LaLonde
b104d64b39 fix: sanitize tool names in native tool call processing
- Update extract_tool_call_info to return sanitized tool names
- Fix delegation tool name matching to use sanitized names
- Add sanitization in crew_agent_executor tool call extraction
- Add sanitization in experimental agent_executor
- Add sanitization in LLM.call function lookup
- Update streaming utility to use sanitized names
- Update base_agent_executor_mixin delegation check
2026-01-22 20:05:20 -05:00
lorenzejay
a54005459d Merge branch 'lorenze/imp/native-tool-calling' of github.com:crewAIInc/crewAI into lorenze/imp/native-tool-calling 2026-01-22 16:53:16 -08:00
lorenzejay
ec3a65b529 regen 2026-01-22 16:53:00 -08:00
Greyson LaLonde
242757f67b fix: apply sanitize_tool_name consistently across codebase
Unify tool name sanitization to ensure consistency between tool names
shown to LLMs and tool name matching/lookup logic.
2026-01-22 19:52:25 -05:00
Greyson LaLonde
8310ca1369 fix: update sanitize_tool_name test expectations
Align test expectations with unified sanitize_tool_name behavior
that lowercases and splits camelCase for LLM provider compatibility.
2026-01-22 19:17:42 -05:00
Greyson LaLonde
1b006beedc Merge branch 'main' into gl/feat/native-multimodal-files 2026-01-22 19:14:55 -05:00
Greyson LaLonde
edae4e889c fix: include tool role messages in save_last_messages 2026-01-22 19:10:33 -05:00
Greyson LaLonde
846133310b fix: unify tool name sanitization across codebase 2026-01-22 19:01:14 -05:00
lorenzejay
e9ca6e89d8 regen again placeholder for cassette matching 2026-01-22 14:49:07 -08:00
lorenzejay
11c96d6e3c regen all azure cassettes 2026-01-22 14:14:21 -08:00
lorenzejay
f1bad9c748 regen 2026-01-22 14:09:16 -08:00
lorenzejay
73963b8e65 better tests 2026-01-22 14:08:02 -08:00
lorenzejay
249b118e9e drop logs 2026-01-22 13:54:27 -08:00
lorenzejay
51c5973033 fix test 2026-01-22 13:52:38 -08:00
lorenzejay
c7a83c8c36 fix other test 2026-01-22 13:47:52 -08:00
lorenzejay
ba15fbf8ea Implement max usage count tracking for tools in agent executors
- Added functionality to check if a tool has reached its maximum usage count before execution in both crew_agent_executor.py and agent_executor.py.
- Enhanced error handling to return a message when a tool's usage limit is reached.
- Updated tool usage logic in tool_usage.py to increment usage counts and print current usage status.
- Introduced tests to validate max usage count behavior for native tool calling, ensuring proper enforcement and tracking.

This update improves tool management by preventing overuse and providing clear feedback when limits are reached.
2026-01-22 13:47:36 -08:00
lorenzejay
90ab4d2527 regen azure cassettes 2026-01-22 13:40:10 -08:00
lorenzejay
65746137fe supporting bedrock 2026-01-22 13:31:56 -08:00
lorenzejay
89e961e08e ensure we support bedrock 2026-01-22 13:29:49 -08:00
lorenzejay
a61cfb258f regen gemini 2026-01-22 13:02:14 -08:00
Greyson LaLonde
ca07114bcf refactor: centralize multimodal formatting in crewai_files 2026-01-22 15:59:55 -05:00
lorenzejay
2f300bf86e regen cassettes 2026-01-22 12:49:56 -08:00
lorenzejay
f3951cb09d fix 2026-01-22 12:36:05 -08:00
Greyson LaLonde
b95a3a9bc8 refactor: extract files module to standalone crewai-files package 2026-01-22 15:06:20 -05:00
lorenzejay
77697c3ad9 fix cassettes 2026-01-22 11:43:07 -08:00
lorenzejay
a0fad289c5 Enhance tool handling and delegation tracking in agent executors
- Implemented immediate return for tools with result_as_answer=True in crew_agent_executor.py.
- Added delegation tracking functionality in agent_utils.py to increment delegations when specific tools are used.
- Updated tool usage logic to handle caching more effectively in tool_usage.py.
- Enhanced test cases to validate new delegation features and tool caching behavior.

This update improves the efficiency of tool execution and enhances the delegation capabilities of agents.
2026-01-22 11:42:52 -08:00
lorenzejay
458f6867f0 Enhance tool handling and delegation tracking in agent executors
- Implemented immediate return for tools with result_as_answer=True in crew_agent_executor.py.
- Added delegation tracking functionality in agent_utils.py to increment delegations when specific tools are used.
- Updated tool usage logic to handle caching more effectively in tool_usage.py.
- Enhanced test cases to validate new delegation features and tool caching behavior.

This update improves the efficiency of tool execution and enhances the delegation capabilities of agents.
2026-01-22 11:35:27 -08:00
Greyson LaLonde
a064b84ead feat: add URL file source support for multimodal content 2026-01-22 14:18:16 -05:00
Greyson LaLonde
4d0b6d834c test: add real video file tests for duration detection 2026-01-22 14:08:40 -05:00
Greyson LaLonde
9be88e05ee feat: add format hints to audio/video duration detection 2026-01-22 14:02:55 -05:00
lorenzejay
d0af4c6331 ensure we properly fail tools and emit their events 2026-01-22 10:36:11 -08:00
lorenzejay
0d4ff5d80c adjust 2026-01-22 10:18:35 -08:00
lorenzejay
a6a0bf6412 adjust cassettes and dropped tests due to native tool implementation 2026-01-22 10:15:18 -08:00
lorenzejay
bffe5aa877 revert crew agent executor 2026-01-22 09:28:00 -08:00
Greyson LaLonde
9fec81f976 refactor: improve factory typing with specific provider and uploader types 2026-01-22 12:22:28 -05:00
lorenzejay
85096ca086 regen cassette 2026-01-22 09:17:21 -08:00
lorenzejay
0d62d8dc0c updated cassette 2026-01-22 09:07:37 -08:00
lorenzejay
21911d2de5 linted 2026-01-22 08:49:03 -08:00
Greyson LaLonde
6147d4eb2e refactor: reorganize files module with centralized constants and utilities 2026-01-22 11:46:17 -05:00
lorenzejay
b40780f220 Merge branch 'main' of github.com:crewAIInc/crewAI into lorenze/imp/native-tool-calling 2026-01-22 08:38:57 -08:00
Vini Brasil
06d953bf46 Add model field to LLM failed events (#4267)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Move the `model` field from `LLMCallStartedEvent` and
`LLMCallCompletedEvent` to the base `LLMEventBase` class.
2026-01-22 16:19:18 +01:00
Greyson LaLonde
e2a5177da2 refactor: consolidate FileInput and MIME type definitions 2026-01-22 10:15:32 -05:00
Greyson LaLonde
da930fa1df refactor: extract helper functions to reduce code duplication 2026-01-22 09:52:23 -05:00
Greyson LaLonde
0a250a45ce refactor: fix IDE warnings and add Literal types to constraints
- Add Literal types for ImageFormat, AudioFormat, VideoFormat, ProviderName
- Convert methods to @staticmethod where appropriate
- Remove redundant default parameter values
- Fix variable shadowing in nested functions
- Make magic import optional with mimetypes fallback
- Add docstrings to inner functions
2026-01-22 02:54:29 -05:00
Greyson LaLonde
1353cb2a33 feat: add streaming uploads for large files
- OpenAI: Use Uploads API for files > 512MB with chunked streaming
- Gemini: Pass file path directly to SDK for FilePath sources
- Bedrock: Use upload_fileobj with TransferConfig for automatic multipart
2026-01-22 02:10:15 -05:00
Greyson LaLonde
5550c6df7e feat: promote files to first-class crewai.files package 2026-01-22 01:39:04 -05:00
lorenzejay
d9e4a2345b Remove debug print statements from AgentExecutor to clean up the code and improve readability. This change enhances the overall performance of the agent execution flow by eliminating unnecessary console output during LLM calls and iterations. 2026-01-21 17:53:35 -08:00