Thank you for your interest in contributing to ExLLM! This document provides guidelines for contributing to the project.
- Fork the repository and clone your fork locally
- Install dependencies:
mix deps.get - Run the tests:
mix testto ensure everything works - Create a feature branch:
git checkout -b feature/your-feature-name
- Elixir 1.14+
- Erlang/OTP 25+
# Run all tests
mix test
# Run specific test categories
mix test.unit # Unit tests only
mix test.integration # Integration tests (requires API keys)
mix test.fast # Fast tests (excludes integration/external)
# Run provider-specific tests
mix test.anthropic
mix test.openai
mix test.gemini# Format code
mix format
# Run linter
mix credo
# Run type checker
mix dialyzer- Follow existing code patterns and conventions
- Use
mix formatto ensure consistent formatting - Add typespecs for public functions
- Write comprehensive documentation
- Follow the
ExLLM.function_name(provider, ...args)pattern for new unified API functions
- Write tests for all new functionality
- Ensure tests pass without requiring API keys (use mocks/fixtures)
- Add integration tests when appropriate (tagged with
@tag :live_api) - Target 90%+ test coverage for new code
- Update relevant documentation when adding features
- Add examples to function documentation
- Update CHANGELOG.md following Keep a Changelog format
Follow Conventional Commits:
feat(provider): add support for new model
fix(streaming): resolve connection timeout issue
docs(api): update unified API examples
- Create provider module in
lib/ex_llm/providers/ - Implement the ExLLM.Adapter behavior
- Add configuration in
config/models/provider.yml - Update capabilities registry in
lib/ex_llm/api/capabilities.ex - Add tests following existing provider test patterns
- Update documentation with provider-specific details
- Ensure all tests pass:
mix test - Run code quality checks:
mix credo && mix dialyzer - Update documentation as needed
- Add changelog entry for user-facing changes
- Create pull request with clear description of changes
- Respond to review feedback promptly
- Tests pass locally
- Code follows style guidelines
- Documentation updated
- Changelog updated (for user-facing changes)
- Dialyzer passes without new errors
When reporting issues:
- Use the appropriate issue template
- Provide clear reproduction steps
- Include relevant version information
- Add provider and model details if applicable
- Open a GitHub Discussion for general questions
- Check existing issues before creating new ones
- Join our community discussions for help
Thank you for contributing to ExLLM! 🚀