fix(runway): retry the /v1/tasks submit on transient errors
A dropped proxy connection (EOF) or 5xx on the task-create failed the whole generation. submitTask now retries transient (ErrTemporaryUpstream) submits up to 3x with backoff, honoring ctx. Applies to both Nano Banana image and Gen-4 video. Validated: 10/10 4K images (19-24MB PNG each) generated across 10 accounts.
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
http "github.com/bogdanfinn/fhttp"
|
||||
tlsclient "github.com/bogdanfinn/tls-client"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
@@ -127,7 +126,7 @@ func (c *Client) createImageTask(ctx context.Context, client tlsclient.HttpClien
|
||||
if len(refImages) > 0 {
|
||||
opts["reference_images"] = refImages
|
||||
}
|
||||
res, err := c.apiJSON(ctx, client, token, teamID, http.MethodPost, "/v1/tasks", map[string]any{
|
||||
res, err := c.submitTask(ctx, client, token, teamID, map[string]any{
|
||||
"taskType": "gemini_3_1_flash_image",
|
||||
"options": opts,
|
||||
"asTeamId": jsonNumberOrString(teamID),
|
||||
|
||||
Reference in New Issue
Block a user