Skip to main content

Async mode (default)

Async mode keeps Era’s analysis out of the response path. On turn 2, Era returns the block prepared from turn 1 while it prepares turn 2 for the next call. The call still waits for a normal API round trip.

Sync mode

Sync mode waits for Era to analyze the latest user message. It can return a block on the first turn, but it adds the full processing time before your model call. Use sync mode when:
  • You are running an evaluation.
  • The work runs in the background.
  • Current-turn context matters more than response time.

Change the timeout

timeoutMs applies to each request attempt. A timeout is treated as a transient failure and can be retried up to maxRetries. If no attempt succeeds, turnContext() returns "".

Recommendation

Start with async for user-facing chat. Choose sync only when you have a specific need for current-turn context.