Contributing¶
Thanks for contributing to llm-gateway-bench.
This guide focuses on:
- setting up a development environment
- running tests and linters
- contributing docs
If you are looking for the repository-level contributing doc, also see
CONTRIBUTING.mdat the repo root.
Development setup¶
Prerequisites¶
- Python 3.9+
- Git
Optional but recommended:
uv(fast Python env management)
Clone¶
Create an environment¶
Using venv:
python -m venv .venv
# macOS/Linux
source .venv/bin/activate
# Windows PowerShell
.\.venv\Scripts\Activate.ps1
Install editable + dev deps:
Run tests¶
With coverage:
Linting & formatting¶
- Format:
black - Lint:
ruff - Types:
mypy
Suggested commands:
Working on documentation¶
Build docs locally¶
Open http://127.0.0.1:8000.
Documentation style¶
- Prefer short sections and runnable snippets
- Use stable relative links between pages
- Avoid provider marketing claims; document steps + gotchas
Adding or improving providers¶
Provider defaults live in src/llm_gateway_bench/providers.py (PROVIDER_DEFAULTS).
Before adding a provider:
- Verify the endpoint is OpenAI-compatible
- Confirm the correct base URL
- Identify the environment variable name for API key
- Add notes to Providers
PR checklist¶
- [ ] Tests pass (
pytest) - [ ] Lint passes (
ruff check .) - [ ] Formatting applied (
black .) - [ ] Updated docs for user-facing changes
- [ ] Changelog entry if behavior changes
Commit messages¶
Use conventional, readable messages. Examples:
docs: improve provider setup examplesfeat: add report json outputfix: handle streaming usage missing
Security and secrets¶
- Never commit real API keys
- Use
.envlocally and GitHub Secrets in CI
Getting help¶
Open an issue with:
- provider name + base URL
- model id
- a minimal command that reproduces the bug
- sanitized error output