liulab-llms
Calls language models for lab repos through one shared gateway, with a response cache for the whole lab and a spend ceiling.
Set it up
This repo uses pixi and nothing else — no pip, no conda, no uv. Clone it, then:
pixi install
Use it
Open an SSH tunnel to the lab gateway and set LABLLM_GATEWAY to its local address, such as
http://127.0.0.1:8000. Then open a meter with a dollar ceiling and call through it:
from labllm import Gateway, Model, Stopped
gw = Gateway(repo="my-repo")
model = Model("deepseek", "deepseek-v4-flash", max_output_tokens=2000)
with gw.meter("first try", ceiling_usd=1.0) as m:
try:
reply = m.chat(model, system="Answer in one word.", user="Is DNA a protein?")
except Stopped as stop:
print("stopped:", stop.reason)
else:
print(reply.text, reply.cost_usd, reply.cached)
The same request sent again comes back from the cache at no cost. Tests use
labllm.testing.FakeGateway instead, with a function you write playing the provider.
Check your work
pixi run check
That runs the linters, the type checker and the tests. It reports every failure at once, so read to the bottom before you fix anything.
Read the docs
The site is at https://liuhlab.github.io/liulab-llms/.
Build it yourself with pixi run docs-build.
Set up your agent
Skills for coding agents live in skills/. Link them into each agent's own folder:
python skills/install.py --target all
If you work on the lab's clusters, add the shared plugin once per machine:
/plugin marketplace add liuhlab/liulab-skills
/plugin install lab@liulab
Metadata
Release files for liulab-llms 2026.11.6
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 | Actions |
|---|---|---|---|---|
| liulab_llms-2026.11.6.tar.gz | 212.7 kB | With provenance | Details for liulab_llms-2026.11.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| liulab_llms-2026.11.6-py3-none-any.whl | Python 3 | none | any | Details for liulab_llms-2026.11.6-py3-none-any.whl |
Total release size: 274.2 kB
Release files / liulab_llms-2026.11.6.tar.gz
| Download URL | liulab_llms-2026.11.6.tar.gz |
|---|---|
| Size | 212.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f60c121ee2ee74fc7b02ddfea35dae6007930861012379556dc0e26c0691c708
|
|
BLAKE2b-256 checksum How to use checksums |
33a9c0d6f32ce9bf5eaeea336f3470848cf0c3cd2ec04107ccc62d08b2293e55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logRelease files / liulab_llms-2026.11.6-py3-none-any.whl
| Download URL | liulab_llms-2026.11.6-py3-none-any.whl |
|---|---|
| Size | 61.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f12ae6cdc1952df8ba60718a18c042e047747b205189d0c739c5d08ac627219a
|
|
BLAKE2b-256 checksum How to use checksums |
d1a5ec73e9ace3f85d460e9fbf11523ef5d54e3da21697466d0e9e8e225bd751
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logSecurity for liulab-llms 2026.11.6
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
Both files in this release have been uploaded with provenance metadata.
Attestation for liulab_llms-2026.11.6.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 Nov 23, 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.