fix: temporarily revert max retries (#510)

This commit is contained in:
Charles Packer
2026-01-09 17:32:43 -08:00
committed by GitHub
parent a6640e9ef2
commit f57f39c79b
2 changed files with 5 additions and 2 deletions

View File

@@ -23,9 +23,11 @@ export async function sendMessageStream(
background?: boolean;
// add more later: includePings, request timeouts, etc.
} = { streamTokens: true, background: true },
// TODO: Re-enable once issues are resolved - disabled retries were causing problems
// Disable SDK retries by default - state management happens outside the stream,
// so retries would violate idempotency and create race conditions
requestOptions: { maxRetries?: number } = { maxRetries: 0 },
// requestOptions: { maxRetries?: number } = { maxRetries: 0 },
requestOptions: { maxRetries?: number } = {},
): Promise<Stream<LettaStreamingResponse>> {
// Capture request start time for TTFT measurement when timings are enabled
const requestStartTime = isTimingsEnabled() ? performance.now() : undefined;

View File

@@ -396,6 +396,7 @@ export async function drainStreamWithResume(
buffers.interrupted = false;
// Resume from Redis where we left off
// TODO: Re-enable once issues are resolved - disabled retries were causing problems
// Disable SDK retries - state management happens outside, retries would create race conditions
const resumeStream = await client.runs.messages.stream(
result.lastRunId,
@@ -403,7 +404,7 @@ export async function drainStreamWithResume(
starting_after: result.lastSeqId,
batch_size: 1000, // Fetch buffered chunks quickly
},
{ maxRetries: 0 },
// { maxRetries: 0 },
);
// Continue draining from where we left off