Release v0.14.0 - #51
Merged
Merged
Conversation
Every route of `PipelexAPIClient` now raises a typed `ApiResponseError` that is `mthds`'s own error narrowed to `ValidationErrorItem`, so `start_and_wait()` or `execute()` on a method the plane refuses raises an error whose message and fields carry the reason, the failing pipe and the next step, instead of httpx's bare status line. The client overrides the new `_raise_api_response_error` seam of `mthds`, reads the shared members through `ProblemDocument`, and moves the gateway-timeout translation of `execute` and the bare-runner 404 translation of `start` onto the typed error, both of which the override would otherwise have silently disabled. The branch builds on `mthds` pinned at its dev commit and collapses onto the published 0.17.0 before it merges. Closes L-260927-424b11 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Every route of `PipelexAPIClient` now raises a typed `ApiResponseError` — `mthds`'s own error narrowed to `ValidationErrorItem` — so a refused run reports the reason, the failing pipe, and the advised next step instead of `httpx`'s bare status line. **Migration** - Callers that caught `httpx.HTTPStatusError` must catch `ApiResponseError` and read `exc.status`, `exc.headers`, and `exc.request_url` where they previously read `exc.response.status_code`, `exc.response.headers`, and `exc.request.url`. - `execute`'s gateway-timeout translation and `start`'s bare-runner 404 translation now read the typed error; on `start`, a runner 404 that carries `error_type` but no `code` is read as a refusal, and only a 404 with neither is treated as a missing run store. **Dependencies** - `mthds` is upgraded to the published 0.17.0. - Tests replay the dev plane's three real refusal bodies byte for byte from `mthds-python`, and the deferred version-handshake finding is recorded in `wip/pr-50-review-notes.md`. <sup>Written for commit af35911. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/Pipelex/pipelex-sdk-python/pull/50?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="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.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 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.14.0
Bumps version from
0.13.0to0.14.0. Promotesdev→main.Changelog
Changed
ApiResponseError, and a refused run says why (Breaking): the protocol routes (execute,start,validate,models,version), the run status and results reads andstart_and_waitraiseApiResponseErroron a non-2xx answer instead ofhttpx.HTTPStatusError, so a method the plane refuses to run raises an error whose message gives the reason and, on its own line, the next step (Next step: …), and whosevalidation_errors[0].pipe_codenames the failing pipe. A caller that caughthttpx.HTTPStatusErrorcatchesApiResponseErrorand readsexc.status,exc.headersandexc.request_urlwhere it readexc.response.status_code,exc.response.headersandexc.request.url; the gateway-timeout translation ofexecuteand the bare-runner404translation ofstartare unchanged.ApiResponseErrorismthds's own error narrowed (Breaking):pipelex_sdk.errors.ApiResponseErrornow subclassesmthds.runners.api.exceptions.ApiResponseError[ValidationErrorItem], addingcode,error_categoryanderrors, soexcept mthds.runners.api.exceptions.ApiResponseErrorcatches it too. It gainsinstance,headersandrequest_url; its message is the base's (API <METHOD> /v1/<endpoint> failed (<status>): <reason>, the reason falling back fromdetailtotitleto the raw body to the status text); itsuser_actionis themthdsUserAction, kept only when the answer carries a stringkindand a non-emptydetail, so one missing either now reads asNone; and an emptycodeorerror_categoryreads asNone.mthds0.17.0 (Breaking): the exact pin moves from 0.16.0 to the release that adds the typedApiResponseErrorthis client builds on.Fixed
startis no longer read as a missing run store: a 404 carrying the runner'serror_type— amethod_refwhose package does not exist, relayed by the hosted API without a platformcode— raisedRunLifecycleUnavailableError, andstart_and_waitthen moved the client onto blockingexecutefor the rest of its life. Only a 404 whose body carries neithercodenorerror_typenow counts as a missing route; any other raisesApiResponseError, and the client keeps using the durable path.Closes L-260927-bffd2f
🤖 Generated with Claude Code
Summary by cubic
Bumps the SDK to 0.14.0 and promotes
dev→main. Every route now raisesApiResponseError,mthds's own error narrowed to this SDK, instead ofhttpx.HTTPStatusError, so a refused run says why and names the failing pipe.Migration
ApiResponseErrorand readexc.status,exc.headers, andexc.request_urlwhere you readexc.response.status_code,exc.response.headers, andexc.request.url.mthds0.17.0, up from 0.16.0.Bug Fixes
startcarryingerror_typeno longer reads as a missing run store; only one with neithercodenorerror_typedoes.Written for commit 08c1f5b. Summary will update on new commits.