Open
Conversation
Add the ability to delete bentos from BentoCloud by calling the existing
server-side DELETE /api/v1/bento_repositories/{name}/bentos/{version}
endpoint, which was previously not exposed in the Python SDK.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
For more information, see https://pre-commit.ci
Contributor
Author
|
@frostming lmk if this API makes sense |
frostming
reviewed
Mar 25, 2026
| res = rest_client.v1.get_bento(bento_repository_name=name, version=version) | ||
| if res is None: | ||
| raise NotFound(f'Bento "{name}:{version}" not found on remote') | ||
| rest_client.v1.delete_bento(bento_repository_name=name, version=version) |
Collaborator
There was a problem hiding this comment.
What if passing non-existing name or version to delete endpoint? Confirm this so we can decide if the pre-check is necessary.
|
Thanks for this contribution! I reviewed the changes and have a few observations: Scope Analysis:
Technical Review: Suggestions:
Overall Assessment: Note: This review is part of my contribution to the BentoML community. Happy to discuss any technical aspects further. |
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.
Summary
DELETE /api/v1/bento_repositories/{name}/bentos/{version}call to the REST clientBentoAPI.delete(name, version)to the cloud API layer--cloudflag tobentoml deleteCLI commandcloud=Trueparameter tobentoml.delete()Python APIUsage
CLI:
bentoml delete IrisClassifier:v1 --cloud bentoml delete IrisClassifier:v1 --cloud -y # skip confirmationPython API:
The server-side endpoint already exists and validates that the bento is not referenced by any active deployment before allowing deletion.
Test plan
bentoml delete <name>:<version> --clouddeletes from BentoCloudbentoml delete <name> --cloud(no version) raises a clear errorbentoml delete <name>:<version>(no--cloud) still deletes locally-yflagbentoml.delete("name:version", cloud=True)works via Python API🤖 Generated with Claude Code