Skip to main content

ctxlen

A simple library to look up the context limits (input and output tokens) of LLMs.

uv add ctxlen
>>> import ctxlen
>>> ctxlen.ctxlen("claude-opus-5-5")
1000000
>>> ctxlen.ctxlen("anthropic/claude-sonnet-5-5")
1000000
>>> ctxlen.ctxlen("gpt-6-sol")
1050000
>>> ctxlen.ctxlen("openai/gpt-6-luna")
1050000
>>> ctxlen.max_input("gpt-6-sol"), ctxlen.max_output("gpt-6-sol")
(922000, 128000)

The numbers come from litellm and models.dev; their notices are in LICENSE.

Metadata

Release files for ctxlen 2026.10.12.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 ctxlen 2026.10.12.1
File Size Uploaded Provenance
ctxlen-2026.10.12.1.tar.gz 55.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ctxlen 2026.10.12.1
File Interpreter ABI Platform
ctxlen-2026.10.12.1-py3-none-any.whl Python 3 none any Details

Total release size: 110.8 kB

Release files / ctxlen-2026.10.12.1.tar.gz

Download URL ctxlen-2026.10.12.1.tar.gz
Size 55.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8e22779008d27ac01f002335ba0017e85f0a8647533084437864d4338885e8db
BLAKE2b-256 checksum
How to use checksums
27b863a640e8cd9e0d00b5471ba9469cffab59400a7f798eee0432111ff5cdbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 12, 2026.

Transparency log

Release files / ctxlen-2026.10.12.1-py3-none-any.whl

Download URL ctxlen-2026.10.12.1-py3-none-any.whl
Size 55.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
720ff9f6c2e812ba9f63d40c92ea18ec8353b3fafc63e2b082e7867d11bc5543
BLAKE2b-256 checksum
How to use checksums
c3059e1b8e5524c8d346b9607afcd2de6882cd1b2b16c9f00490cb6153a29d9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 12, 2026.

Transparency log

Security for ctxlen 2026.10.12.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ctxlen-2026.10.12.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 Oct 12, 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.

Release history Release notifications | RSS feed

This release
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