Contributing to liter-llm
Thank you for your interest in contributing to liter-llm! This guide will help you get started with development.
Development Setup
Section titled “Development Setup”mise Installation
Section titled “mise Installation”This project uses mise for its toolchain and task automation. mise.toml pins every tool version, and mise run <task> runs the repository tasks with those tools on PATH.
Install mise by following the official getting-started guide, then trust the repository configuration once:
mise trustQuick Start
Section titled “Quick Start”After installing mise, set up your development environment:
# One-time setup - installs all dependenciesmise run setup
# Build the core Rust librarymise run buildThe setup command will install Rust, Python, Node.js, Go, Java, and Elixir tooling as needed.
Development Workflow
Section titled “Development Workflow”Common Commands
Section titled “Common Commands”# Build all cratesmise run build# Run all testsmise run test
# Run all checks (lint + test)mise run check# Format all codemise run format
# Run all linters via prekmise run lint
# Generate READMEs from templatesalef readme# Update all dependenciesmise run update
# Clean all build artifactsmise run cleanLanguage-Specific Tasks
Section titled “Language-Specific Tasks”Each language binding has its own namespace. Format and lint every language with the root mise run format and mise run lint.
Rust:
mise run rust:buildmise run rust:testmise run rust:formatmise run rust:lint:checkNode.js:
mise run node:build # Build NAPI-RS native module (release)mise run node:build:dev # Build in debug modemise run node:testElixir:
mise run elixir:build # Compile (includes Rustler NIF)Ruby:
mise run ruby:test # Run Ruby tests (after `bundle exec rake compile` in packages/ruby)PHP:
mise run php:build # Build the PHP extensionmise run php:test # Smoke-test the built extensionWebAssembly:
mise run wasm:build web # Build WASM package (web, bundler or nodejs target)mise run wasm:build:node # Build WASM package (Node.js target)mise run wasm:test:wasm32 # Run the wasm32 tests in Node.jsThe c, csharp, elixir, go, java, node, php, python, ruby, rust and wasm bindings have
mise run <lang>:e2e:test, for example mise run c:e2e:test; run the others with
alef test --lang <lang> --e2e.
Adding Providers
Section titled “Adding Providers”-
Add a provider entry to
schemas/providers.json:{"my-provider": {"base_url": "https://api.myprovider.com/v1","auth_header": "Authorization","auth_prefix": "Bearer","model_prefixes": ["my-provider/"],"parameter_mappings": {}}}Fields:
base_url(required): Provider API base URLauth_header(required): Header name for authenticationauth_prefix(optional): Prefix for the auth value (e.g. “Bearer”)model_prefixes(required): Model name prefixes that route to this providerparameter_mappings(optional): Map OpenAI parameter names to provider-specific names
-
Build and test
Terminal window mise run buildmise run test -
Regenerate E2E tests
Terminal window mise run e2e:generatemise run test
E2E Tests
Section titled “E2E Tests”E2E tests are generated from JSON fixtures in tools/e2e-generator/fixtures/ and produce runnable test suites for each language binding.
# Generate E2E tests for all languagesmise run e2e:generate
# Run Rust E2E testsmise run rust:e2e:testGenerated test files in e2e/ should not be edited directly – modify fixtures or the generator source instead.
Exploring Tasks
Section titled “Exploring Tasks”# Show all available tasksmise tasks
# Show all tasks including hidden onesmise tasks --hiddenCode Quality
Section titled “Code Quality”Pre-commit Hooks
Section titled “Pre-commit Hooks”The project uses prek for pre-commit hooks:
# Install hooksprek installprek install --hook-type commit-msg
# Run all hooks manuallyprek run --all-filesCommit Messages
Section titled “Commit Messages”We use conventional commits:
feat: add support for new-providerfix: correct auth header injectiondocs: update installation instructionschore: update dependenciestest: add tests for streaming
Submitting Changes
Section titled “Submitting Changes”-
Create a feature branch
Terminal window git checkout -b feat/add-provider-support -
Make your changes and run checks locally:
Terminal window mise run check -
Commit and push
Terminal window git commit -m "feat: add support for new provider"git push origin feat/add-provider-support -
Create a Pull Request – link any related issues and ensure CI passes.
Maintenance Tasks
Section titled “Maintenance Tasks”Version Synchronization
Section titled “Version Synchronization”Version is managed in Cargo.toml workspace and synced across all manifests:
mise run version:syncQuestions?
Section titled “Questions?”- Check existing issues
- Join our Discord community