unstale

npm / @typesafe-ai/sdk

@typesafe-ai/sdk

What changed in @typesafe-ai/sdk 0.5 to 0.7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.

4 breaking20 new APIs and options2 performance1 behavior and defaults4 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.0 on npm

@typesafe-ai/sdk 0.711 changes

Breaking changes 2

  • Invalid requests reject the returned promise instead of throwing.

    0.7.0release notes

  • Request payload types are no longer exported.

    0.7.0release notes

New APIs and options 4

  • Reference images by names you choose in assets.

    0.7.0release notes

  • Add box questions to locate what their instructions describe in an image; use them with the jev-preview model.

    0.7.0release notes

  • Create images with image() for use in state, question instructions, or criteria.

    0.7.0release notes

  • Write images into text with withAssets and withAssets.join.

    0.7.0release notes

Performance 1

  • Request bodies of 1 KiB or more are compressed with zstd on Node.js 22.15 or newer.

    0.7.0release notes

Fixes and other changes 4

  • Fix an unhandled rejection on Node.js 22 when a request times out or is aborted mid-body.

    0.7.0release notes

  • More request validation checks are performed.

    0.7.0release notes

  • Score criteria lists built at runtime are now accepted.

    0.7.0release notes

  • Usage now allows null token counts.

    0.7.0release notes

@typesafe-ai/sdk 0.61 changes

Breaking changes 1

  • Score.criteria now accepts an ordered sequence instead of a dictionary keyed by integers.

    0.6.0release notes

@typesafe-ai/sdk 0.519 changes

Breaking changes 1

New APIs and options 16

  • Pass images keyed by chosen references to use them in plain strings; every asset name must appear in the request or the call rejects before sending.

    0.5.7release notes

  • Ask a box question to locate described content in an image; answers contain edge fractions and confidence may be null.

    0.5.7release notes

  • Use choice questions to define choices whose answer types are inferred from the question.

    0.5.7release notes

  • Pass compression: false to send request bodies uncompressed.

    0.5.7release notesrelease notes

  • Create images from base64 data for use in state, question instructions, or criteria.

    0.5.7release notesrelease notes

  • Create images from file bytes or a Blob; only PNG and JPEG are accepted, and other formats are rejected with BadRequestError.

    0.5.7release notes

  • Use this model for box questions.

    0.5.7release notes

  • Use noul questions to ask a yes-or-no-style question about the supplied content.

    0.5.7release notes

  • Use score questions to request a score from the supplied options.

    0.5.7release notes

  • The client provides systemOne for sending state and questions and receiving answers.

    0.5.7release notes

  • Initial public release of the JavaScript and TypeScript SDK, with ESM, CommonJS, and TypeScript declarations.

    0.5.7release notes

  • Set this environment variable to configure the SDK client’s API key.

    0.5.7release notes

  • Set this header to true to enable experimental image support.

    0.5.7release notesrelease notes

  • The SDK introduces a client for making TypeSafe requests.

    0.5.7release notes

  • Write images into text with withAssets.join.

    0.5.7release notesrelease notes

  • Tag template literals to reference images inside text; an image in an untagged template literal rejects the call before sending.

    0.5.7release notes

Performance 1

  • The client compresses request bodies of 1 KiB or more with zstd; smaller bodies are uncompressed, and other runtimes send all bodies uncompressed.

    0.5.7release notes

Behavior and default changes 1

  • Requests containing images are sent as multipart/form-data, with each image’s file bytes in its own part.

    0.5.7release notes