Thanks for your interest in contributing to opencode-llm-proxy.
git clone https://github.com/KochC/opencode-llm-proxy.git
cd opencode-llm-proxy
npm installRun the tests:
npm testRun the linter:
npm run lintOpen a bug report. Include:
- What you did
- What you expected
- What actually happened
- Your Node.js / Bun version and OS
Open a feature request describing the use case.
- Fork the repo and create a branch from
dev(notmain) - Make your changes
- Add or update tests in
index.test.js— all 112+ tests must pass - Lint passes:
npm run lint - Commit using Conventional Commits:
fix:for bug fixes (triggers a patch release)feat:for new features (triggers a minor release)docs:/chore:/test:for everything else (no release)
- Open a PR against the
devbranch
dev ──► main ──► npm (via Release Please)
- All work goes on
dev mainis release-only — only Release Please PRs merge directly there- Do not open PRs against
main
Tests use the Node.js built-in test runner — no external framework needed.
node --test # run once
node --test --watch # watch mode
node --test --experimental-test-coverage # with coverageTests mock the OpenCode SDK client entirely — no real LLM calls are made.
ESLint enforces style. Run npm run lint before pushing. The config is in eslint.config.js.
Key conventions in the codebase:
- Pure functions are exported for testability (
normalizeMessages,buildPrompt, etc.) - Each API format (OpenAI, Anthropic, Gemini) has its own section in
index.js - Error responses mirror the format of the target API (OpenAI errors for
/v1/*, Anthropic errors for/v1/messages, etc.)