Thank you for your interest in contributing to LangDB AI Gateway! We welcome contributions from the community and are excited to have you on board.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/ai-gateway.git cd ai-gateway
- Add the upstream repository as a remote:
git remote add upstream https://github.com/langdb/ai-gateway.git
- Rust toolchain (latest stable version)
- Docker (optional, for containerized development)
- API keys for LLM providers you plan to use
-
Create a
.env
file with necessary API keys:LANGDB_OPENAI_API_KEY=your-openai-key-here RUST_LOG=debug
-
Build the project:
RUSTFLAGS="--cfg tracing_unstable --cfg aws_sdk_unstable" cargo build
-
Run tests:
cargo test
-
Create a new branch for your changes:
git checkout -b feature/your-feature-name
-
Make your changes following these guidelines:
- Follow the existing code style and formatting
- Add tests for new functionality
- Update documentation as needed
- Keep commits focused and atomic
- Write clear commit messages
-
Run the test suite to ensure nothing is broken:
cargo test cargo clippy
-
Push your changes to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request with the following information:
- Clear title and description
- Reference any related issues
- List notable changes
- Include any necessary documentation updates
-
Respond to any code review feedback
When reporting issues, please include:
- A clear description of the problem
- Steps to reproduce the issue
- Expected vs actual behavior
- Version information:
- Rust version
- AI Gateway version
- Operating system
- Any relevant configuration
By contributing to LangDB AI Gateway, you agree that your contributions will be licensed under its project license.
Thank you for contributing to LangDB AI Gateway! Your efforts help make this project better for everyone.