Code / Active

modelito

A small Python library offering a common interface to language models from different providers, running online or locally.

2026

modelito supplies lightweight interfaces for OpenAI, Claude, Gemini, oMLX, Ollama and local OpenAI-compatible servers such as llama.cpp, vLLM and LM Studio. It also provides token counting, timeout estimation and small Ollama lifecycle helpers.

The library is designed for applications and continuous-integration environments that need a narrow common interface without importing every provider SDK by default.

The published package can be installed with pip install modelito. Optional provider dependencies are separate; a default installation does not install every model SDK or server runtime.

from modelito import Client
from modelito.messages import Message

client = Client(provider="auto", prefer=["omlx", "ollama"], model="omlx")
response = client.chat([Message(role="user", content="Hello")])
print(response.text)

The usage guide, API documentation and provider architecture distinguish hosted providers from local servers and their optional dependencies.