-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ai): prevent insufficient capacity payments #3035
Conversation
ad0f896
to
018ddbf
Compare
018ddbf
to
d4917a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good. I ran an image-to-video
request and then sent a 2nd request as it was processing. Debug flow shows AI Core catches the request and returns Insufficient Capacity to the gateway. Due to current selection algorithm logic, it does try up to 4 times to process the request.
E0429 09:26:28.144456 1611365 handlers.go:1511] HTTP Response Error 503: Insufficient capacity for pipeline=image-to-video modelID=stabilityai/stable-video-diffusion-img2vid-xt-1-1
@yondonfu, I've reviewed the payment workflow and it appears to be functioning as expected. Could you quickly confirm if you see any issues with this fix? |
Looks reasonable! |
This commit enhances the Orchestrator's capacity handling by returning an error prior to processing payments when capacity is insufficient. This prevents that the Gateway overpays for requests.
d4917a7
to
e6a09d9
Compare
This commit updates the ai-worker dependency to the latest version.
Warning
Depends on livepeer/ai-runner#73 to be merged. Additionally the
mod.go
file should be updated to poitn to the right worker commit.What does this pull request do? Explain your changes. (required)
This commit enhances the Orchestrator's capacity handling by returningan error prior to processing payments when capacity is insufficient. This prevents that the Gateway overpays for requests.
Specific updates (required)
CheckAICapacity
was added to thecore/orchestrator.go
file.handleAIRequest
method was changed so that the O first checks whether it can process a request before processing a payment.How did you test each of these updates (required)
Does this pull request close any open issues?
https://linear.app/livepeer-ai-spe/issue/LIV-175/orchestrators-get-paid-for-unsuccessful-jobs
Checklist:
make
runs successfully./test.sh
pass