Version 0.6.0 - Automatically sync and manage models from Ollama and OpenAI-compatible APIs into LiteLLM
A FastAPI service that discovers, synchronizes, and manages models from multiple providers into a LiteLLM proxy. Features database persistence, web UI, and efficient model reconciliation.
- Multi-provider support - Ollama, OpenAI-compatible APIs, and compatibility aliases
- Auto-sync - Periodic background synchronization with configurable intervals
- Efficient updates - Only pushes to LiteLLM when models actually change (v0.6.0: eliminated ~264 unnecessary API calls/hour)
- Web UI - Provider management, model browser, and real-time status
- Database persistence - SQLite storage with automatic migrations
- Orphan detection - Highlights models removed from providers
- User overrides - Custom parameters preserved across syncs
- Full OpenAI compatibility - 30+ parameters supported across 100+ models
# Clone the repository
git clone <repo-url>
cd litellm-companion
# Install dependencies
pip install -e .# Start the web service
PORT=8000 uvicorn frontend.api:create_app --factory --port 8000Open http://localhost:8000 in your browser.
# Copy and edit environment
cp example.env .env
nano .env
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f litellm-companion-webServices:
- Web UI:
http://localhost:4001(or port in.env) - LiteLLM Proxy:
http://localhost:4000 - Backend Worker: Automatic background sync
- Open Admin page -
http://localhost:4001/admin - Set LiteLLM URL - Default:
http://localhost:4000 - Set sync interval - 0 = disabled, minimum 30 seconds
- Add providers:
Ollama Example:
Name: my-ollama
Base URL: http://ollama:11434
Type: ollama
Prefix: local (optional)
Default Ollama Mode: ollama_chat
API Key: (optional - for Ollama Cloud)
OpenAI-Compatible Example:
Name: localai
Base URL: http://localai:8080/v1
Type: openai
Prefix: local
API Key: (if required)
- Enable sync - Toggle "Sync Enabled" for each provider
- Wait for sync - Or click "Sync" to trigger manually
data/config.json (auto-created):
{
"litellm": {
"base_url": "http://localhost:4000",
"api_key": null
},
"sync_interval_seconds": 300
}Providers are managed via the database (not config file).
- Fixed compat model updates - Eliminated ~264 unnecessary API calls per hour
- 95% faster compat sync - Reduced from 1.6s to 0.08s per cycle
- Pricing normalization - Fixed string/float comparison bug
- Auto-sync for compat providers - Enable background sync for OpenAI API aliases
- API key support for all Ollama modes - Works with Ollama Cloud
- Improved UI - Sync toggle available for all provider types
- Model Statistics - Coverage and OpenAI API compatibility
- Migration Guide - Upgrade from previous versions
- FIM Code Completion - Setup for code editors
- Compat Mapping - Model alias strategies
- CLAUDE.md - Architecture, development guide, and workflows
- docs/ - Technical references and API documentation
- AGENTS.md - Notes for AI coding assistants
- Go to
/admin - Click "Add Provider"
- Fill in details (name, URL, type)
- Enable sync and save
- Go to
/compat - Map OpenAI model names (e.g.,
gpt-4) to your actual models - Enable sync on compat provider for auto-push
- Per provider: Click "Sync" button next to provider
- All providers: Click "Sync All" on overview page
- Go to
/litellmpage - Filter by tags (provider, type, etc.)
- See registered models with metadata
┌─────────────────┐ ┌──────────────────┐ ┌─────────────┐
│ Providers │─────▶│ LiteLLM │─────▶│ Clients │
│ (Ollama, etc) │ │ Companion │ │ │
└─────────────────┘ └──────────────────┘ └─────────────┘
│
┌─────┴─────┐
│ │
┌────▼────┐ ┌────▼────┐
│ Frontend│ │ Backend │
│ (UI/API)│ │ (Worker)│
└────┬────┘ └────┬────┘
│ │
└─────┬─────┘
│
┌─────▼─────┐
│ SQLite │
│ Database │
└───────────┘
Data Flow:
- Fetch - Pull models from providers
- Normalize - Convert to standard format
- Reconcile - Compare with database
- Update - Sync changes, preserve user edits
- Push - Register with LiteLLM
- Fetch - Pull models from provider into database only
- Push - Send database models to LiteLLM only
- Sync - Fetch + Push in one operation
- Compat - OpenAI API alias provider (virtual)
- Orphan - Model removed from provider but still in database
# Install dev dependencies
pip install -e ".[dev]"
# Configure test endpoints
cp tests/example.env tests/.env
nano tests/.env
# Run tests
pytest tests/ -v- Read CLAUDE.md for development practices
- Create feature branch from
main - Make changes with clear commits
- Bump version in
pyproject.tomland__init__.pyfiles - Test with Docker Compose
- Submit pull request
See LICENSE file for details.
Need help? Check docs/ for detailed guides and technical references.