Repository navigation
feat(windows): add Google Gemini chat provider support - #166
Open
AlphaIsYour wants to merge 1 commit into
Open
AlphaIsYour wants to merge 1 commit into
AlphaIsYour wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Google Gemini as an alternative chat provider in the Windows and Linux Tauri build, aligning with the macOS implementation.
Closes #75
Motivation
On macOS, Coucou already supports Google AI / Gemini alongside Claude, using Google's OpenAI-compatible endpoint. On Windows and Linux, however, the chat was hardcoded to Anthropic only. Users without an Anthropic API key can now interact with Mochi using their Google Gemini API key (including the free tier available via Google AI Studio).
Key Changes
windows/src-tauri/src/gemini.rs:https://generativelanguage.googleapis.com/v1beta/openai/chat/completions).windows/src-tauri/src/secrets.rs:google-api-keytoKNOWN_KEYS(stored securely in Windows Credential Manager / Secret Service, never written to disk).windows/src-tauri/src/settings.rs&windows/src-tauri/src/lib.rs:chat_provider(default:"anthropic") andgoogle_model(default:"gemini-2.0-flash") with serde defaults to preserve backward compatibility for existing configurations.chat_senddynamically based on the configured provider.windows/src/core/state.ts&windows/src/settings/main.ts:Claude (Anthropic)vsGoogle Gemini) under Settings.gemini-2.5-pro,gemini-2.0-flash,gemini-2.0-flash-lite,gemini-1.5-flash,gemini-1.5-pro).Testing
cargo test: all 10/10 tests passing (including new Gemini unit tests).cargo check --release: passes with no warnings.tsc --noEmit: 0 errors.npm run build: built production bundle cleanly in ~2s.