llm_model_alias
A standalone Python package for resolving model aliases across platforms
(vllm, vllm-metal, ollama, openai, custom) with JSON-backed mappings.
Features
- Resolve a model alias to a platform-specific model id.
- Store mappings in a JSON file.
- Seed defaults from packaged mappings.
- Pass through
openaiandcustommodel names unchanged. - Local-only
is_downloadedchecks for Ollama and Hugging Face cache.
Installation
From the llm_model_alias directory:
pip install -e .
Public API
- Class:
LLMModelAlias - Types:
ModelPlatform,ModelPlatformMapping,ModelMapping,ResolvedModelMapping - Constant:
MODEL_PLATFORMS
Main methods:
resolve(model_name, platform) -> strget(model_name, platform) -> ResolvedModelMappingis_downloaded(model_name, platform) -> boolload() -> list[ModelMapping]json_path() -> Pathnormalize_model_name(model_name) -> strollama_url() -> str
Configuration
Mapping file location
JSON schema:
{
"mappings": []
}
Path precedence:
data_fileconstructor parameterMODEL_ALIAS_JSON_FILEenvironment variable- OS default path
If the selected path does not exist and data_file is not explicitly provided, packaged defaults are loaded from src/llm_model_alias/data/default_model_mappings.json.
OS defaults:
- Linux:
${XDG_DATA_HOME:-~/.local/share}/llm_model_alias/model_mappings.json - macOS:
~/Library/Application Support/llm_model_alias/model_mappings.json
Ollama URL
URL precedence:
ollama_urlconstructor parameterMODEL_ALIAS_OLLAMA_URLenvironment variablehttp://localhost:11434
Usage
from pathlib import Path
from llm_model_alias import LLMModelAlias
alias = LLMModelAlias(
data_file=Path("./model_mappings.json"),
ollama_url="http://localhost:11434",
)
resolved = alias.resolve("qwen3.5:9b", "vllm")
print(resolved)
mapping = alias.get("qwen3.5:9b", "vllm")
print(mapping)
Notes
- Default mappings live at
src/llm_model_alias/data/default_model_mappings.json.
Metadata
Release files for llm-model-alias 0.1.0
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 | |
|---|---|---|---|---|
| llm_model_alias-0.1.0.tar.gz | 23.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_model_alias-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.6 kB
Release files / llm_model_alias-0.1.0.tar.gz
| Download URL | llm_model_alias-0.1.0.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
317b39104a4017d2b545042f6a5e0f5f71d3099b722bf2ef5a8216531d11cb34
|
|
BLAKE2b-256 checksum How to use checksums |
36a928bae55c5c4dc1375afd9b3790a62daab8ec17df19ed924df41967b77ec4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 10, 2026.
Transparency logRelease files / llm_model_alias-0.1.0-py3-none-any.whl
| Download URL | llm_model_alias-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53e7fab0b980fefac5314d103f4cbb42eca4bd47b422f3abf68c490cc5114d7e
|
|
BLAKE2b-256 checksum How to use checksums |
82b11450eac60f778050ef5d4c606e4daf2eef8177e1de4b3b2d526d6c16be07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 10, 2026.
Transparency logSecurity for llm-model-alias 0.1.0
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 llm_model_alias-0.1.0.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 Apr 10, 2026.
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.