Skip to content

Add a direct Google Gemini provider (opt-in via config)#1

Open
isene wants to merge 1 commit into
nathanmarlor:mainfrom
isene:gemini-provider
Open

Add a direct Google Gemini provider (opt-in via config)#1
isene wants to merge 1 commit into
nathanmarlor:mainfrom
isene:gemini-provider

Conversation

@isene

@isene isene commented Jul 9, 2026

Copy link
Copy Markdown

Adds a second image/vision provider so the daemon can talk straight to Google's Gemini API (AI Studio generateContent) instead of going through OpenRouter.

What

  • New config key: [imagegen] provider = "gemini" | "openrouter".
  • Default is openrouter — existing configs and behavior are unchanged.
  • With provider = "gemini", api_key is a Google AI Studio key and requests go to generativelanguage.googleapis.com/.../generateContent; both the illustration and the handwriting-Q&A paths are handled.

Why

Lets people who already have (or would rather use) a Google AI Studio key skip the OpenRouter account and middleman. Same underlying Gemini image models.

How

imagegen.rs grows a small Provider enum; the client builds either the OpenRouter chat-completions request or the Gemini generateContent request and parses each response shape. main.rs parses the new provider key; the default keeps OpenRouter.

Built and running on a real reMarkable 2. Kept the change self-contained and opt-in so it's easy to take or leave. Thanks for inkling — it's a lovely project.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant