replicate-python icon indicating copy to clipboard operation
replicate-python copied to clipboard

Fix(prediction): add missing "aborted" status to Prediction model

Open P1nk-L0rD opened this issue 4 months ago • 0 comments

The Replicate API sometimes returns a "status": "aborted" value for predictions that were interrupted before completion. The current pydantic model does not include this status, which causes a ValidationError:

pydantic.v1.error_wrappers.ValidationError:
unexpected value; permitted: 'starting', 'processing', 'succeeded', 'failed', 'canceled' (type=value_error.const; given=aborted; permitted=('starting', 'processing', 'succeeded', 'failed', 'canceled'))

This commit updates the Prediction.status Literal to include "aborted" to match the current API behavior.

P1nk-L0rD avatar Oct 10 '25 09:10 P1nk-L0rD