./raj.
Convex Community5mo ago
1 reply
./raj

Transient error while executing action when doing a agent.generateText

basically what breaks is:
console.debug('Calling product agent to generate assets');
      await Promise.race([
        productAgent.generateText(
          { ...ctx, orgId: args.orgId, versionId: args.versionId },
          {
            userId,
          },
          {
            // model: openrouter.chat('google/gemini-2.5-pro'),
            messages: contextMessages,
            stopWhen: stepCountIs(10), // Allow multiple tool calls for generating various assets
            tools: {
              generateNewAsset,
              // getAssetDetails,
              // listAssetsForVersion,
            },
            abortSignal: abortController.signal,
          }
        ),
        new Promise<never>((_, reject) => {
          timeoutId = setTimeout(() => {
            abortController.abort();
            reject(
              new ConvexError(
                'Asset generation timed out after 500 seconds. Please try again.'
              )
            );
          }, timeoutMs);
        }),
      ]);


i get the log: 'Calling product agent to generate assets', but after that i get:
10/25/2025, 1:51:07 AM [CONVEX A(products/ai/actions/generation_actions:autoGenProductAssets)] Transient error while executing action


and i hv retry implemented, every try fails
Was this page helpful?