Skip to content

v0.2.4

Choose a tag to compare

@chengzeyi chengzeyi released this 20 Aug 05:08
· 7 commits to main since this release

Contract-alignment fixes

This release aligns the Go SDK's runtime behavior with the documented contract (README / Python & JS SDK parity).

Fixed

  • Submission POST is now single-shot. A transport failure during submission means the task may or may not have been created server-side; the SDK no longer retries the POST (which could create duplicate, billed tasks). Such failures surface as the new exported SubmissionError, which is never auto-retried.
  • Connect timeout no longer caps the whole request. The 10s connection timeout previously bounded the entire request, killing slow sync-mode responses. Connect (dial + TLS) and total request deadline are now separate, mirroring Python's (connect, read) timeout semantics.
  • cancelled and timeout task statuses are now terminal in the wait loop and return the API's error text, instead of polling forever.
  • Global config wavespeed.API is now actually honored by NewClient and default timeouts, matching the Python/JS SDKs.

Added

  • Root-package re-exports: NewClient, ClientOption, WithAPIKey, WithBaseURL, WithClientName, WithConnectionTimeout, WithClientMaxRetries, WithMaxConnectionRetries, WithRetryInterval, SubmissionError, RunDetail, RunNoThrowResult — no need to import the api subpackage.
  • WAVESPEED_CLIENT_NAME environment variable documented in the README.

Housekeeping

  • Removed committed internal notes; fixed stale wavespeed-ai/flux-dev godoc example to wavespeed-ai/z-image/turbo.