no/llm
Standard Interface for Large Language Modelsno/llm is a Python library that provides a unified interface for working with LLMs, with built-in support for model configuration, parameter validation, and provider management.
Quick Install
uv pip install "no_llm[pydantic-ai]"
Quick Example with Pydantic AI
import os
from no_llm.integrations.pydantic_ai import NoLLMModel
from no_llm.registry import ModelRegistry
from no_llm.settings import ValidationMode, settings
from pydantic_ai import Agent
from pydantic_ai.settings import ModelSettings
settings.validation_mode = ValidationMode.ERROR
# or ValidationMode.WARN, ValidationMode.CLAMP
os.environ["OPENROUTER_API_KEY"] = "..."
# Get model from registry
registry = ModelRegistry()
openrouter_models = list(registry.list_models(provider="openrouter"))
print([m.identity.id for m in openrouter_models])
# > ['claude-3.5-haiku', 'claude-3.5-sonnet-v2', 'claude-3.7-sonnet', 'deepseek-chat', 'deepseek-r1-llama-70b-distilled', 'deepseek-reasoner', ...]
no_llm_model = NoLLMModel(*openrouter_models)
# Use with Pydantic AI
agent = Agent(no_llm_model, model_settings=ModelSettings(temperature=1.2))
result = agent.run_sync("What is the capital of France?")
print(result.data)
# > 2025-04-09 09:50:51.375 | WARNING | no_llm.integrations.pydantic_ai:request:220 - Model deepseek-chat failed, trying next fallback. Error: Invalid value for parameter 'temperature'
# > Current value: 1.2
# > Valid range: (0.0, 1.0)
# > Error: Value 1.2 outside range [0.0, 1.0]
# > 2025-04-09 09:50:51.375 | WARNING | no_llm.integrations.pydantic_ai:request:220 - Model deepseek-r1-llama-70b-distilled failed, trying next fallback. Error: Invalid value for parameter 'temperature'
# > Current value: 1.2
# > Valid range: (0.0, 1.0)
# > Error: Value 1.2 outside range [0.0, 1.0]
# ✅ gemini-2.0-flash
# > The capital of France is **Paris**.
Why no/llm?
-
Provider Agnostic: Support for OpenAI, Anthropic, Google, Mistral, Groq, and more through a single interface
-
Built-in Validation: Type-safe parameter validation and capability checking
-
Provider Fallbacks: Automatic fallback between providers and data centers
-
Configuration System: YAML-based model configurations with inheritance support
-
Model Registry: Central management of models with capability-based filtering
-
Integration Ready: Works with Pydantic AI, and more frameworks coming soon
Next Steps
Metadata
Release files for no-llm 0.1.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| no_llm-0.1.14.tar.gz | 164.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| no_llm-0.1.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 282.6 kB
Release files / no_llm-0.1.14.tar.gz
| Download URL | no_llm-0.1.14.tar.gz |
|---|---|
| Size | 164.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
616ed71ba1cb645361e172d4bb492f9267a0b1fac9d13638cab9d6a94971de4a
|
|
BLAKE2b-256 checksum How to use checksums |
635b19863f2ff29f070a688e471930688c5c1fec6702ffebb50ac29f2b676b7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2025.
Transparency logRelease files / no_llm-0.1.14-py3-none-any.whl
| Download URL | no_llm-0.1.14-py3-none-any.whl |
|---|---|
| Size | 118.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7204d5ca66e5dbf7d26ca84b03fa6b3962fedd41a900366b8ec118f7db18802d
|
|
BLAKE2b-256 checksum How to use checksums |
000338871bab1339437c8d8f5f50f5a1b206c7c9125d27ca3e3756c3d1978f5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2025.
Transparency logSecurity for no-llm 0.1.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for no_llm-0.1.14.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.