Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude loads one when your task matches it, or you run it by name.
A Python library for LLM integration with unified interface and MCP support. Supports OpenAI, Anthropic, Google Gemini, and Ollama with consistent APIs.
deep, fast, balanced) with registry-based recommendations# With uv (recommended)
uv add llmring
# With pip
pip install llmring
Requires Python 3.11 or higher.
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
# Add whichever providers you want to use
LLMRing uses lockfiles to map semantic aliases (like fast, deep, balanced) to actual models. Create one interactively:
llmring lock chat
This starts a conversation where you describe your needs and get AI-powered recommendations. Or create a minimal lockfile manually:
llmring lock init
View your configured aliases:
llmring aliases
from llmring.service import LLMRing
from llmring.schemas import LLMRequest, Message
async with LLMRing() as service:
request = LLMRequest(
model="fast", # Uses your lockfile alias
messages=[
Message(role="user", content="Hello!")
]
)
response = await service.chat(request)
print(response.content)
The alias fast resolves to whatever model you configured in your lockfile. Change models by editing the lockfile, not your code.
Lockfiles let you:
fast, deep, balanced) instead of model IDsLockfile resolution order:
lockfile_path parameterLLMRING_LOCKFILE_PATH environment variable./llmring.lock in current directoryLockfile composability: Libraries can ship their own lockfiles, and users can extend them with [extends] to use namespaced aliases (my-library:summarizer) while keeping control of model selection.
See Lockfile Documentation for complete details.
async with LLMRing() as service:
# Streaming for all providers
request = LLMRequest(
model="balanced",
messages=[Message(role="user", content="Count to 10")]
)
accumulated_usage = None
async for chunk in service.chat_stream(request):
print(chunk.delta, end="", flush=True)
# Capture final usage stats
if chunk.usage:
accumulated_usage = chunk.usage
print() # Newline after streaming
if accumulated_usage:
print(f"Tokens used: {accumulated_usage.get('total_tokens', 0)}")
async with LLMRing() as service:
tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"}
},
"required": ["location"]
}
}
}]
request = LLMRequest(
model="balanced",
messages=[Message(role="user", content="What's the weather in NYC?")],
tools=tools
)
response = await service.chat(request)
if response.tool_calls:
print("Function called:", response.tool_calls[0]["function"]["name"])
from llmring import LLMRing, LLMRequest, Message
# Automatic resource cleanup with context manager
async with LLMRing() as service:
request = LLMRequest(
model="fast",
messages=[Message(role="user", content="Hello!")]
)
response = await service.chat(request)
# Resources are automatically cleaned up when exiting the context
llmring@juanre-ai-tools is listed by juanre/ai-tools — review the source before installing
npx claudepluginhub juanre/ai-tools --plugin llmringBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground