Feature: Add Gemini LLM Provider Support to AI Agent Configuration
- Dominant language
- Python
- Stars
- 451
- Forks
- 707
- Avg merge
- 22h 59m
- Merged PRs (30d)
- 91
Description
**Is your feature request related to a problem? Please describe.**
Currently, the `get_llm()` configuration for the CrewAI agents only supports OpenAI and Anthropic. To expand the ecosystem and give users more flexibility, it would be highly beneficial to support Google's Gemini models as well.
**Describe the solution you'd like**
I propose adding a `gemini` provider branch to the `apps/ai/common/llm_config.py` file. This would:
1. Map `LLM_PROVIDER=gemini` to initialize the CrewAI LLM instance.
2. Securely pull from `GEMINI_MODEL_NAME` (defaulting to `gemini-1.5-flash` or similar) and `GEMINI_API_KEY` environment variables.
Additionally, while setting up the local Windows environment, I noticed a few minor backward-compatibility adjustments that can be grouped with this:
* Updating deprecated `langchain.text_splitter` imports to `langchain_text_splitters`.
* Adjusting `datetime.UTC` (Python 3.11+) to `datetime.timezone.utc` for broader Python 3.10 compatibility.
**Describe alternatives you've considered**
N/A - Native integration is the standard approach used for the existing providers.
**Additional context**
I have already developed the implementation locally, achieved 100% test coverage for the configuration logic, and verified the environment fixes.
**Could a maintainer please assign this issue to me so I can open the Pull Request?**
Contributor guide
Research direction
Start in apps/ai/common/llm_config.py and compare the existing OpenAI and Anthropic provider branches. Add the Gemini provider configuration using GEMINI_MODEL_NAME and GEMINI_API_KEY, then verify the configuration tests and the noted langchain_text_splitters and timezone.utc compatibility adjustments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100