refactor: replace Phind with OpenRouter as the default AI provider#132
Merged
Conversation
- Updated configuration files to set OpenRouter as the default AI provider. - Removed references to the deprecated Phind provider in the codebase. - Adjusted README and documentation to reflect the changes in AI provider options. - Added new settings for OpenRouter models in the configuration. - Updated tests to ensure compatibility with the new provider setup.
• Implement the Gemini AI provider in `pkg/ai/gemini.go` supporting both OAuth and API key authentication • Update default configuration in `.goji.json` and `pkg/config` to prioritize Gemini as the primary AI provider • Add extensive unit tests in `pkg/ai/gemini_test.go` to ensure reliable interaction with the Gemini API • Update `README.md` with setup guides for Google Cloud authentication and required environment variables Signed-off-by: Zine Moualhi 🇵🇸 <zmoualhi@outlook.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #132 +/- ##
===========================================
- Coverage 71.37% 56.94% -14.44%
===========================================
Files 18 18
Lines 1488 1765 +277
===========================================
- Hits 1062 1005 -57
- Misses 344 669 +325
- Partials 82 91 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
• Update the default Gemini model to "gemini-2.5-flash-lite" in the `.goji.json` configuration file for potentially better performance or cost-effectiveness. • Introduce retry logic with exponential backoff for transient API errors (e.g., 503, 429, network timeouts) in `pkg/ai/gemini.go` to enhance robustness. • Reduce the HTTP client timeout from 30 seconds to 20 seconds and add a context timeout of 15 seconds for API requests to ensure faster failure on unresponsive services. • Add `MaxOutputTokens` to the `GeminiGenerationConfig` to limit response length, improving efficiency for generating concise outputs like commit messages. Signed-off-by: Zine Moualhi 🇵🇸 <zmoualhi@outlook.com>
Signed-off-by: Zine Moualhi 🇵🇸 <zmoualhi@outlook.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.
Fixes #
Proposed Changes
Readiness Checklist
Author/Contributor
Reviewing Maintainer
breakingif this is a large fundamental changeautomation,bug,documentation,enhancement,infrastructure, orperformance