Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ import java.util.function.Consumer
*
* This client performs best when you create a single instance and reuse it for all interactions
* with the REST API. This is because each client holds its own connection pool and thread pools.
* Reusing connections and threads reduces latency and saves memory. The client also handles rate
* limiting per client. This means that creating and using multiple instances at the same time will
* not respect rate limits.
* Reusing connections and threads reduces latency and saves memory. Each client also manages its
* own retries independently, so reusing one client keeps that retry behavior, connection pool, and
* thread pools in one place while multiple clients may compete separately against the same external
* rate limits.
Comment on lines +36 to +39
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new KDoc still reads a bit like “client-level” retry/rate-limit behavior ("manages its own retries independently"), but retries are implemented per request (reactive on e.g. 429) and there’s no cross-request/cross-client coordination. Consider wording this explicitly (e.g., retries are per request and the SDK does not proactively throttle or coordinate rate limiting across client instances) to avoid repeating the confusion from #644.

Suggested change
* Reusing connections and threads reduces latency and saves memory. Each client also manages its
* own retries independently, so reusing one client keeps that retry behavior, connection pool, and
* thread pools in one place while multiple clients may compete separately against the same external
* rate limits.
* Reusing connections and threads reduces latency and saves memory. Retries are applied per
* request, reactively based on API responses such as rate limits, and are not coordinated across
* requests or client instances. The SDK does not proactively throttle requests or coordinate rate
* limiting across multiple clients, so separate clients may still compete against the same
* external rate limits.

Copilot uses AI. Check for mistakes.
*
* The threads and connections that are held will be released automatically if they remain idle. But
* if you are writing an application that needs to aggressively release unused resources, then you
Expand Down
Loading