A powerful VS Code extension that provides AI-powered code completion similar to GitHub Copilot, but with support for multiple API keys from various free AI providers.
Features
Multi-Provider Support: Works with OpenAI, Anthropic, Groq, DeepSeek, Mistral, and Cohere
Multiple API Keys: Add multiple API keys per provider for load balancing and redundancy
Inline Code Completion: Provides intelligent code suggestions as you type
Configurable Settings: Adjust temperature, max tokens, and debounce delay
Status Bar Indicator: See the extension status at a glance
Cache System: Improves performance by caching completions
Supported AI Providers
OpenAI - GPT models
Anthropic - Claude models
Groq - Fast inference with Llama models
DeepSeek - Specialized in code completion
Mistral - Efficient language models
Cohere - Command models
Installation
Clone this repository
Run npm install
Run npm run compile
Open VS Code
Go to Extensions > Develop Extensions
Click "Install from VSIX" or use "F5" to run in development mode
Configuration
Adding API Keys
Open Command Palette (Ctrl+Shift+P)
Type "Haileopia: Manage API Keys"
Select "Add API Key"
Choose your provider and enter your API key
You can add multiple API keys per provider. The extension will randomly select one to distribute the load.
Settings
haileopia.enabled: Enable/disable the extension
haileopia.maxTokens: Maximum tokens for completion (default: 1000)
haileopia.temperature: Temperature for AI responses (0-1, default: 0.1)
haileopia.debounceDelay: Debounce delay in milliseconds (default: 500)
Commands
Haileopia: Toggle AI Completion - Enable/disable code completion
Haileopia: Manage API Keys - Add, view, or remove API keys
Haileopia: Clear Cache - Clear the completion cache
Click the status bar item to toggle the extension on/off
Development
Building
npm install
npm run compile
Testing
npm run test
Running in Development
Open this folder in VS Code
Press F5 to launch a new VS Code window with the extension loaded
Make changes to the source code
Press Ctrl+R in the development window to reload
File Structure
src/
extension.ts # Main extension entry point
completionProvider.ts # Inline completion logic
aiProviders.ts # AI provider implementations
apiKeyManager.ts # API key management
statusBarManager.ts # Status bar functionality
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
MIT License
Troubleshooting
Extension not working
Check that you have configured at least one API key
Verify the extension is enabled (status bar should show "Haileopia")
Check the developer console for error messages
API errors
Verify your API keys are correct
Check if you have exceeded rate limits
Try adding multiple API keys for load balancing
Performance issues
Increase the debounce delay in settings
Clear the cache using the command
Reduce max tokens setting
Support
For issues and feature requests, please open an issue on the GitHub repository.