void icon indicating copy to clipboard operation
void copied to clipboard

feat(providers): add support for GitHub Models

Open Cartine-dev opened this issue 6 months ago • 0 comments

Refs: #522

📝 Description

This pull request introduces support for GitHub Models as a new LLM provider in Void. This directly addresses the request to use models provided by GitHub, allowing users on free or student plans to access and experiment with a variety of powerful AI models using their GitHub account for authentication.

The implementation leverages the existing OpenAI-compatible framework, making it a seamless and maintainable addition to the current provider architecture.

✨ Features Implemented

  • New githubModels Provider: A new provider has been added, configured to use the official https://models.github.ai/inference endpoint.
  • PAT Authentication: Users can authenticate by providing a GitHub Personal Access Token (PAT) with models:read permissions in the settings. Clear instructions are provided in the UI.
  • Predefined Model List: A list of available GitHub Models (e.g., openai/gpt-4.1, deepseek/deepseek-r1, xai/grok-3) is included, along with their respective capabilities.
  • Custom Rate Limit Handling: Specific error handling has been implemented for GitHub's 429 Too Many Requests status code. The system now provides user-friendly messages for different rate-limiting scenarios (per minute, per day, concurrent requests), guiding the user on how to proceed.

🧪 How to Test

  1. Pull this branch and run the application.
  2. Navigate to Void Settings > Providers.
  3. Click "Add Provider" and select "GitHub Models".
  4. Follow the instructions to create a GitHub Personal Access Token (PAT) with models:read scope.
  5. Enter the generated PAT into the API Key field.
  6. Navigate to a feature, such as Chat, and select one of the newly available models (e.g., openai/gpt-4.1 (githubmodels)).
  7. Send a prompt and verify that a valid response is received.
  8. (Optional) To test the rate-limiting, you can make rapid successive requests to trigger a 429 error and verify that the specific error message is displayed.

✅ Contributor Checklist

  • [x] I have read and followed the project's contribution guidelines.
  • [x] My code follows the code style of this project.
  • [x] I have tested my changes locally.
  • [x] My commit messages are formatted according to the Conventional Commits specification.

Hey @animeshlego5 and @andrewpareles, I've implemented the support for GitHub Models as discussed in issue #522. This approach integrates with the existing OpenAI-compatible infrastructure and should be straightforward to review. Let me know your thoughts!

Cartine-dev avatar Jun 18 '25 03:06 Cartine-dev