Skip to content

Commit 685d20f

Browse files
LuniaKunallucasgomidelorenzejay
authored
added gpt-4.1 models and gemini-2.0 and 2.5 pro models (#2609)
* added gpt4.1 models and gemini 2.0 and 2.5 models * added flash model * Updated test fun to all models * Added Gemma3 test cases and passed all google test case * added gemini 2.5 flash * added gpt4.1 models and gemini 2.0 and 2.5 models * added flash model * Updated test fun to all models * Added Gemma3 test cases and passed all google test case * added gemini 2.5 flash * added gpt4.1 models and gemini 2.0 and 2.5 models * added flash model * Updated test fun to all models * Added Gemma3 test cases and passed all google test case * added gemini 2.5 flash * test: add missing cassettes * test: ignore authorization key from gemini/gemma3 request --------- Co-authored-by: Lucas Gomide <lucaslg200@gmail.com> Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
1 parent 9ebf3aa commit 685d20f

15 files changed

+913
-1
lines changed

src/crewai/cli/constants.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,16 @@
122122
]
123123

124124
MODELS = {
125-
"openai": ["gpt-4", "gpt-4o", "gpt-4o-mini", "o1-mini", "o1-preview"],
125+
"openai": [
126+
"gpt-4",
127+
"gpt-4.1",
128+
"gpt-4.1-mini-2025-04-14",
129+
"gpt-4.1-nano-2025-04-14",
130+
"gpt-4o",
131+
"gpt-4o-mini",
132+
"o1-mini",
133+
"o1-preview",
134+
],
126135
"anthropic": [
127136
"claude-3-5-sonnet-20240620",
128137
"claude-3-sonnet-20240229",
@@ -132,8 +141,17 @@
132141
"gemini": [
133142
"gemini/gemini-1.5-flash",
134143
"gemini/gemini-1.5-pro",
144+
"gemini/gemini-2.0-flash-lite-001",
145+
"gemini/gemini-2.0-flash-001",
146+
"gemini/gemini-2.0-flash-thinking-exp-01-21",
147+
"gemini/gemini-2.5-flash-preview-04-17",
148+
"gemini/gemini-2.5-pro-exp-03-25",
135149
"gemini/gemini-gemma-2-9b-it",
136150
"gemini/gemini-gemma-2-27b-it",
151+
"gemini/gemma-3-1b-it",
152+
"gemini/gemma-3-4b-it",
153+
"gemini/gemma-3-12b-it",
154+
"gemini/gemma-3-27b-it",
137155
],
138156
"nvidia_nim": [
139157
"nvidia_nim/nvidia/mistral-nemo-minitron-8b-8k-instruct",

src/crewai/llm.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,26 @@ def flush(self):
8181
"gpt-4o": 128000,
8282
"gpt-4o-mini": 128000,
8383
"gpt-4-turbo": 128000,
84+
"gpt-4.1": 1047576, # Based on official docs
85+
"gpt-4.1-mini-2025-04-14": 1047576,
86+
"gpt-4.1-nano-2025-04-14": 1047576,
8487
"o1-preview": 128000,
8588
"o1-mini": 128000,
8689
"o3-mini": 200000, # Based on official o3-mini specifications
8790
# gemini
8891
"gemini-2.0-flash": 1048576,
92+
"gemini-2.0-flash-thinking-exp-01-21": 32768,
93+
"gemini-2.0-flash-lite-001": 1048576,
94+
"gemini-2.0-flash-001": 1048576,
95+
"gemini-2.5-flash-preview-04-17": 1048576,
96+
"gemini-2.5-pro-exp-03-25": 1048576,
8997
"gemini-1.5-pro": 2097152,
9098
"gemini-1.5-flash": 1048576,
9199
"gemini-1.5-flash-8b": 1048576,
100+
"gemini/gemma-3-1b-it": 32000,
101+
"gemini/gemma-3-4b-it": 128000,
102+
"gemini/gemma-3-12b-it": 128000,
103+
"gemini/gemma-3-27b-it": 128000,
92104
# deepseek
93105
"deepseek-chat": 128000,
94106
# groq
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
interactions:
2+
- request:
3+
body: '{"contents": [{"role": "user", "parts": [{"text": "What is the capital
4+
of France?"}]}], "generationConfig": {"stop_sequences": []}}'
5+
headers:
6+
accept:
7+
- '*/*'
8+
accept-encoding:
9+
- gzip, deflate
10+
connection:
11+
- keep-alive
12+
content-length:
13+
- '131'
14+
content-type:
15+
- application/json
16+
host:
17+
- generativelanguage.googleapis.com
18+
user-agent:
19+
- litellm/1.60.2
20+
method: POST
21+
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-001:generateContent
22+
response:
23+
body:
24+
string: !!binary |
25+
H4sIAAAAAAAC/62RTU+EMBCG7/0VTY9kIQUT1vXqx0njRokxUQ8jDNAILaFdoyH8dwssbNGrTdo0
26+
807nnT7TEUpZCjITGRjU7IK+2Ail3XgOmpIGpbHCHLLBBlpzyp1W59xtisGv4RFLSqQpNMJARVVO
27+
b1qQKVKhqeftoRXa84JXyZy3/XJ/25wcW1XhUK5WGVZzej8nsFxIocsHBK3kkPaY3O/ZosJncauK
28+
plXvQ9M+D3gUxiE/tzs6i+JtyHdkth5N2UFDgXdowFKB5e/Mlqgbk6gPlJfqMFLZTi4Ow5W8O8pG
29+
WQArJYw3f4rqK2spKhetQ93+HSphvkes188Jc/iYVU8zH+Jg/N3hP3nt1l7kOJVpUE/YajFNpMDa
30+
zsiPAu7nFejS5zxkpCc/6so6tIECAAA=
31+
headers:
32+
Alt-Svc:
33+
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
34+
Content-Encoding:
35+
- gzip
36+
Content-Type:
37+
- application/json; charset=UTF-8
38+
Date:
39+
- Tue, 22 Apr 2025 14:25:05 GMT
40+
Server:
41+
- scaffolding on HTTPServer2
42+
Server-Timing:
43+
- gfet4t7; dur=1219
44+
Transfer-Encoding:
45+
- chunked
46+
Vary:
47+
- Origin
48+
- X-Origin
49+
- Referer
50+
X-Content-Type-Options:
51+
- nosniff
52+
X-Frame-Options:
53+
- SAMEORIGIN
54+
X-XSS-Protection:
55+
- '0'
56+
status:
57+
code: 200
58+
message: OK
59+
version: 1
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
interactions:
2+
- request:
3+
body: '{"contents": [{"role": "user", "parts": [{"text": "What is the capital
4+
of France?"}]}], "generationConfig": {"stop_sequences": []}}'
5+
headers:
6+
accept:
7+
- '*/*'
8+
accept-encoding:
9+
- gzip, deflate
10+
connection:
11+
- keep-alive
12+
content-length:
13+
- '131'
14+
content-type:
15+
- application/json
16+
host:
17+
- generativelanguage.googleapis.com
18+
user-agent:
19+
- litellm/1.60.2
20+
method: POST
21+
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-lite-001:generateContent
22+
response:
23+
body:
24+
string: !!binary |
25+
H4sIAAAAAAAC/61RTU+EMBC98yuanhdSiMjq1Y+Txo0SY6J7GGGARmhJ2zUawn+3wMIWvdpDM5n3
26+
Zt7Mm84jhGYgcp6DQU0vyavNENKN/4BJYVAYC8wpm2xBmRN3ep0TW4rBr6GIphWSDFpuoCayILcK
27+
RIaEa7IDxXXwJqhT1y/xfnNSU7LGoVUjc6xnej8TaMEF19UjgpZioD2lDzu6oPBZ3smyVfJ9GNhn
28+
AQuTMIpjFl/EZyxKwuTcm6VHUXrQUOI9GrCOwLI3tS2a1qTyA8WVPIyOJJOK498K3h5hI+3yKySM
29+
N3+a6msryWvXVsdxuzvU3HyPlt68pNTxx6xmmv3xHBt/T/hPWtu1lne8ynSoZ1SaTxcpsbE38qOA
30+
+UUNuvJtd/QZC6nXez+t5iqFggIAAA==
31+
headers:
32+
Alt-Svc:
33+
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
34+
Content-Encoding:
35+
- gzip
36+
Content-Type:
37+
- application/json; charset=UTF-8
38+
Date:
39+
- Tue, 22 Apr 2025 14:25:06 GMT
40+
Server:
41+
- scaffolding on HTTPServer2
42+
Server-Timing:
43+
- gfet4t7; dur=1090
44+
Transfer-Encoding:
45+
- chunked
46+
Vary:
47+
- Origin
48+
- X-Origin
49+
- Referer
50+
X-Content-Type-Options:
51+
- nosniff
52+
X-Frame-Options:
53+
- SAMEORIGIN
54+
X-XSS-Protection:
55+
- '0'
56+
status:
57+
code: 200
58+
message: OK
59+
version: 1
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
interactions:
2+
- request:
3+
body: '{"contents": [{"role": "user", "parts": [{"text": "What is the capital
4+
of France?"}]}], "generationConfig": {"stop_sequences": []}}'
5+
headers:
6+
accept:
7+
- '*/*'
8+
accept-encoding:
9+
- gzip, deflate
10+
connection:
11+
- keep-alive
12+
content-length:
13+
- '131'
14+
content-type:
15+
- application/json
16+
host:
17+
- generativelanguage.googleapis.com
18+
user-agent:
19+
- litellm/1.60.2
20+
method: POST
21+
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-thinking-exp-01-21:generateContent
22+
response:
23+
body:
24+
string: !!binary |
25+
H4sIAAAAAAAC/22QQWuEMBCF7/6KkKNsFt1DKb2221vp0koplD0M66jDxkSSWbCI/71Rq+vS5pCE
26+
eW9meF8XCSFPYHLKgdHLB/EVKkJ04z1o1jAaDsJcCsUGHF+90+lW/2BhbIcmmVUoTtAQgxa2EM8O
27+
zAkFeRHHB3Dk43grV5398j9urvuc1TgMq22Oerb3s0EWZMhXbwjemsH2nr0e5KKSybEN5SSaF4yj
28+
5cVDiS/IEJLDkk82ztYNZ/aM5tFexuT306wVp39ltiHkjZLebf4M9U9hJek1vhXZkBA08feIbv+Z
29+
yRUFvlk6UxjfY/TLY0L0gc7TxKLEOtBRu22iCg2+UlyROZMpFbaNSlK1S2XURz/Fy1P+CAIAAA==
30+
headers:
31+
Alt-Svc:
32+
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
33+
Content-Encoding:
34+
- gzip
35+
Content-Type:
36+
- application/json; charset=UTF-8
37+
Date:
38+
- Tue, 22 Apr 2025 14:25:04 GMT
39+
Server:
40+
- scaffolding on HTTPServer2
41+
Server-Timing:
42+
- gfet4t7; dur=764
43+
Transfer-Encoding:
44+
- chunked
45+
Vary:
46+
- Origin
47+
- X-Origin
48+
- Referer
49+
X-Content-Type-Options:
50+
- nosniff
51+
X-Frame-Options:
52+
- SAMEORIGIN
53+
X-XSS-Protection:
54+
- '0'
55+
status:
56+
code: 200
57+
message: OK
58+
version: 1
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
interactions:
2+
- request:
3+
body: '{"contents": [{"role": "user", "parts": [{"text": "What is the capital
4+
of France?"}]}], "generationConfig": {"stop_sequences": []}}'
5+
headers:
6+
accept:
7+
- '*/*'
8+
accept-encoding:
9+
- gzip, deflate
10+
connection:
11+
- keep-alive
12+
content-length:
13+
- '131'
14+
content-type:
15+
- application/json
16+
host:
17+
- generativelanguage.googleapis.com
18+
user-agent:
19+
- litellm/1.60.2
20+
method: POST
21+
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-04-17:generateContent
22+
response:
23+
body:
24+
string: !!binary |
25+
H4sIAAAAAAAC/2WQT0+EMBDF7/0UTY9k2ewaDerVPzfjRokxMR4mMEBjaUk76BrCd7fAslvcHppm
26+
5s2bvl/HOBcZ6FzmQOjELf/wFc678R56RhNq8o255IsNWDppp9MFby8h3A9DIq2QZ9BIAsVNwR8t
27+
6Ay5dDyKdmCli6K1CCb74/tzddpnjcLBrDY5qlnezwJRSC1d9YLgjB5kr+nzThy7Uue49+UNmxeM
28+
1qJ1UOITEvjkcMwnGmvqhlLzhfrOtGPy68kr4LRoJzeHPhmfcjmZrM5c3b3fKVXIL0DrI4KS9Duy
29+
e3hPRYCBFtYzBhbQElSZtqzo3we37IBrIviG1skJVYm1hxdfrK/iQoGr4sbit8SfeHMZbxPBevYH
30+
O2bXiSICAAA=
31+
headers:
32+
Alt-Svc:
33+
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
34+
Content-Encoding:
35+
- gzip
36+
Content-Type:
37+
- application/json; charset=UTF-8
38+
Date:
39+
- Tue, 22 Apr 2025 14:25:28 GMT
40+
Server:
41+
- scaffolding on HTTPServer2
42+
Server-Timing:
43+
- gfet4t7; dur=20971
44+
Transfer-Encoding:
45+
- chunked
46+
Vary:
47+
- Origin
48+
- X-Origin
49+
- Referer
50+
X-Content-Type-Options:
51+
- nosniff
52+
X-Frame-Options:
53+
- SAMEORIGIN
54+
X-XSS-Protection:
55+
- '0'
56+
status:
57+
code: 200
58+
message: OK
59+
version: 1
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
interactions:
2+
- request:
3+
body: '{"contents": [{"role": "user", "parts": [{"text": "What is the capital
4+
of France?"}]}], "generationConfig": {"stop_sequences": []}}'
5+
headers:
6+
accept:
7+
- '*/*'
8+
accept-encoding:
9+
- gzip, deflate
10+
connection:
11+
- keep-alive
12+
content-length:
13+
- '131'
14+
content-type:
15+
- application/json
16+
host:
17+
- generativelanguage.googleapis.com
18+
user-agent:
19+
- litellm/1.60.2
20+
method: POST
21+
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro-exp-03-25:generateContent
22+
response:
23+
body:
24+
string: !!binary |
25+
H4sIAAAAAAAC/12QT2uEMBDF7/kUIUepi2tZaHttu7fSpZVSKD0MOquhmkgygkX87o26cWM9SJj3
26+
5s/7DYxzkYMqZAGEVjzwL1fhfJj/k6YVoSIn+JIrtmDo6l2+IXg7C2E/NYmsQp5DKwlqrs/8aEDl
27+
yKXlUXQCI20U7UTQOa7v75vrPqNrnIY1usDa20dvEGeppK3eEKxWk+09ez2JVZWqwN6VE+YXzKNF
28+
Z6HEFyRwyWHNJ1qjm5Yy/YPqUXdz8rtlVsBpI++T5GIg7WL+03xzMNc+ua2yDgkGcF1IqCX9zvSe
29+
PzMRgKDNWR4EC3gJqnRXVrQ98T5lF2ALww80Vi6wSmwcvjjdHWJ3Yox9Gye3cXoQbGR/TedYqx4C
30+
AAA=
31+
headers:
32+
Alt-Svc:
33+
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
34+
Content-Encoding:
35+
- gzip
36+
Content-Type:
37+
- application/json; charset=UTF-8
38+
Date:
39+
- Tue, 22 Apr 2025 14:25:30 GMT
40+
Server:
41+
- scaffolding on HTTPServer2
42+
Server-Timing:
43+
- gfet4t7; dur=2418
44+
Transfer-Encoding:
45+
- chunked
46+
Vary:
47+
- Origin
48+
- X-Origin
49+
- Referer
50+
X-Content-Type-Options:
51+
- nosniff
52+
X-Frame-Options:
53+
- SAMEORIGIN
54+
X-XSS-Protection:
55+
- '0'
56+
status:
57+
code: 200
58+
message: OK
59+
version: 1

0 commit comments

Comments
 (0)