-
Notifications
You must be signed in to change notification settings - Fork 2
feat(gemini): add Google Gemini provider #1592
Copy link
Copy link
Labels
epicMilestone-level tracking issueMilestone-level tracking issue
Description
Summary
Add Google Gemini as a first-class LLM provider in zeph-llm, supporting chat, streaming, tool use, vision, and embeddings.
Motivation
Google Gemini offers competitive models (2.5-pro, 2.5-flash, 2.0-flash) with 1M token context windows, native function calling, vision, and thinking capabilities. Adding Gemini as a provider expands Zeph's multi-provider coverage and enables orchestrator/router configurations that include Google's model family.
API Reference
- Chat: https://ai.google.dev/gemini-api/docs/text-generation
- Embeddings: https://ai.google.dev/gemini-api/docs/embeddings
- Function calling: https://ai.google.dev/gemini-api/docs/function-calling
- Models: https://ai.google.dev/gemini-api/docs/models
Key API Characteristics
- Base URL:
https://generativelanguage.googleapis.com/v1beta - Auth: API key via
?key=query parameter - Message format:
contents[].parts[](not OpenAI-compatible) - System prompt: separate
systemInstructionfield - Role names:
user/model(notassistant) - Streaming:
?alt=ssequery param (SSE) - Tool format:
functionDeclarations/functionCall/functionResponse - Embeddings:
embedContentendpoint with task type parameter
Implementation Phases
- Phase 1: Basic chat (generateContent) -- feat(gemini): Phase 1 -- basic chat (generateContent) #1593
- Phase 2: Streaming support (streamGenerateContent + SSE) -- feat(gemini): Phase 2 -- streaming support (SSE) #1594
- Phase 3: Tool use / function calling -- feat(gemini): Phase 3 -- tool use / function calling #1595
- Phase 4: Vision / multimodal (inlineData parts) -- feat(gemini): Phase 4 -- vision / multimodal (inlineData) #1596
- Phase 5: Embeddings (embedContent) -- feat(gemini): Phase 5 -- embeddings (embedContent) #1597
- Phase 6: List models + remote model discovery -- feat(gemini): Phase 6 -- list models + remote discovery #1598
Config Format
[llm]
provider = "gemini"
[llm.gemini]
model = "gemini-2.5-flash"
max_output_tokens = 8192
embedding_model = "text-embedding-004"Vault key: ZEPH_GEMINI_API_KEY
Detailed Plan
See .local/plan/gemini-provider.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
epicMilestone-level tracking issueMilestone-level tracking issue