A Rust library for classifying git commits with large language models and embeddings. It provides the LLM provider abstraction, the embeddings model wrapper and the vector store used by autosel, which decides whether Linux kernel commits should be backported to stable trees.
The code was originally part of autosel and was split out so the classification machinery could be reused independently, so autosel's history contains earlier copies of these files.
| Provider | Selector | Credentials |
|---|---|---|
| Anthropic Claude | claude |
ANTHROPIC_API_KEY |
| OpenAI | openai |
OPENAI_API_KEY |
| NVIDIA | nvidia |
NVIDIA_API_KEY |
| Kiro CLI | kiro |
KIRO_API_KEY, or an authenticated kiro-cli session |
| Ollama | ollama |
none, talks to a local server |
| Exec | exec |
none, runs a local binary as the model |
HuggingFaceEmbeddings wraps candle_embed
and defaults to BAAI/bge-large-en-v1.5 (1024 dimensions). The model is
downloaded from HuggingFace on first use.
cargo build
cargo test
The test suite is 66 unit tests. None of them need network access or API keys; credentials are only used for real classification runs.
Optional CUDA support for embeddings:
cargo build --features cuda
SPDX-License-Identifier: GPL-2.0-only (c) 2025, Sasha Levin sashal@kernel.org
Open a pull request against main. Sign your work with git commit -s
(Developer Certificate of Origin). Commit messages use imperative subjects,
optionally prefixed with the subsystem (llm/kiro: ...); explain why in the
body, wrapped at 72 columns.