Skip to content

sdk: v0.12.4

Compare
Choose a tag to compare
@stainless-bot stainless-bot released this 23 Jan 19:04

0.12.4 (2024-01-23)

Full Changelog: sdk-v0.12.3...sdk-v0.12.4

⚠ BREAKING CHANGES

  • remove anthropic-beta and x-api-key headers from param types (#243)
  • client: Stream.toReadableStream() has been removed

Features

  • add flexible enum to model param (#73) (a6bbcad)
  • allow a default timeout to be set for clients (#113) (1c5b2e2)
  • allow installing package directly from github (#215) (ba509fb)
  • api: add messages endpoint with streaming helpers (#235) (038e036)
  • api: reference claude-2 in examples (#50) (7c53ded)
  • client: add support for defaultQuery option (48b1597)
  • client: add support for accessing the raw response object (#105) (c86b059)
  • client: add support for passing a signal request option (#55) (09604e9)
  • client: adjust retry behavior to be exponential backoff (#192) (e11bd99)
  • client: allow binary returns (#203) (77f5d09)
  • client: detect browser usage (#101) (f4cae3f)
  • client: export ClientOptions interface (#75) (0315ce1)
  • client: handle retry-after with a date (#162) (5d7f23d)
  • client: improve compatibility with Bun (#119) (fe4f5d5)
  • client: improve timeout handling to reuse agent (a512020)
  • client: retry on 408 Request Timeout (#151) (ccbc758)
  • client: support importing node or web shims manually (#157) (c240c1d)
  • client: support passing a custom fetch function (#46) (7d54366)
  • client: support reading the base url from an env variable (#223) (e084233)
  • deps: remove unneeded qs dep (#72) (0aea5a6)
  • docs: add documentation to the client constructor (#118) (79303f9)
  • errors: add status code to error message (#155) (c07ace2)
  • github: include a devcontainer setup (#202) (483bdb0)
  • handle 204 No Content gracefully (#190) (11bd205)
  • package: add Bun export map (#139) (7a9bfcf)
  • package: export a root error type (#160) (19d5cda)
  • streaming: make requests immediately throw an error if an aborted signal is passed in (#79) (5c86597)
  • support ESM and web platform runtimes (#25) (d5552a5)
  • types: export RequestOptions type (#127) (9769751)
  • types: improve streaming params types (#102) (cdf808c)
  • types: remove footgun with streaming params (#125) (3ed67b6)
  • vertex: add support for google vertex (#265) (9a0410d)

Bug Fixes

  • allow body type in RequestOptions to be null (#259) (55f19d9)
  • bump default request timeout to 10 minutes (c442805)
  • ci: ignore stainless-app edits to release PR title (#258) (e92bfaf)
  • client: eliminate circular imports, which cause runtime errors in webpack dev bundles (#170) (4fe033e)
  • client: fix errors with file uploads in the browser (#76) (ac48fa7)
  • client: fix TS errors that appear when users Go to Source in VSCode (#142) (45d970b)
  • client: fix TypeError when a request gets retried (#117) (0ade979)
  • client: handle case where the client is instantiated with a undefined baseURL (#143) (4ef0acd)
  • client: handle undefined process in more places (#87) (d950c25)
  • client: properly handle multi-byte characters in Content-Length (#47) (8dfff26)
  • client: use explicit file extensions in _shims imports (#141) (49b4bf7)
  • core: fix navigator check for strange environments (#124) (c783604)
  • examples: avoid swallowing errors in example scripts (e406dfb)
  • examples: avoid swallowing errors in example scripts (#82) (b27cfe9)
  • fix error in environments without TextEncoder (#70) (5b78e05)
  • fix errors in package source files when users go to definition in VSCode (7904179)
  • fix errors with "named" client export in CJS (#67) (08ef69c)
  • fix export map order (#74) (51e70cb)
  • fix link to README file uploads in fileFromPath (c4e2c64)
  • fix module not found errors in Vercel edge (#148) (2ecc0de)
  • fix namespace exports regression (#171) (b3c1f99)
  • fix undefined message in errors (#86) (5714a14)
  • headers: always send lowercase headers and strip undefined (BREAKING in rare cases) (#245) (f65a046)
  • import web-streams-polyfill without overriding globals (#186) (a8713c6)
  • improve status code in error messages (#183) (cd45611)
  • prevent ReferenceError, update compatibility to ES2020 and Node 18+ (#169) (cada6ef)
  • readme: update link to api.md to use the correct branch (#145) (b1e8dd2)
  • remove anthropic-beta and x-api-key headers from param types (#243) (8c63dd0)
  • stream: declare Stream.controller as public (#132) (ff33a89)
  • streaming: do not abort successfully completed streams (#53) (950dd49)
  • streaming: fix response body streaming in non-Chrome environments (c4eb4d7)
  • support PromiseLike input to toFile (1d5f87d)
  • types: accept undefined for optional client options (#257) (3af0266)
  • types: add catch-all overload to streaming methods (#123) (7c229a2)
  • types: improve getNextPage() return type (#137) (6ae3abb)
  • typo in build script (#197) (17a5b4a)
  • use default base url if BASE_URL env var is blank (#250) (76b1429)

Chores

Documentation

Refactors

  • client: remove Stream.toReadableStream() (#110) (c370412)
  • create build for deno.land (#93) (2ea741a)
  • improve streaming implementation (56a17b7)
  • mark .responseHeaders and .response as deprecated (93a0445)
  • move to src directory, improve ecosystem compatibility (4facbae)
  • remove unnecessary line in constructor (#131) (dcdf5e5)
  • streaming: change Stream constructor signature (#174) (c529e2d)
  • streaming: make response body streaming polyfill more spec-compliant (#44) (047d328)
  • test: refactor authentication tests (#176) (eba7528)
  • use destructuring arguments in client constructor and respect false values (#89) (8d4c686)
  • write jest config in typescript (#239) (1d595d6)

Build System