From 578ed0608ebcb6b0ad6acace86e4c58aa353ad13 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 20:27:40 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=8B=20New=20version=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/py-max-tokens-model-ceiling-clamp.md | 16 ---------------- typescript/core/CHANGELOG.md | 17 +++++++++++++++++ typescript/core/package.json | 2 +- 3 files changed, 18 insertions(+), 17 deletions(-) delete mode 100644 .changeset/py-max-tokens-model-ceiling-clamp.md diff --git a/.changeset/py-max-tokens-model-ceiling-clamp.md b/.changeset/py-max-tokens-model-ceiling-clamp.md deleted file mode 100644 index 9e320bc..0000000 --- a/.changeset/py-max-tokens-model-ceiling-clamp.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"@smooai/smooth-operator-core": patch ---- - -feat(llm,python): clamp `max_tokens` to the model's output ceiling (Python parity) - -Python parity for the Rust `LlmClient` output-ceiling clamp. `AgentOptions` gains a -`model_max_output: int | None` field and the engine now sends -`effective_max_tokens(max_tokens, model_max_output)` = -`min(max_tokens, ceiling)` on both the streaming and non-streaming chat paths (`None` -/ non-positive ceiling ⇒ graceful passthrough, no behaviour change). A new -`effective_max_tokens` helper is exported for consumers. This stops a policy/budget -`max_tokens` from exceeding what a model can physically emit — which otherwise makes -a reasoning model burn its budget and return empty, or 400s upstream (e.g. -`groq-compound`'s 8192 output cap). The ceiling is sourced from the gateway's -`/model/info` by the consumer (the server), kept out of the engine. EPIC th-1cc9fa. diff --git a/typescript/core/CHANGELOG.md b/typescript/core/CHANGELOG.md index fc20831..890ee30 100644 --- a/typescript/core/CHANGELOG.md +++ b/typescript/core/CHANGELOG.md @@ -1,5 +1,22 @@ # @smooai/smooth-operator-core +## 0.20.3 + +### Patch Changes + +- ab24904: feat(llm,python): clamp `max_tokens` to the model's output ceiling (Python parity) + + Python parity for the Rust `LlmClient` output-ceiling clamp. `AgentOptions` gains a + `model_max_output: int | None` field and the engine now sends + `effective_max_tokens(max_tokens, model_max_output)` = + `min(max_tokens, ceiling)` on both the streaming and non-streaming chat paths (`None` + / non-positive ceiling ⇒ graceful passthrough, no behaviour change). A new + `effective_max_tokens` helper is exported for consumers. This stops a policy/budget + `max_tokens` from exceeding what a model can physically emit — which otherwise makes + a reasoning model burn its budget and return empty, or 400s upstream (e.g. + `groq-compound`'s 8192 output cap). The ceiling is sourced from the gateway's + `/model/info` by the consumer (the server), kept out of the engine. EPIC th-1cc9fa. + ## 0.20.2 ### Patch Changes diff --git a/typescript/core/package.json b/typescript/core/package.json index 467877c..1e80a73 100644 --- a/typescript/core/package.json +++ b/typescript/core/package.json @@ -1,6 +1,6 @@ { "name": "@smooai/smooth-operator-core", - "version": "0.20.2", + "version": "0.20.3", "description": "Native TypeScript implementation of the smooth-operator agent engine — an in-process, OpenAI-compatible agentic tool-calling loop with knowledge grounding. The TypeScript sibling of the Rust reference engine, the C# core, and the Python core.", "type": "module", "license": "MIT",