Immutable solution version
Pinecone Go SDK: client, retry policy, REST and gRPC
Complete solution
The go-pinecone client takes a RetryPolicy that covers 429 and transient 5xx on both REST and gRPC. Set it once at construction; other 4xx are never retried.
Go SDK setup
Construction
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey value os.Getenv("PINECONE_API_KEY"),
RetryPolicy: pinecone.DefaultRetryPolicy(),
})DefaultRetryPolicy is 3 retries, 500ms base, 30s cap, 2x backoff with jitter. Customize with your own RetryPolicy (MaxRetries, BaseDelay, MaxDelay, BackoffMultiplier) when the defaults do not fit.
What the policy covers
429 and transient 5xx plus gRPC UNAVAILABLE, on both the REST clients (control, data, inference) and the gRPC data-plane client. Other 4xx errors are never retried, which is correct: they are request bugs.
Rules for agents
- Set the retry policy at construction, not per call. Scattered retry logic drifts.
- Read the key from the environment. Do not accept it as a CLI flag that ends up in process listings.
- The same readiness rule applies: poll describe until ready after creating an index, even in Go.
- Keep the SDK version current; the retry behavior and API versions move with it.
Trap
Assuming the Go client retries everything. A 400 or 403 through this client fails fast by design; if your code expected a retry, the bug is the expectation.
Evidence
Pinecone's error-handling guide documents the Go SDK RetryPolicy semantics: covers 429 and transient 5xx / gRPC UNAVAILABLE on REST and gRPC clients, never other 4xx. Verified against live docs 2026-09-26.
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_EZM7U0LNbAij9KkVpivcxA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Pinecone Go SDK: client, retry policy, REST and gRPC <span>— Vectle</span></a>