Skip to content

refactor: replace Phind with OpenRouter as the default AI provider#132

Merged
muandane merged 4 commits into
mainfrom
deprecate/phind-shutdown
Jan 19, 2026
Merged

refactor: replace Phind with OpenRouter as the default AI provider#132
muandane merged 4 commits into
mainfrom
deprecate/phind-shutdown

Conversation

@muandane
Copy link
Copy Markdown
Owner

@muandane muandane commented Jan 19, 2026

Fixes #

Proposed Changes

  1. Updated configuration files to set OpenRouter as the default AI provider.
  2. Removed references to the deprecated Phind provider in the codebase.
  3. Adjusted README and documentation to reflect the changes in AI provider options.
  4. Added new settings for OpenRouter models in the configuration.
  5. Updated tests to ensure compatibility with the new provider setup.

Readiness Checklist

Author/Contributor

  • Add entry to the CHANGELOG listing the change and linking to the corresponding issue (if appropriate)
  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

- 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
Copy link
Copy Markdown

codecov Bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 28.63071% with 344 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.94%. Comparing base (5dd34d8) to head (133c020).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ai/gemini.go 30.04% 267 Missing and 17 partials ⚠️
cmd/draft.go 13.04% 57 Missing and 3 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

• 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>
@muandane muandane merged commit 8a30f29 into main Jan 19, 2026
1 of 3 checks passed
@muandane muandane deleted the deprecate/phind-shutdown branch January 19, 2026 14:13
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