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-compute-skills
/plugin install lab-compute@liulab

Metadata

Release files for liulab-llms 2026.11.0

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.0
File Size Uploaded Provenance Actions
liulab_llms-2026.11.0.tar.gz 180.0 kB With provenance Details for liulab_llms-2026.11.0.tar.gz

Built distribution (wheel)

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

Total release size: 238.2 kB

Release files / liulab_llms-2026.11.0.tar.gz

Download URL liulab_llms-2026.11.0.tar.gz
Size 180.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a1905e500241163a01ba331e25107e6158ad5f47ad45eb04f2f624fd6ac7a730
BLAKE2b-256 checksum
How to use checksums
60ff1f1936ab02b526af18ddaa253486bc57da8aa2626b4daef01ef50709b759
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 9, 2026.

Transparency log

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

Download URL liulab_llms-2026.11.0-py3-none-any.whl
Size 58.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68a88fdc1cd421b11d59dc12cfd8ffc3b50d41e146812a2c97a30a90688980d1
BLAKE2b-256 checksum
How to use checksums
88f78cff26e7ae8255c5d528906b5410fd9fa906000a7aec8ae80dc51c16d7ac
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 9, 2026.

Transparency log

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

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

Select from 2 files

Attestation for liulab_llms-2026.11.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 Nov 9, 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