Skip to content

0.1.0

Choose a tag to compare

@objecthub objecthub released this 21 Nov 14:35
· 4 commits to main since this release

Changelog

0.1.0 (2026-11-21)

First release.

  • GPTLanguageModel: OpenAI's GPT models as a Foundation Models language model, backed by the Responses API.
    • Generation: text, streaming, guided generation with strict JSON schemas, tool calling, reasoning with summaries.
    • Input: images and PDF attachments.
    • Usage reporting, with cached and reasoning tokens.
  • Conversations are stateless by default: every request carries the whole transcript, with the model's reasoning as encrypted items. state: .stored stores responses at OpenAI and continues them by ID, falling back to the whole transcript whenever it no longer matches the stored conversation.
  • Model output is recorded on its transcript entries and replayed exactly: reasoning with its encrypted content, function calls, built-in tool calls.
  • Strict schemas: optional properties are sent as nullable and their nulls removed again; schemas that aren't objects are wrapped; properties keep their declared order.
  • GPTModel:
    • constants for the GPT-6, GPT-5, o3, and GPT-4 models, with the reasoning efforts each accepts and its default;
    • GPTModel.available(auth:) lists the API's models.
  • Built-in tools: web search and code interpreter. GPTToolActivity reads their calls back out of a transcript.
  • Token counting with the API's input token endpoint.
  • Error mapping to LanguageModelError, GPTError, and GPTAPIError. Unverifiable encrypted reasoning is dropped and the request retried.
  • Streams that send no events for three times the request timeout fail with a timeout instead of hanging.
  • The package builds for macOS 14 / iOS 17; its API is available on the OS 27 releases.