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), andrequest(..., raw=True)returns the response body asbytes(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,detailsandrequest_id. Previously the whole object became the message and the other fields were empty. A stringerrorfield is still read as the message only. - Every httpx transport failure (for example
ConnectTimeout,ReadError,RemoteProtocolError) is raised asAPIConnectionErrorand retried like a connection error. Some escaped as raw httpx exceptions. - A
Retry-Aftergiven as an HTTP date raisedValueError; it is now read as the seconds until that date. - Iterating an
AsyncPagepast 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 builtinPermissionError, which could silently conflate an AICE API 403 with a real filesystem/OS permission error caught in the sameexceptblock. 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 (seedocs/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 foraice_core.exceptions.PermissionError. No other behavior changed — still raised for 403 responses, still carries the samestatus_code/code/request_id/detailsfields.Checked every package in this monorepo: only
aice-sandboxreferenced 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'saice-coredependency floor is bumped to>=0.3.0,<0.4regardless, to avoid a cross-package dependency-resolution conflict ifaice-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.requestand.request_multipart:POST/PATCHrequests now auto-generate anIdempotency-Keyheader by default, and the auto-retry-on-transient-failure behavior now requires that key to be present. Previously,POST/PATCHwere retried on 5xx/429/network failure with no deduplication signal at all.- Pass
idempotency_key=Noneto 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/DELETEare 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_executehelper per sync/async, replacing four near-duplicate copies (requestandrequest_multiparteach had their own). No behavior change for existing non-mutating calls.- The
APIConnectionErrormessage 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/PATCHcall across every dependent package that doesn't explicitly opt out: those calls now send anIdempotency-Keyheader 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-corefloor to>=0.2.0to use the newidempotency_keyparameter.
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), andresponseType: "bytes"returns the response body as aUint8Array(e.g. a zip download). Auth, retries, idempotency and error mapping are unchanged.paramsaccepts 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
timeoutinRequestOptionswas 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,detailsandrequestId. Before, the whole object became the message andcode/detailswere empty. A stringerrorfield (Data Brain, Agent Platform) is still read as message text only, never as the code. requestMultipartfailed on an empty or non-JSON success body; it now parses responses the same way asrequest.- Iterating a
Pagepast its second page re-fetched the second page; each page now fetches its own successor. - A
Retry-Aftergiven as an HTTP date was ignored; it is now honoured.
Changed BREAKING
RateLimitError.retryAfteris in seconds (was milliseconds), the unit of the header and of the Python SDK.Retry-Afteris 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 builtinPermissionErrorto 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'serrors.tsreferenced it internally, updated in this same change but it was never re-exported from@aiceafrica/recommendation's own publicindex.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/PATCHrequests now auto-generate anIdempotency-Keyheader by default, and the auto-retry-on-transient-failure behavior now requires that key to be present. Previously,POST/PATCHwere retried on 5xx/429/network failure with no deduplication signal at all.- Pass
idempotencyKey: nullonRequestOptionsto 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/DELETEare 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 sharedexecutehelper, replacing near-duplicate logic betweenrequestandrequestMultipart. No behavior change for existing non-mutating calls.- The
APIConnectionErrormessage 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/PATCHcall across every dependent package that doesn't explicitly opt out: those calls now send anIdempotency-Keyheader 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.