4.1 KiB
Contributing to LLM Proxy Server
Thank you for your interest in contributing to the LLM Proxy Server! This document provides guidelines and instructions for contributing to the project.
Table of Contents
- Getting Started
- Development Setup
- Making Changes
- Submitting Changes
- Code Style
- Testing
- Reporting Issues
- Feature Requests
Getting Started
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/praveentcom/llm-proxy-server.git cd llm-proxy-server - Set up your development environment (see below)
- Create a new branch for your changes:
git checkout -b feature/your-feature-name
Development Setup
Prerequisites
- Node.js 18 or higher
- PostgreSQL (for testing the database integration)
- npm or yarn
Installation
-
Install dependencies:
npm install -
Set up environment variables:
cp .env.example .env # Edit .env with your configuration -
Build the project:
npm run build
Running in Development Mode
npm run dev
Making Changes
Code Style
- Follow TypeScript best practices
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions focused and single-purpose
- Use proper error handling
Testing
Currently, the project doesn't have automated tests. When adding new features:
- Test your changes manually
- Consider adding integration tests for database operations
- Test both streaming and non-streaming responses
Documentation
- Update README.md if you add new features
- Add inline comments for complex code
- Update this CONTRIBUTING.md if you add new development processes
Submitting Changes
Pull Request Process
-
Update your fork with the latest changes:
git fetch upstream git rebase upstream/main -
Commit your changes with clear, descriptive messages:
git commit -m "feat: add support for custom cost models" -
Push to your fork:
git push origin feature/your-feature-name -
Create a Pull Request on GitHub with:
- Clear title and description
- Links to any related issues
- Screenshots if applicable
- Testing instructions
Pull Request Guidelines
- One feature per PR - separate features into different PRs
- Update documentation - include any necessary changes to README.md
- Test thoroughly - ensure your changes work as expected
- Follow the code style - maintain consistency with existing code
- Include tests - add tests for new functionality if possible
Code Review
All pull requests will be reviewed by maintainers. Please be responsive to feedback and make requested changes in a timely manner.
Reporting Issues
Bug Reports
When reporting bugs, please include:
-
Environment details:
- Node.js version
- PostgreSQL version (if applicable)
- Operating system
-
Steps to reproduce:
- Clear, step-by-step instructions
- Sample code if applicable
-
Expected behavior:
- What should happen
-
Actual behavior:
- What actually happens
-
Error messages:
- Full error stack traces
Security Issues
Please report security vulnerabilities privately to mail@praveent.com. Do not create public issues for security problems.
Feature Requests
We welcome feature requests! Please:
- Check existing issues first to avoid duplicates
- Create a new issue with:
- Clear description of the feature
- Use case and motivation
- Implementation suggestions if you have any
- Potential alternatives you've considered
Community
- Join our discussions in GitHub issues
- Be respectful and inclusive
- Help others when you can
- Celebrate milestones and successes
License
By contributing to this project, you agree that your contributions will be licensed under the MIT License.