Changelog

Core

Release notes for aice-core and @aiceafrica/core.

Python: aice-core

0.3.1 (unreleased)

Added

  • request(..., content=bytes, content_type=...) sends a raw body instead of JSON (for example a zip upload), and request(..., raw=True) returns the response body as bytes (for example a zip download). Both keep the shared auth, retry, idempotency and error mapping. Sync and async.

Fixed

  • Error responses nested under error ({"error": {"code", "message", "details", "request_id"}}) now fill in the error's message, code, details and request_id. Previously the whole object became the message and the other fields were empty. A string error field is still read as the message only.
  • Every httpx transport failure (for example ConnectTimeout, ReadError, RemoteProtocolError) is raised as APIConnectionError and retried like a connection error. Some escaped as raw httpx exceptions.
  • A Retry-After given as an HTTP date raised ValueError; it is now read as the seconds until that date.
  • Iterating an AsyncPage past its second page re-fetched the second page; each page now fetches its own successor.

0.3.0

Changed BREAKING

  • Renamed PermissionError → AiceForbiddenError (the 403 error class). The old name shadowed Python's builtin PermissionError, which could silently conflate an AICE API 403 with a real filesystem/OS permission error caught in the same except block. No aliasing/backward-compat shim was added this is a straightforward rename with no behavior change, and per this repo's pre-1.0 convention (see docs/conventions.md) a MINOR bump is the "notice this" signal in lieu of a MAJOR one.

    Migration: from aice_core import PermissionError → from aice_core import AiceForbiddenError. Same for aice_core.exceptions.PermissionError. No other behavior changed — still raised for 403 responses, still carries the same status_code/code/request_id/details fields.

    Checked every package in this monorepo: only aice-sandbox referenced this symbol directly (internally, for error translation not part of its own public API), and it's updated in this same change. No other package needed a code change, but every package's aice-core dependency floor is bumped to >=0.3.0,<0.4 regardless, to avoid a cross-package dependency-resolution conflict if aice-sandbox (now requiring >=0.3.0) and any other package (previously allowing <0.3) are ever installed into the same environment.

0.2.0

Added

  • Idempotency-key support on SyncTransport.request / AsyncTransport.request and .request_multipart:
    • POST/PATCH requests now auto-generate an Idempotency-Key header by default, and the auto-retry-on-transient-failure behavior now requires that key to be present. Previously, POST/PATCH were retried on 5xx/429/network failure with no deduplication signal at all.
    • Pass idempotency_key=None to opt a call out entirely it will be attempted exactly once and any transient failure surfaces immediately instead of being retried blind.
    • Pass an explicit string to reuse a caller-managed key.
    • GET/PUT/DELETE are unaffected always retry-eligible, no key attached, since they're idempotent by HTTP semantics already.
    • New public exports: NOT_GIVEN, NotGiven, IDEMPOTENCY_HEADER.

Changed

  • SyncTransport/AsyncTransport's retry loop was refactored into one shared _execute helper per sync/async, replacing four near-duplicate copies (request and request_multipart each had their own). No behavior change for existing non-mutating calls.
  • The APIConnectionError message on retry exhaustion changed from "Request failed after N retries" to "Request failed after N attempt(s)", to stay accurate for a call that made exactly one attempt (no retry eligibility). Update anything matching this message by exact string.

Migration notes

  • This is a behavior change for every existing POST/PATCH call across every dependent package that doesn't explicitly opt out: those calls now send an Idempotency-Key header they didn't send before. Safe regardless of whether the receiving service understands the header yet (an unrecognized header is ignored), but it only actually prevents a duplicate once that service implements deduplication on it.
  • Dependent packages must bump their aice-core floor to >=0.2.0 to use the new idempotency_key parameter.

TypeScript: @aiceafrica/core

0.4.0 (unreleased)

Added

  • request(path, { rawBody, contentType }) sends raw bytes instead of a JSON body (e.g. a zip upload), and responseType: "bytes" returns the response body as a Uint8Array (e.g. a zip download). Auth, retries, idempotency and error mapping are unchanged.
  • params accepts arrays: { id: ["a", "b"] } is sent as ?id=a&id=b, the form FastAPI services read for list parameters.
  • VERSION, this package's version.

Fixed

  • The per-call timeout in RequestOptions was ignored; it now applies, and the timeout covers reading the body as well as the headers.
  • An error with a plain-text body lost its text (the message was just HTTP <status>); the text is now the message.
  • Error responses nested under error ({"error": {"code", "message", "details", "request_id"}}, the Email Service's shape) now fill in the error's message, code, details and requestId. Before, the whole object became the message and code/details were empty. A string error field (Data Brain, Agent Platform) is still read as message text only, never as the code.
  • requestMultipart failed on an empty or non-JSON success body; it now parses responses the same way as request.
  • Iterating a Page past its second page re-fetched the second page; each page now fetches its own successor.
  • A Retry-After given as an HTTP date was ignored; it is now honoured.

Changed BREAKING

  • RateLimitError.retryAfter is in seconds (was milliseconds), the unit of the header and of the Python SDK. Retry-After is honoured on 429 only.
  • The User-Agent is aice-sdk-typescript/<version> (<service>).

0.3.0

Changed BREAKING

  • Renamed PermissionError → AiceForbiddenError (the 403 error class), purely for symmetry with the Python SDK's rename (JS/TS has no builtin PermissionError to shadow, but keeping both languages' error taxonomies identical matters for anyone working across both). No aliasing/backward-compat shim was added straightforward rename, no behavior change.

    Migration: import { PermissionError } from "@aiceafrica/core" → import { AiceForbiddenError } from "@aiceafrica/core".

    Checked every package in this monorepo: @aiceafrica/recommendation's errors.ts referenced it internally, updated in this same change but it was never re-exported from @aiceafrica/recommendation's own public index.ts, so this is not a breaking change for that package's consumers. No other package referenced it.

0.2.0

Added

  • Idempotency-key support on HttpTransport.request / .requestMultipart:
    • POST/PATCH requests now auto-generate an Idempotency-Key header by default, and the auto-retry-on-transient-failure behavior now requires that key to be present. Previously, POST/PATCH were retried on 5xx/429/network failure with no deduplication signal at all.
    • Pass idempotencyKey: null on RequestOptions to opt a call out entirely it will be attempted exactly once and any transient failure surfaces immediately instead of being retried blind.
    • Pass an explicit string to reuse a caller-managed key.
    • Omitting the option (the default) auto-generates a key.
    • GET/PUT/DELETE are unaffected always retry-eligible, no key attached, since they're idempotent by HTTP semantics already.
    • New export: IDEMPOTENCY_HEADER.

Changed

  • HttpTransport's retry loop was refactored into one shared execute helper, replacing near-duplicate logic between request and requestMultipart. No behavior change for existing non-mutating calls.
  • The APIConnectionError message on retry exhaustion changed from "Request failed after N retries" to "Request failed after N attempt(s)", to stay accurate for a call that made exactly one attempt (no retry eligibility). Update anything matching this message by exact string.

Migration notes

  • This is a behavior change for every existing POST/PATCH call across every dependent package that doesn't explicitly opt out: those calls now send an Idempotency-Key header they didn't send before. Safe regardless of whether the receiving service understands the header yet (an unrecognized header is ignored), but it only actually prevents a duplicate once that service implements deduplication on it.

On this page