replicate-python
replicate-python copied to clipboard
Fix(prediction): add missing "aborted" status to Prediction model
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.