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

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.9
File Size Uploaded Provenance Actions
liulab_llms-2026.11.9.tar.gz 235.6 kB With provenance Details for liulab_llms-2026.11.9.tar.gz

Built distribution (wheel)

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

Total release size: 308.9 kB

Release files / liulab_llms-2026.11.9.tar.gz

Download URL liulab_llms-2026.11.9.tar.gz
Size 235.6 kB
Tags Source
SHA-256 checksum
How to use checksums
680c6f1292a2a66e92a1e8b717982abad33ef775525ded3054c5e1b2c352c03b
BLAKE2b-256 checksum
How to use checksums
974e0719d1beffdd8d554995f3764067dc9a7894605bf970b5d9ac319f1f4f06
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 26, 2026.

Transparency log

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

Download URL liulab_llms-2026.11.9-py3-none-any.whl
Size 73.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e8a609a86c2def27f4966c6d10db16737fe0f6762dfdbeae233220cfd0686c2
BLAKE2b-256 checksum
How to use checksums
1ea1bbfcb38b130525ae5d5249047b716365c826b915a5ccbdaf4d94707e2732
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 26, 2026.

Transparency log

Security for liulab-llms 2026.11.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for liulab_llms-2026.11.9.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 26, 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