Metadata-Version: 2.4
Name: ctxlen
Version: 2026.10.11.dev3
Summary: max_input and max_output for any litellm model id, with no dependencies and no network
Keywords: llm,litellm,context window,tokens,models.dev
License-Expression: MIT
License-File: LICENSE
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.9
Project-URL: Repository, https://github.com/michaeltheologitis/ctxlen
Description-Content-Type: text/markdown

# ctxlen

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

```shell
uv add ctxlen
```

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

```

The numbers come from litellm and models.dev; their notices are in [LICENSE](LICENSE).
