Add Gemini AI provider#16
Open
alon710 wants to merge 4 commits into
Open
Conversation
Adds Google Gemini alongside Claude and Ollama for transaction categorization. Uses @google/genai with gemini-2.5-flash and stores the API key encrypted under provider-specific setting keys so it can coexist with a Claude key. Wires the new option through the setup wizard, settings page, factory, and i18n. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- always require a key on save and drop the leave-blank-to-keep-stored UX, removing the hasStoredKey helper, hasClaudeApiKey/hasGeminiApiKey flags, and the i18n hint pair this required - extract shared parseCategorizationResponse used by ClaudeProvider and GeminiProvider - merge ClaudeConfig and GeminiConfig in the setup wizard into a single ApiKeyConfig with a children slot for provider-specific extras - dispatch friendlyAIError on the provider argument instead of cascading regex matches over raw error text - drop redundant Gemini model whitelist checks in the factory and settings writer Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Stable Gemini models
Based on the Gemini API models docs: https://ai.google.dev/gemini-api/docs/models
Included stable text models:
Validation