Thanks for your interest in contributing! llm_bridge is a small, vendor-neutral
LLM client library. Contributions of all kinds are welcome: bug reports,
documentation, new provider adapters, and tests.
By participating, you agree to abide by our Code of Conduct.
- Report a bug — open a bug report issue.
- Request a feature — open a feature request issue.
- Submit a change — follow the fork-based pull request flow below.
- Report a vulnerability — see SECURITY.md (do not open a public issue).
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/macOS
# source .venv/bin/activate
pip install -e ".[dev]"pytestTests run fully offline using the mock and callable providers — no network
access, no credentials, and no vendor SDKs required.
- Create a module under
src/llm_bridge/providers/implementingllm_bridge.base.LLMClient(you only needmodelandchat). - Expose a
build(config: dict) -> LLMCliententry point. Validate required fields before importing any heavy/optional SDK. - Register it in
src/llm_bridge/registry.py— eagerly if it is dependency-free, lazily if it needs an optional dependency. - If it needs a third-party SDK, add it as an optional extra in
pyproject.tomland import it lazily inside the client (with a clear error message pointing at the extra). - Add an offline test (stub the transport/SDK where needed).
- Keep the core dependency-free. Required
dependenciesinpyproject.tomlmust stay empty; vendor SDKs are always optional extras. - No secrets in the repo. Read credentials from environment variables.
- Fork the repository to your GitHub account.
- Create a branch from
mainwith a descriptive name (e.g.feat/add-cohere-provider). - Make your changes following the code style below.
- Add offline tests for any new functionality (stub the SDK/transport — no network).
- Update documentation if your changes affect the public interface or providers.
- Commit using Conventional Commits (
feat:,fix:,docs:,test:,refactor:,ci:,chore:). - Push your branch and open a Pull Request against
main. - Sign the CLA when prompted by the CLA Assistant bot.
- Create a branch from
main(no fork needed if you are a member of the org). - Follow steps 3–7 above and request review from the team in CODEOWNERS.
All pull requests must pass the automated checks before merge:
- CI (
ci) — ruff + black + mypy + pytest matrix (3.9–3.12) with coverage - Security scan (
codeql,dep-scan) — SAST and dependency audit - License check (
license-check) — SPDX headers + core stays dependency-free - Pattern check (
pattern-check) — no internal URLs, IPs, or corporate email addresses - CLA signed (for external contributors)
At least 1 maintainer approval is required, all conversations resolved, and
the branch up to date with main.
- PEP 8, formatted with Black (line length 100).
- Linted with Ruff and type-checked with mypy.
- Every source file must start with the SPDX header:
# Copyright (c) 2026 Santander Group # SPDX-License-Identifier: Apache-2.0
- Run the full toolchain before submitting:
ruff check . && black --check . && mypy src/llm_bridge && pytest
By submitting a pull request, you agree to the terms of our Contributor License Agreement. The CLA Assistant bot will check your PR and ask you to sign if you have not already. The CLA ensures contributions can be distributed under the project's Apache 2.0 license.