Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: add bedrock throttling exception to retries for evals (#5338)

Max Deichmanne1521b4ef160
diff --git a/worker/src/features/utilities.ts b/worker/src/features/utilities.ts
index 790909d1b7..97af379fd5 100644
--- a/worker/src/features/utilities.ts
+++ b/worker/src/features/utilities.ts
@@ -40,7 +40,10 @@ export async function callStructuredLLM<T extends ZodSchema>(
return structuredOutputSchema.parse(completion);
} catch (e) {
- if (e instanceof Error && e.name === "InsufficientQuotaError") {
+ if (
+ e instanceof Error &&
+ (e.name === "InsufficientQuotaError" || e.name === "ThrottlingException")
+ ) {
throw new ApiError(e.name, 429);
}
logger.error(`Job ${jeId} failed to call LLM. Eval will fail.`, e);