Skip to main content

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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for liulab-llms 2026.11.1
File Size Uploaded Provenance Actions
liulab_llms-2026.11.1.tar.gz 204.0 kB With provenance Details for liulab_llms-2026.11.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for liulab-llms 2026.11.1
File Interpreter ABI Platform Actions
liulab_llms-2026.11.1-py3-none-any.whl Python 3 none any Details for liulab_llms-2026.11.1-py3-none-any.whl

Total release size: 263.6 kB

Release files / liulab_llms-2026.11.1.tar.gz

Download URL liulab_llms-2026.11.1.tar.gz
Size 204.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d39ebe67ca27b0fb75c68b44e7e43eae17fe24d567f3d40cc945421346f5efd8
BLAKE2b-256 checksum
How to use checksums
eba01f4e189ed13a464f24d85c26dc85b80b1bba3085d55dab6cb7fae426861d
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 19, 2026.

Transparency log

Release files / liulab_llms-2026.11.1-py3-none-any.whl

Download URL liulab_llms-2026.11.1-py3-none-any.whl
Size 59.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a0652abafc141d31de8882d2c81dcd0361cbd2198b5bcc9b9827b2547e3ea91
BLAKE2b-256 checksum
How to use checksums
2fd077349152d1744a7aedeee657f39607273bc8eb1244a2f21c718239849c53
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 19, 2026.

Transparency log

Security for liulab-llms 2026.11.1

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.

Select from 2 files

Attestation for liulab_llms-2026.11.1.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 19, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page