feat: add guarded image generation controls
This commit is contained in:
@@ -52,7 +52,7 @@ export function createImageMakeClient({
|
||||
token,
|
||||
fetchImpl = globalThis.fetch,
|
||||
requestTimeoutMs = 15_000,
|
||||
generationTimeoutMs = 10 * 60_000,
|
||||
generationTimeoutMs = 15 * 60_000,
|
||||
pollIntervalMs = 1_000,
|
||||
maxResultBytes = DEFAULT_MAX_RESULT_BYTES,
|
||||
sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
|
||||
@@ -62,7 +62,7 @@ export function createImageMakeClient({
|
||||
const bearerToken = String(token ?? '').trim();
|
||||
if (!bearerToken) throw new Error('image_make token is required');
|
||||
const perRequestTimeout = positiveInteger(requestTimeoutMs, 15_000);
|
||||
const overallTimeout = positiveInteger(generationTimeoutMs, 10 * 60_000);
|
||||
const overallTimeout = positiveInteger(generationTimeoutMs, 15 * 60_000);
|
||||
const pollingDelay = positiveInteger(pollIntervalMs, 1_000);
|
||||
const resultLimit = positiveInteger(maxResultBytes, DEFAULT_MAX_RESULT_BYTES);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user