OptionalattemptsMaximum provider calls for this call: a 429 ends a provider call and costs one attempt. Transient network retries inside a provider call do not count against it (see the interface note).
OptionalbeforeAwaited by a provider before each retry it makes internally (any HTTP
request after the first of an embed() call), so every request takes
its items from the shared limiter and waits out any 429 pause. Supplied by the rate-limited wrapper; it may
reject (e.g. EmbeddingUnavailableError), which the provider must
propagate without retrying.
OptionalinteractiveAn interactive call (search): it may use the reserve of the rate window that background calls (indexing) leave free, so it does not wait behind a reindex. Default: false.
OptionalmaxMaximum total time to wait for the limiter (token or Retry-After
pause), in ms. When a wait would exceed it, the call fails fast. The
provider's own network-retry backoff sleeps are not counted.
Per-call budget for the shared rate limiter. Providers that do not rate-limit ignore the budget; providers that retry internally await
beforeRetrybefore each retry. When the limiter splits a call (a batch over its per-minute item limit),attemptsapplies to each request andmaxWaitMsto the whole call.The budget bounds the limiter, not the provider's own network retries: each of the
attemptsprovider calls may itself retry a transient (non-429) failure up toNETWORK_RETRY_POLICY.attemptstimes in all, with backoff sleeps, so oneembed()can issue up toattemptsx 5 HTTP requests.