[BUG] Native Gemini provider ignores timeout, so requests never time out
Maintainer thường phản hồi trong vòng 1 ngày
@abhishekacharya200 đang làm issue này rồi.
Từ ngày 24/11/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start in crewai/llms/providers/gemini/completion.py: inspect GeminiCompletion, how BaseLLM moves timeout into additional_params, and where genai.Client is built with http_options. Check the linked PRs #9742 and #9748 before writing anything, since work is already under way. Done means http_options.timeout is set in milliseconds for call() and acall(), to_config_dict() keeps timeout, and the reproduction from the issue plus provider tests pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
LLM(model="gemini/...", timeout=120) builds a GeminiCompletion, but the timeout is never passed to the Google Gen AI client. GeminiCompletion has no timeout field, so BaseLLM moves the value into additional_params, and the Gemini provider never reads additional_params. The client is created with no http_options.timeout, so a slow or stuck request waits forever.
The LLM docs use a Gemini model as the example for timeout=120, and the OpenAI and Anthropic providers both honor it.
Steps to Reproduce
from unittest.mock import patch
from crewai import LLM
with patch("crewai.llms.providers.gemini.completion.genai") as genai:
llm = LLM(model="gemini/gemini-2.0-flash-001", api_key="x", timeout=30)
print(type(llm).__name__) # GeminiCompletion
print(genai.Client.call_args.kwargs) # no http_options
print(llm.additional_params) # {'timeout': 30}
Expected behavior
The client is built with http_options.timeout=30000 (the SDK takes milliseconds), and to_config_dict() keeps timeout.
Actual behavior
The timeout is silently dropped. Calls through call() and acall() have no client side timeout.
Possible Solution
Add a timeout field to GeminiCompletion and merge it into client_params["http_options"] when building genai.Client. In Vertex AI Express mode, merge api_version="v1" into the same options instead of replacing them.
Note for maintainers: this was prepared with help from an AI coding agent and checked by me, so per CONTRIBUTING please add the llm-generated label (I don't have permission to add labels).
- Ngôn ngữ chính
- Python
- Star
- 61.2k
- Fork
- 9.2k
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 180
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của crewAIInc/crewAI
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[FEATURE] Add Straitly as a native OpenAI-compatible LLM providerCó thể đã có người làm @HashimSyedUBC đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Native OpenAI sync streaming with response_model returns an empty string and emits no completed event when the parse is missingCó thể đã có người làm @basil-k-aji-dev đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Native Azure provider ignores the seed settingCó thể đã có người làm @basil-k-aji-dev đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
crewAIInc/crewAI#9787 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] LiteLLM path reports 0 cached and reasoning tokens in the usage summaryCó thể đã có người làm @basil-k-aji-dev đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của crewAIInc/crewAI
Issue tương tự
-
[BUG] SMTP listener now binds to EMAIL_PORT instead of 2525 since the gunicorn switch 5.0.3-ls373Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
linuxserver/docker-healthchecks#137 · 1 bình luận ·
-
RequirementAgent treats list -> add -> list as a tool call cycle and drops the second list call (Python)Có thể đã có người làm @chaitanya0305 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
i-am-bee/beeai-framework#2049 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
fedora-infra/anitya#2272 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
unitaryfoundation/mitiq#3205 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
[Bug]: Index worker test drops empty Git config values on WindowsCó thể đã có người làm @xiaoyesoso đã nhận hôm nay. Đang mởtriage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
agentscope-ai/agentscope#4377 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày