From a59abf02312faae2361e70b16b2375b5486d910b Mon Sep 17 00:00:00 2001 From: 1bcMax Date: Tue, 21 Jul 2026 00:24:12 -0500 Subject: [PATCH] =?UTF-8?q?fix(release):=20finish=20the=201.8.1=20bump=20?= =?UTF-8?q?=E2=80=94=20VERSION=20and=20=5F=5Finit=5F=5F.py=20were=20left?= =?UTF-8?q?=20at=201.8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a762ab3 bumped pyproject.toml alone, so main shipped with three disagreeing version declarations and test_version_consistency red on both assertions. This is the 1.4.6 failure again: that release bumped pyproject.toml and missed __init__.py, installed copies under-reported __version__, and it could not be corrected afterward because PyPI does not allow overwriting a published file. The guard test exists because of that incident and it caught this one. Publish from main before this lands and 1.8.1 reports __version__ == "1.8.0" forever. Also adds the 1.8.1 CHANGELOG entry, which the release commit omitted. Scoped to what 1.8.1 actually contains: the max_tokens bound and its error message. --- CHANGELOG.md | 17 +++++++++++++++++ VERSION | 2 +- blockrun_llm/__init__.py | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9ceea3..cc7cb8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,23 @@ All notable changes to blockrun-llm will be documented in this file. +## 1.8.1 — 2026-07-21 + +### Fixed +- **`max_tokens` no longer capped below what models actually serve.** The SDK + rejected anything over 100000 client-side. That was not a model limit and not + the gateway's — it was an undocumented sanity check that quietly became the + binding constraint on every caller. Asking `zai/glm-5.2` for the 262144 it + advertises raised a `ValueError` that never reached the network and named a + limit no provider had set. The bound is now `MAX_TOKENS_SANITY_LIMIT` + (1000000), a typo guard for obviously-wrong values (a byte count, a + timestamp, a stray `1e9`) rather than a ceiling any real request can hit. +- **The rejection message no longer reads like a provider response.** + `"max_tokens too large (maximum: 100000)"` was taken for an upstream model + ceiling during an investigation and recorded as one, on the strength of 19 + identical "rejections" that never left the process. The message now says the + number is the SDK's own. + ## 1.8.0 — 2026-07-18 ### Added diff --git a/VERSION b/VERSION index 27f9cd3..a8fdfda 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.0 +1.8.1 diff --git a/blockrun_llm/__init__.py b/blockrun_llm/__init__.py index f4d6e2d..08110f4 100644 --- a/blockrun_llm/__init__.py +++ b/blockrun_llm/__init__.py @@ -178,7 +178,7 @@ ) from .tx_log import TransactionLogger, decode_settlement_header, format_row -__version__ = "1.8.0" +__version__ = "1.8.1" __all__ = [ "LLMClient", "AsyncLLMClient",