Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix(branding): don't retry Jev calls that time out (#5174)
Abimael Martell386330419c69
diff --git a/apps/api/src/__tests__/lib/branding/jev.test.ts b/apps/api/src/__tests__/lib/branding/jev.test.tsindex 4e04e779d..e8f4f4041 100644--- a/apps/api/src/__tests__/lib/branding/jev.test.ts+++ b/apps/api/src/__tests__/lib/branding/jev.test.ts@@ -305,7 +305,10 @@ describe("branding with Jev", () => {const [request, options] = mocks.systemOne.mock.calls[0];expect(request.model).toBe("jev-latest");- expect(options).toEqual({ timeout: 5000, retry: { maxRetries: 1 } });+ expect(options).toEqual({+ timeout: 5000,+ retry: { maxRetries: 1, apiTimeoutError: false },+ });expect(Object.keys(request.questions.logo.criteria)).toEqual(["logo_0","logo_1",diff --git a/apps/api/src/lib/branding/jev.ts b/apps/api/src/lib/branding/jev.tsindex 483eab6e0..9dcdfea81 100644--- a/apps/api/src/lib/branding/jev.ts+++ b/apps/api/src/lib/branding/jev.ts@@ -936,7 +936,9 @@ export async function enhanceBrandingWithJev(},{timeout: config.BRANDING_JEV_TIMEOUT_MS ?? DEFAULT_TIMEOUT_MS,- retry: { maxRetries: 1 },+ // A call that ran out of time is answered by the LLM instead:+ // retrying it doubles the wait, and the load on a slow TypeSafe.+ retry: { maxRetries: 1, apiTimeoutError: false },},);setSpanAttributes(span, {