Skip to content

feat(gemini): added support for Google Gemini#32

Open
carlwilk32 wants to merge 1 commit into
agenticloops-ai:mainfrom
carlwilk32:add-gcp-vertex-gemini-support
Open

feat(gemini): added support for Google Gemini#32
carlwilk32 wants to merge 1 commit into
agenticloops-ai:mainfrom
carlwilk32:add-gcp-vertex-gemini-support

Conversation

@carlwilk32

Copy link
Copy Markdown

No description provided.

@amrynsky

amrynsky commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for adding Google Gemini support! Great contribution. I've left several comments with suggestions.

Comment thread SETUP.md
# Edit .env and add your API keys
# ANTHROPIC_API_KEY=your_anthropic_key_here
# OPENAI_API_KEY=your_openai_key_here
# GEMINI_API_KEY=your_openai_api_key_here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use GOOGLE_API_KEY that is also accepted by API

Suggested change
# GEMINI_API_KEY=your_openai_api_key_here
# GOOGLE_API_KEY=your_google_ai_api_key_here

Comment thread SETUP.md
- **API Keys** from one or both providers:
- **Anthropic**: [console.anthropic.com](https://console.anthropic.com/)
- **OpenAI**: [platform.openai.com](https://platform.openai.com/api-keys)
- **Google Gemini**: [aistudio.google.com](https://aistudio.google.com/api-keys)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Google Gemini**: [aistudio.google.com](https://aistudio.google.com/api-keys)
- **Google AI**: [aistudio.google.com](https://aistudio.google.com/api-keys)

Comment thread README.md
**Module not found?** Run `uv sync` in the lesson directory.

**API errors or authentication failures?** You need API keys from [Anthropic](https://console.anthropic.com/), [OpenAI](https://platform.openai.com/), or both, depending on which examples you run. See [SETUP.md](SETUP.md) for details.
**API errors or authentication failures?** You need API keys from [Anthropic](https://console.anthropic.com/), [OpenAI](https://platform.openai.com/),[Google Gemini](https://aistudio.google.com/api-keys) or all of them, depending on which examples you run. See [SETUP.md](SETUP.md) for details.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**API errors or authentication failures?** You need API keys from [Anthropic](https://console.anthropic.com/), [OpenAI](https://platform.openai.com/),[Google Gemini](https://aistudio.google.com/api-keys) or all of them, depending on which examples you run. See [SETUP.md](SETUP.md) for details.
**API errors or authentication failures?** You need API keys from [Anthropic](https://console.anthropic.com/), [OpenAI](https://platform.openai.com/), [Google AI](https://aistudio.google.com/api-keys) or all of them, depending on which examples you run. See [SETUP.md](SETUP.md) for details.

Comment thread .env.example

# Google Vertex API Key
# Get yours at: https://aistudio.google.com/api-keys
GEMINI_API_KEY=your_openai_api_key_here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use GOOGLE_API_KEY that takes precedence over GEMINI_API_KEY

Suggested change
GEMINI_API_KEY=your_openai_api_key_here
GOOGLE_API_KEY=your_google_ai_api_key_here

| ![Anthropic](../../common/badges/anthropic.svg) | [01_llm_call_anthropic.py](01_llm_call_anthropic.py) | Basic Claude Messages API calls |
| ![OpenAI](../../common/badges/openai.svg) | [02_llm_call_openai.py](02_llm_call_openai.py) | Basic OpenAI Responses API calls |
| ![LiteLLM](../../common/badges/litellm.svg) | [03_llm_call_litellm.py](03_llm_call_litellm.py) | Unified interface for any provider |
| ![Gemini](../../common/badges/gemini.svg) | [04_llm_call_gemini.py](03_llm_call_gemini.py) | Basicc Google Gemini API calls |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| ![Gemini](../../common/badges/gemini.svg) | [04_llm_call_gemini.py](03_llm_call_gemini.py) | Basicc Google Gemini API calls |
| ![Gemini](../../common/badges/gemini.svg) | [04_llm_call_gemini.py](04_llm_call_gemini.py) | Basic Google Gemini API calls |

thinking_config=types.ThinkingConfig(thinking_level="low"),
system_instruction=self.system_prompt,
safety_settings=[
types.SafetySetting(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really required for the simple API call?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants