Skip to main content

Contributing to vLLM Semantic Router 🤝

We welcome contributions from the community! Here's how you can help make vLLM Semantic Router better.

🎯 Ways to Contribute

🐛 Bug Reports

Found a bug? Please report it on ourGitHub Issues.

  • Use a clear and descriptive title
  • Provide steps to reproduce
  • Include system information
  • Add relevant logs or error messages

✨ Feature Requests

Have an idea for a new feature? We'd love to hear it!

  • Check existing issues first
  • Describe the problem you're solving
  • Explain your proposed solution
  • Consider implementation complexity

📝 Documentation

Help improve our documentation and examples.

  • Fix typos and grammar
  • Add missing documentation
  • Create tutorials and guides
  • Improve code examples

💻 Code Contributions

Contribute to the core functionality.

  • Fix bugs and issues
  • Implement new features
  • Optimize performance
  • Add test coverage

📋 Contribution Process

1

Create an Issue

Discuss your idea or bug report with the community first.

2

Fork & Branch

Create a new branch for your changes from the main branch.

3

Make Changes

Implement your changes following our coding standards.

4

Test

Run tests and ensure your changes don't break existing functionality.

1. Run precommit hooks, ensure compliance with the project submission guidelines;

2. You can refer to Install the local to start semantic-router locally.

5

Submit PR

Create a pull request with a clear description of your changes.

⚙️ Precommit hooks

The Semantic-router project provides a precommit hook to standardize the entire project, including Go, Python, Rust, Markdown, and spelling error checking.

Although these measures may increase the difficulty of contributions, they are necessary. We are currently building a portable Docker precommit environment to reduce the difficulty of contributions, allowing you to focus on functional pull requests.

Manual

Some Tips:

1. If the precommit check fails, don't worry. You can also get more information by executing "make help".

2. For the pip installation tool, we recommend that you use venv for installation.

3. We recommend installing pre-commit through Python's virtual environment.

4. You can also directly submit the PR and let GitHub CI test it for you, but this will take a lot of time!

1

Install precommit

Runpip install --user pre-commit

2

Install check tools

1. Markdown:npm install -g markdownlint-cli

2. Yaml:pip install --user yamllint

3. CodeSpell:pip install --user codespell

4. JavaScript:cd website && npm lint

5. Shell: take Mac as an example, executebrew install shellcheck

3

Install precommit to git

Runpre-commit install, then pre-commit installed at.git/hooks/pre-commit

4

Run

Runmake precommit-check to check.


Docker/Podman

From the above local running method, it can be seen that the process is very troublesome and complicated. Therefore, we have provided running methods based on Docker or Podman. There is no need to install various dependent software; all you need is a container runtime.

Some Tips:

Although Docker can help avoid installing too many detection tools locally, this does not mean that it will be automatically executed during the commit process. Therefore, when committing, you can usegit commit -s -m -n to skip the detection.

1

Make sure Docker/Podman is installed

docker --version

2

Run precommit by Docker/Podman

make precommit-local

You can also manually enter the container and perform the operation:

Manual Docker Setup
# Set the container image
export PRECOMMIT_CONTAINER=ghcr.io/vllm-project/semantic-router/precommit:latest

# Run the container interactively
docker run --rm -it \
     -v $(pwd):/app \
     -w /app \
     --name precommit-container ${PRECOMMIT_CONTAINER} \
     bash

# Inside the container, run the precommit commands
pre-commit install && pre-commit run --all-files

🏷️ Working Group Areas

Consider joining one of our Working Groups to focus your contributions:

area/documentarea/environmentarea/corearea/networkingarea/benchmarkarea/toolingarea/user-experience

📞 Get Help

Need help with your contribution? Reach out to us: