Skip to content

[Feature] [integration] [java] Integrate built-in Google Gemini chat model #648

@section9-lab

Description

@section9-lab

Search before asking

  • I searched in the issues and found nothing similar.

Description

Flink Agents currently provides built-in chat model integrations for OpenAI, Anthropic, Azure AI, Bedrock and Ollama, but Google Gemini is missing.

Although the Gemini API offers an OpenAI-compatible endpoint, the native Gemini protocol differs in several places that the existing OpenAI module cannot fully cover (e.g. systemInstruction
instead of a system role, functionCall/functionResponse parts without a tool_call_id, and Vertex AI authentication). A dedicated module is therefore preferable.

This proposes adding integrations/chat-models/gemini/ (Java) using the official google-genai SDK, which supports both Gemini AI Studio and Vertex AI through a single client. Scope of this
issue: text + function calling on the Java side. Multimodal, streaming and the Python counterpart will be tracked as follow-ups.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

feature[Issue Type] New features or improvements to existing features.priority/majorDefault priority of the PR or issue.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions