Thanks for contributing to Free-Way.
Free-Way aims to be a stable, maintainable, and extensible free-LLM gateway. This guide helps keep contributions consistent and review-friendly.
You can contribute by:
- Reporting bugs (with clear reproduction steps)
- Submitting bugfix PRs
- Adding or improving provider adapters
- Improving model sync/cache/health-check behavior
- Improving docs (README, Chinese docs, examples)
- Node.js 18+
- npm
npm install
npm run build
npm startDefault server address: http://localhost:8787
- Create a branch from the latest main branch.
- Keep one PR focused on one concern (single fix/feature/doc topic).
- Use clear commit messages, e.g.:
feat(provider): add xxx provider adapterfix(router): handle xxx response parsingdocs: update setup instructions
Before opening a PR, make sure:
-
npm run buildpasses - Core endpoints work locally
- No real API keys, tokens, or secrets are committed
- Documentation is updated with behavior changes
- The change is minimal and scoped (no unrelated refactor)
If your PR adds/updates a provider:
- Update provider definitions in
src/providers/index.ts - Verify
apiKeyEnvVar,baseURL, and model mapping (id/providerModelId) - Handle provider-specific auth/protocol details in the provider adapter
- If dynamic sync is needed, add/update implementation under
src/models/*-sync.ts - Confirm models are visible in both console and
/v1/models
Please do not break these compatibility surfaces:
- OpenAI-compatible:
/v1/chat/completions,/v1/models - Anthropic-compatible:
/v1/messages - Console APIs:
/api/catalog,/api/health/*,/api/models/refresh,/api/config/keys
If you introduce a breaking change, include migration notes in the PR description.
When behavior or usage changes, update:
README.md(English)README.zh-CN.md(Chinese)CONTRIBUTING.md/contribution.mdif contribution flow changes
- Never commit real keys or credentials
- Never paste full secrets in issues/PR comments
- For security-related bugs, provide minimal reproduction and impact scope without disclosing sensitive info
Reviews focus on:
- Correctness (API semantics, edge cases)
- Maintainability (clarity, naming, avoiding over-abstraction)
- Backward compatibility (existing callers continue to work)
- Documentation consistency (docs match behavior)
Thanks again for contributing. Small, focused, verifiable PRs get merged faster.