fix: upload-binary Content-Type fix, 429/timeout retry, 120s timeout - Remove Content-Type: application/json from uploadAssetBinary FormData request - Add retryOnTransient for 429 + timeout + signal timed out errors - Increase AI chat timeout from 60s to 120s per call - Apply retry logic to both chat() and visionChat()
This commit is contained in:
@@ -408,9 +408,11 @@ export const aiGenerationClient = {
|
||||
form.append("file", blob, options?.name || "upload.png");
|
||||
if (options?.scope) form.append("scope", options.scope);
|
||||
if (options?.mimeType) form.append("mimeType", options.mimeType);
|
||||
// Exclude Content-Type so browser auto-sets multipart/form-data with boundary
|
||||
const { "Content-Type": _ct, ...authHeaders } = buildAuthHeaders();
|
||||
const res = await fetch(buildApiUrl("oss/upload-binary"), {
|
||||
method: "POST",
|
||||
headers: { ...buildAuthHeaders() },
|
||||
headers: authHeaders,
|
||||
body: form,
|
||||
});
|
||||
if (!res.ok) {
|
||||
|
||||
Reference in New Issue
Block a user