Repository navigation
Release v0.83.0 - #1415
Merged
Merged
Release v0.83.0#1415
Conversation
Every LLM worker now reads its provider's stop signal through one classifier in \`pipelex/cogt/llm/completion_stop.py\`, so a completion cut at its token cap or context window, refused, filtered or blocked fails its pipe with \`LLMCompletionTruncatedError\` or \`LLMCompletionRefusedError\` instead of passing an empty or partial text as a success. Each error tells a person and an agent what happened and what to change, the billed usage of a refused answer is still reported once, and the Anthropic worker logs when it lowers a structured output's cap. A normal stop and every configured retry behave as before. Closes L-260903-2b8290 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic LLM workers now classify provider stop signals and fail pipes with `LLMCompletionTruncatedError` or `LLMCompletionRefusedError` instead of returning incomplete, refused, or filtered text as a success. - Both errors are non-retryable input content errors with a `change_input` next step; messages identify the model, pipe, and stop value without exposing partial text. - Truncation guidance distinguishes `max_tokens` from the context window, and advises setting a limit when none was sent. - Billed usage is reported once for refused or truncated answers; Anthropic logs lowered structured-output limits only when relevant to an error or timeout. - Normal stops and configured retries remain unchanged. Closes L-260903-2b8290 <sup>Written for commit abf8000. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/Pipelex/pipelex/pull/1414?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <!-- End of auto-generated description by cubic. --> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release v0.83.0
Bumps version from
0.82.0to0.83.0. Promotesdev→main.Changelog
Added
LLMCompletionTruncatedErrorandLLMCompletionRefusedError: two subclasses ofLLMCompletionError, the first for a text completion cut at its output limit or its context window, the second for one the model declined to write or a safety filter stopped. Both are content errors in theinputdomain, not retryable, answered with HTTP 422 and caller-facing under STRICT disclosure, and carrymodel_handle,pipe_codeand the provider'sstop_reason, a truncation also carrying the limit it hit astruncation_limit,max_tokensorcontext_window, theoutput_tokensused and themax_tokenssent; the message names the model, the pipe and those values, never the partial text. Each ends with achange_inputnext step fitted to what stopped the text: revise the prompt or the input after a refusal, raise the pipe'smax_tokensor shorten its input at the output limit, set the pipe'smax_tokensup to the model's limit when the request sent none, and shorten the input, lower the reasoning effort or choose a model with a larger window, never a highermax_tokens, at the context window.Changed
chatreturns aBedrockChatResult(Breaking):BedrockClientProtocol.chatreturns a named result holding the text, the token usage and Converse'sstopReason, in place of a(text, usage)tuple, so a custom Bedrock client returnsread_converse_response(response=…)or builds the result itself.max_tokensto fit its structured-output timeout, the call logs it, at warning level when the pipe set the limit and at debug level when it is the model's default, and an error the lowered limit can explain, a structured output that failed validation or came back incomplete, or a timeout, ends with a sentence saying the limit was lowered and to what, never a rate limit, an authentication failure, an overload, a server error or a lost connection.Fixed
LLMCompletionTruncatedErrororLLMCompletionRefusedErrorwhere it used to come back as a successful output, empty or partial, its billed usage still reported and recorded on its span. Each provider's vocabulary is read, including a gateway's pass-through of another provider's value such asmax_tokensorcontent_filtered, an unknown value being logged at warning level and taken as normal, except that anincompleteResponses API answer is a truncation whatever its reason; a Gemini prompt blocked before any candidate is a refusal, and structured generation keeps its configured re-asks. A Bedrock answer is read for every text block it holds, so one holding none fails with anLLMCompletionErrorwhere it used to raise anIndexErrorwhen its message was empty, or aKeyErrorwhen its first block was not text.🤖 Generated with Claude Code
Summary by cubic
Promotes
devtomainas v0.83.0. Every LLM worker now reads its provider's stop signal before returning text, so a completion cut at its output limit or context window, refused by the model, or stopped by a safety filter fails the pipe withLLMCompletionTruncatedErrororLLMCompletionRefusedErrorinstead of passing empty or partial text as a successful output. Billed usage is still reported once, and normal stops and configured retries behave as before.Breaking changes
BedrockClientProtocol.chatnow returns aBedrockChatResultin place of a(text, usage)tuple. Custom Bedrock clients must returnread_converse_response(response=…)or build the result themselves.Also in this release
max_tokensto fit a structured output's timeout — at warning level when the pipe set the limit, at debug when it is the model's default — and a failure that lowering can explain names the lowered limit.0.82.0to0.83.0; changelog, error docs, and OpenAPI spec updated.Written for commit 08e2f9e. Summary will update on new commits.