feat(providers): add support for GitHub Models
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
githubModelsProvider: A new provider has been added, configured to use the officialhttps://models.github.ai/inferenceendpoint. - PAT Authentication: Users can authenticate by providing a GitHub Personal Access Token (PAT) with
models:readpermissions 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 Requestsstatus 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
- Pull this branch and run the application.
- Navigate to Void Settings > Providers.
- Click "Add Provider" and select "GitHub Models".
- Follow the instructions to create a GitHub Personal Access Token (PAT) with
models:readscope. - Enter the generated PAT into the API Key field.
- Navigate to a feature, such as Chat, and select one of the newly available models (e.g.,
openai/gpt-4.1 (githubmodels)). - Send a prompt and verify that a valid response is received.
- (Optional) To test the rate-limiting, you can make rapid successive requests to trigger a
429error 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!