Covers every change since 0.9.2, the last release on the latest tag, including 0.9.3, which only shipped as dev and canary builds.
Added
Added the getEnvApiKey export, so a caller can check whether a provider has an API key in the environment using the same lookup aikit applies when it opens that provider.
Added gpt-6-luna to the OpenAI Codex catalog. The Codex backend serves it to ChatGPT accounts, with every reasoning level from low to max and reasoning off.
Changed
Updated @ai-sdk/openai to ^4.0.81 and @ai-sdk/provider to ^4.0.19.
Fixed
Fixed images reaching models that cannot read them. For a model whose input does not include "image", each image in a user message is now replaced with (image omitted: model does not support images) and each image in a tool result with (tool image omitted: model does not support images); consecutive images collapse to one placeholder. The message and tool result are kept, so the model still knows an image was there. Previously a user image was silently dropped, which removed an image-only message entirely, and a tool-result image was sent anyway, which providers often reject. Vision models are unchanged.
Fixed retry-after-ms and an HTTP-date retry-after being ignored when normalizing a provider failure. Only a retry-after given in seconds was read, so retryAfterMs was missing and a retry could come before the server’s requested wait.
Fixed OpenAI and Codex reasoning levels that the API rejects. minimal is no longer offered for gpt-5.4 through gpt-6 and is clamped to low, since these models reject it. xhigh and max are now offered on gpt-5.6 and gpt-6 models through the OpenAI API, and max stays off gpt-5.5 and earlier. OpenAI gpt-5.6 and gpt-6 models now turn reasoning off with none, as do Codex gpt-5.5, gpt-5.6-luna and gpt-6-luna.
Fixed gpt-6-luna ignoring a request to turn reasoning off. @ai-sdk/openai 4.0.66 dropped reasoningEffort: "none" for the model; aikit now requires 4.0.81.
Fixed every request to Claude Sonnet 5.5, Opus 5.5 and the Fable 5 models failing when no reasoning level was set. aikit sent thinking: {type: "disabled"}, which these models reject; they cannot turn thinking off, so aikit now leaves thinking to the model.
Fixed Claude thinking levels. xhigh and max are now offered on Opus 4.7 and 4.8, the Sonnet 5, Opus 5 and Fable 5 families, and max on Sonnet 4.6 and Opus 4.6; previously these requests were clamped down to high.
Fixed Claude Sonnet 4.5’s context window on the Anthropic API, which is 200k tokens, not 1M (1M needs a beta header). Responses were sized against the wrong window, so long sessions failed with a context overflow instead of a shorter answer.
Fixed a prompt that already overflows the context window failing as an invalid max_output_tokens. The response ceiling is no longer shrunk below 16 tokens, the smallest OpenAI accepts, so the provider’s context overflow error reaches the caller and isContextOverflow recognises it.
Fixed conversations started on OpenAI Codex failing when continued on OpenAI, Anthropic or OpenRouter. Codex tool call IDs (call_…|fc_…) exceed the 64-character call_id limit of OpenAI and of OpenRouter upstreams such as Meta, and contain characters Anthropic rejects; they are now shortened to the unique call part for those providers.
Fixed a provider error sent mid-stream, such as OpenAI’s context_length_exceeded event, being reported as an Unknown failure. It is now classified by its status and code like an error returned before the stream starts, so the same overflow is an InvalidRequest either way.
Internal
The OpenAI, Codex, Anthropic and OpenRouter live e2e suites now run against a model matrix: gpt-6-luna through gpt-5.4-nano for OpenAI, gpt-6-luna, gpt-5.6-luna and gpt-5.5 for Codex, Claude Sonnet 4.6 through Fable 5.1 plus the 4.5 generation for Anthropic, and Muse Spark 1.3, GLM 5.3 Flash, DeepSeek V4.1 Flash and Gemini 3.8 Flash for OpenRouter. New suites cover every reasoning level, context overflow, cross-model and cross-provider handoff, and prompt caching.
Added Model.configureCatalog(path), Model.catalogPath(), and Model.reloadCatalog(). An embedder can keep models.gen.json somewhere other than the working directory (CODEWORK_MODELS_FILE still wins), and a long-running process can pick up a regenerated catalog without restarting.
Fixed
Fixed generateModels reusing the first models.dev download for the life of the process. Every call now fetches again, so a process that regenerates its catalog gets current data.
Fixed a catalog that failed to load, for example because the file did not exist yet, staying failed for the life of the process. Model.reloadCatalog() now clears the failure along with the loaded catalog.
Fixed generateModels writing the catalog in place, where a concurrent reader could see a partial file. It now writes a temp file and renames it over the catalog.
Fixed an error response from models.dev surfacing as a JSON parse error. It now fails with the HTTP status.
Fixed a request that hit timeoutMs being reported as if the caller had cancelled it. Only the caller’s own signal now ends a stream with stopReason: "aborted"; an abort raised inside the AI SDK, such as its timeout timer, ends it with stopReason: "error" and a Timeout failure. Callers can now tell a timeout from a cancel and retry it, and codework run prints error[timeout] instead of exiting silently as if Ctrl+C had been pressed.
Added a GitHub Copilot provider, exported as createGitHubCopilot / githubCopilot. Copilot serves three inference protocols on one host, so the provider routes each model to the one it actually speaks — OpenAI Chat Completions, OpenAI Responses, or Anthropic Messages — and applies Copilot’s client identity to every request.
Added the github-copilot protocol to the catalog, options, registry, and thinking paths, so Copilot models are selected and configured like any other provider’s.
Added per-route reasoning control for Copilot models, which do not share one: the Messages route takes a thinking budget or an adaptive effort level, the Responses route takes a reasoning effort, and the chat route has no generic control and relies on compat.supportsThinkingTokenBudget.
Added GitHub Copilot OAuth. aikit auth --github-copilot runs the GitHub device flow, checks that the account can use Copilot, and records the plan-specific API host and the models the account can actually see. --enterprise <domain> targets a GitHub Enterprise host, and --enable-models turns on catalog models the account has left unconfigured.
Added getGitHubCopilotApiKey, which resolves a Copilot token from COPILOT_GITHUB_TOKEN or the auth.json store, and from nothing else. GITHUB_TOKEN and GH_TOKEN are deliberately not consulted — they are usually set for git or gh and carry no Copilot access, and in GitHub Actions GITHUB_TOKEN is a workflow token — and neither is a token another application stored for itself, such as an editor’s Copilot sign-in.
Added Copilot entries to models generate, carrying each model’s endpoint routing, thinking-level map, extended context window where GitHub documents one, and compatibility flags.
Added device-code login for OpenAI Codex, aikit auth --openai-codex --device. It needs no local callback port, so it works over SSH, inside a container, and when another sign-in already holds port 1455.
Added the oauth/github/copilot, oauth/summary, and oauth/interactive subpath exports, covering Copilot credentials, how a login is described to a user, and the terminal helpers an interactive login needs.
Changed
Changed the Codex callback server to bind the port and path its redirect URI names, rather than a second hardcoded copy of them, so a caller-supplied redirectUri now works.
Changed a failed callback bind from silence to an explanation. Port 1455 is usually held by another Codex sign-in, which would receive the callback, so the login now says so before falling back to asking for the redirect URL.
Changed aikit auth to print credential metadata on stdout and every notice on stderr, so --json output is parseable.
Changed an unreadable auth.json to fail with the path and the parse error, rather than whatever the underlying reader raised.
Updated the AI SDK provider packages and typebox to current releases.
Breaking Changes
Removed --originator, --print-headers, and --manual from aikit auth. The first two had no caller behind them, and --device now covers what --manual was for without needing a callback port at all.
Removed onManualCodeInput from the Codex login options. A callback that never arrives already falls back to onPrompt, which is what that option raced against.
Added context-aware response sizing: every request now measures what the conversation already costs and shrinks its output ceiling to what the context window can still hold, instead of asking for an answer that cannot fit.
Added adaptive thinking for newer Claude models, which receive an effort level and size each turn’s reasoning themselves rather than being pinned to a fixed token budget.
Added usage.cacheWrite1h, the portion of a cache write made with 1h retention, where the provider reports the split.
Added isRecoverableLength, which reports whether a length stop ended below the output limit that was actually requested, so callers can decide whether one compact-and-retry attempt is worthwhile.
Added compat.thinkingTokenBudgetField and compat.supportsThinkingTokenBudget, letting an OpenAI-compatible endpoint declare the request field it takes a thinking-token budget in.
Added compat.forceAdaptiveThinking to the generated catalog for Claude models that support it.
Added native JSON Schema output support to the OpenAI Codex provider and a live Codex round-trip regression test.
Changed
Changed maxTokens to mean the room reserved for the answer. A thinking budget is added on top and the total is clamped to the model’s ceiling, so raising the thinking level no longer silently shortens the answer.
Changed default thinking budgets to fixed token counts per level (1024, 2048, 8192, 16384) rather than a fraction of each model’s output ceiling, so one setting behaves the same across large and small models. xhigh and max inherit the high budget unless one is configured for them.
Changed reasoning to be switched off explicitly when no thinking level is requested. Models that reason by default previously did so anyway, spending output tokens on reasoning the caller never asked for.
Changed Google thinking configuration to use per-family token budgets, and to send a thinking level rather than a budget for the model families that take one.
Aligned OpenAI Codex request shaping with the ChatGPT Codex backend: requests always disable storage, include encrypted reasoning content, and derive the prompt cache key from the provider session ID.
Fixed
Fixed an oversized thinking budget consuming the entire response. A budget that does not fit is now reduced, always leaving at least 1024 tokens for the answer, instead of shrinking the answer toward a single token.
Fixed Anthropic requests counting the thinking budget twice, which inflated the requested ceiling and, with an explicit maxTokens, produced answers several times longer than asked for.
Fixed a thinking budget below a provider’s own minimum being sent as an enabled request, which the provider rejected outright. Thinking is now dropped for that turn instead, so a nearly full context still produces an answer.
Fixed 1h cache writes being billed at the 5-minute rate. The 1h portion is now priced at twice the base input rate, correcting a roughly 37% understatement of cache-write cost whenever long cache retention is enabled.
Fixed service-tier pricing being applied only to OpenAI Codex requests and being calculated from the tier requested rather than the tier the response was served at.
Fixed rate-limit and throttling errors being misread as context overflow, which sent callers to compact a conversation that was never too long instead of retrying.
Fixed context-overflow detection missing providers that truncate an oversized prompt to fit the window and then stop with no output, and broadened the recognized provider error messages.
Fixed thinking-token budgets never reaching OpenAI-compatible endpoints that accept one.
Fixed the default response ceiling being capped at a fixed 32000 tokens for models whose catalog output limit approaches their context window; the context-aware ceiling now decides.
Replaced the OpenAI Codex SSE decoder with a standards-compliant parser, rejected streams that close before a terminal Responses event, and stopped accepting WebSocket-only completion events on the HTTP transport.
Distinguished transient Codex rate limits from terminal plan and quota failures while preserving structured error codes, retry timing, and OpenAI request IDs.
Restricted persisted OpenAI Codex OAuth credentials to owner-only file permissions and redacted token material from OAuth failure messages.
Breaking Changes
Changed the meaning of maxTokens from the whole response to the answer alone. A request that previously carved the thinking budget out of maxTokens now adds it on top, so responses can be longer than before at the same setting.
Changed default thinking budgets to absolute token counts. On models with a large output ceiling these are substantially smaller than the previous proportional defaults; set thinkingBudgets explicitly to keep the old amounts.
Changed requests without a thinking level to disable reasoning explicitly. Providers whose models reason by default will no longer do so unless a level is set.
Removed the store, include, and promptCacheKey OpenAI Codex language-model options. These backend-required values are now controlled by the provider.
Removed the unused agent lifecycle event protocol from the public Event namespace: AgentEventType, AgentEventSchema, AgentEvent, and the tool.execution.start / tool.execution.update / tool.execution.end types. LLM stream events (LLMMessageEvent) are unchanged.
Internal
Extracted thinking resolution, request pricing, and context estimation into llm/thinking.ts, llm/pricing.ts, and utils/estimate.ts, so each derivation from model metadata has one home and can be tested directly.
Added Model.optionsKey as the single accessor for a model’s provider option namespace, replacing a copy inside the streaming module.
Surfaced the service tier a Codex response was served at in provider metadata, so a turn is priced by what it actually cost.
Reorganized the OpenAI Codex unit tests by provider module and expanded live coverage for empty messages, response IDs, Unicode surrogate handling, incomplete tool-call histories, native grammar tools, and structured output using HTTP/SSE behavior as a reference.
Renamed the Codex OAuth suite for clarity and added CLI coverage for credential status, refresh, and logout wiring.
Removed unit coverage for the unused agent lifecycle event schemas.