@core-ai/core-ai
UserMessageandToolResultMessagegainproviderOptions, keyed by provider id, with the newUserMessageProviderOptionsandToolResultMessageProviderOptionsinterfaces for provider packages to augment.
@core-ai/anthropic
- User and tool result messages accept
providerOptions.anthropic.cacheControlfor explicit cache breakpoints with their own TTL. The breakpoint goes on the last content block the message produces. These breakpoints count toward the 4-breakpoint limit and the TTL ordering checks. A user message withcacheControlthat is empty or ends with an empty text part throwsValidationError. - Serialize Messages API request bodies in a cache-friendly key order:
tools,system, andmessagescome first, followed by per-request settings. Gateways that route prompt-cache lookups by the leading bytes of the body now see an identical prefix across turns.
@core-ai/anthropic-vertex
- User and tool result messages accept options under the
anthropic-vertexkey, including per-messagecacheControl. - Improve prompt-cache hit rates on Vertex AI multi-region (
eu,us) andglobalendpoints, which route requests by the leading bytes of the body.
@core-ai/core-ai
- Breaking:
ModelCapabilitiesgains a requiredmessages.systemPlacementfield ('leading' | 'before-reply' | 'anywhere') describing where a model accepts system messages after the first non-system message. CustomChatModelimplementations and capability registries must add it. - Add
validateSystemMessagePlacement(), which provider adapters run before every request and which throws the newUnsupportedSystemMessagePlacementError, andgetSystemMessagePlacementIssues()to check a conversation without sending it.validateMessages()runs every message-level capability check in one call. SystemMessagegainsproviderOptions, keyed by provider id.
@core-ai/anthropic
- Breaking: system messages are no longer joined into the top-level
systemprompt. Leading system messages are sent as onesystemtext block each, which causes one cache miss on the first request after upgrading. On models that reportsystemPlacement: 'before-reply'(Claude Opus 4.8, Sonnet 5, Haiku 5.5 and later, and unrecognized model IDs), a later system message is sent in place. On earlier models, a later system message throwsUnsupportedSystemMessagePlacementError. - System messages accept
providerOptions.anthropic.cacheControlfor per-message cache breakpoints with their own TTL. Requests that exceed 4 breakpoints, place a1hbreakpoint after a5mone, or mismatch the TTL of a breakpoint on the last block throwValidationErrorbefore the request. - Model ID aliases ending in
-latestor-0now resolve to the capabilities of the model they point at, and the Vertex IDclaude-3-5-sonnet-v2is recognized as Claude 3.5 Sonnet.
@core-ai/anthropic-vertex
- System messages accept options under the
anthropic-vertexkey, including per-messagecacheControl. Claude Opus 4.8, Sonnet 5, Haiku 5.5, and later models accept a system message directly after a user or tool message.
@core-ai/google-genai, @core-ai/google-vertex
- Breaking: models report
systemPlacement: 'leading', and a system message after the first non-system message throwsUnsupportedSystemMessagePlacementErrorinstead of being merged intosystemInstruction.
@core-ai/openai, @core-ai/kimi, @core-ai/mistral, @core-ai/xai
- Models report
systemPlacement: 'anywhere', and requests run the system message placement check. System messages are still sent where they appear.
@core-ai/anthropic
- Breaking: the adapter reads
providerOptionsfrom the key matching the model’s provider id (model.provider). Models fromcreateAnthropic()are unaffected; providers built oncreateAnthropicChatProvider()with a customproviderIdread options only from their own key. - Add model capability support for
claude-haiku-5-5.
@core-ai/anthropic-vertex
- Breaking: provider options are read from
providerOptions['anthropic-vertex']instead ofproviderOptions.anthropic. Move existing options to the'anthropic-vertex'key (same fields).AnthropicVertexGenerateProviderOptionsis exported.
@core-ai/google-genai
- Breaking: chat, embedding, and image models read
providerOptionsfrom the key matching the model’s provider id. Models fromcreateGoogleGenAI()are unaffected; providers built oncreateGoogleGenAIProvider()with a customproviderIdread options only from their own key. - Align the Gemini 3 capability table with the model IDs Google serves. Add
gemini-3-flash-previewwith its four thinking levels, and removegemini-3-pro,gemini-3.1-pro, andgemini-3.1-flash-lite-preview.
@core-ai/google-vertex
- Breaking: provider options for chat, embedding, and image models are read from
providerOptions['google-vertex']instead ofproviderOptions.google. Move existing options to the'google-vertex'key (same fields).GoogleVertexGenerateProviderOptions,GoogleVertexEmbedProviderOptions, andGoogleVertexImageProviderOptionsare exported.
@core-ai/anthropic
- A response that stops with
model_context_window_exceededreportsfinishReason: 'length'instead of'unknown'. Upgrade@anthropic-ai/sdkto^0.114.0.
@core-ai/google-genai
- Use each Gemini 3 model’s own thinking levels.
capabilities.reasoning.supportedEffortslists the efforts a model has a level for, andmediumandminimalsendMEDIUMandMINIMALwhere the model accepts them. Efforts without a level are clamped to the nearest one.
@core-ai/core-ai
- Define
maxTokensas the total output allowance, covering reasoning tokens and the visible answer. An omittedmaxTokensmeans the model’s output ceiling, and adapters reject an explicit limit that cannot hold the reasoning budget of the requested effort instead of shrinking the budget. - Add optional
ModelCapabilities.output.maxTokens, the verified output ceiling for a model ID.
@core-ai/anthropic
- Breaking: an omitted
maxTokensusesdefaultMaxTokensif you set it, otherwise the model’s output ceiling (128,000 on Opus/Sonnet 4.6 and later, Fable, and Mythos; 64,000 on Claude 4.5), and 4,096 only for model IDs without a known ceiling. - Breaking: manual thinking budgets (Claude 4.5 and earlier) are no longer shrunk to fit
maxTokens; a limit at or below the budget throwsValidationError. Thehighandmaxbudgets are 50% and 75% of the model’s output ceiling. generate()andgenerateObject()stream internally and return the same result. Mid-stream errors such asoverloaded_errorsurface asModelOverloadedError, and aborts asAbortedError.- Keep redacted thinking blocks in streamed results, and report
output.maxTokensfor known Claude models.
@core-ai/anthropic-vertex
- Breaking:
defaultMaxTokensno longer defaults to 4,096. Requests that omitmaxTokensuse the model’s output ceiling, and manual thinking budgets throwValidationErrorwhenmaxTokenscannot hold them.
@core-ai/google-genai
- Use each Gemini 2.5 model’s documented thinking budget range:
maxmaps to the documented maximum (32,768 on Pro, 24,576 on Flash and Flash-Lite) andhighto 75% of it. - Breaking: an explicit
maxTokensat or below the Gemini 2.5 thinking budget throwsValidationErrorinstead of returning an empty answer. - Report
output.maxTokens(65,536) for known Gemini 2.5 and 3 models andreasoning.thinkingBudgetRangefor Gemini 2.5.
@core-ai/google-vertex
- Re-export
GoogleThinkingBudgetRange. Gemini 2.5 models use their documented thinking budget ranges, and an explicitmaxTokensat or below the thinking budget throwsValidationError.
@core-ai/anthropic
- Add model capability support for
claude-sonnet-5-5,claude-fable-5-1, andclaude-mythos-5-1. Adaptive thinking acceptsmaxeffort and is always on for Fable 5.1 and Mythos 5.1. These models, along withclaude-opus-5-5, reject forced tool choice and non-default sampling parameters.
@core-ai/openai
- Add model capability support for
gpt-6.1-sol. Tool calling requires the Responses API; Chat Completions requests that include tools are rejected.
@core-ai/openai
- Breaking:
gpt-6-solandgpt-6-lunareport Chat Completions function calling as supported. Tool requests are forwarded as given, omittingreasoningno longer setsreasoning_efforttonone, and combining tools withreasoningis no longer rejected.
@core-ai/openai
- Add model capability support for
gpt-6-astra,gpt-6-sol, andgpt-6-luna. These models reason by default and acceptlowthroughmaxeffort.temperatureandtopPare rejected while reasoning is enabled.
@core-ai/anthropic
- Add model capability support for
claude-opus-5-5. Adaptive thinking is always on,maxeffort is supported, and non-default sampling parameters and forced tool choice are rejected.
@core-ai/xai
- Add
@core-ai/xai, a provider for xAI Grok models. Uses the Responses API by default with stateless encrypted-reasoning round trips, and exposes the Chat Completions API under.chat.
@core-ai/openai
- Add the
reasoningTokenAccountingcompatibility option and thepromptCacheKeyprovider option. Encrypted reasoning is requested for always-on reasoning models, and the Responses API no longer sends a reasoning effort to models without configurable efforts. - Breaking:
createOpenAIProvideralways reads provider options fromproviderOptions[providerId]on both APIs. TheproviderOptionsKeyfactory option is removed; use the newresponsesProviderOptionsSchemafactory option to validate a wrapper’s Responses options.
@core-ai/azure-openai
- Breaking: provider options are read from
providerOptions['azure-openai']on every API (v1 Responses, v1 Chat Completions, and classic). Move existing options from theopenaikey. Typed viaAzureOpenAIResponsesGenerateProviderOptionsandAzureOpenAIChatGenerateProviderOptions.
@core-ai/openai-compat
- Breaking: provider options are read from
providerOptions['openai-compat']. Move existing options from theopenaikey. Typed viaOpenAICompatGenerateProviderOptions.
@core-ai/omnifact
- Breaking: provider options are read from
providerOptions.omnifact. Move existing options from theopenaikey. Typed viaOmnifactGenerateProviderOptions.
@core-ai/core-ai
- Add per-tool strict tool schemas:
defineTool({ strict: true })opts a single tool into provider-enforced schema adherence,ModelCapabilities.tools.strictSchemasreports model support, and strict tools are validated locally against the strict-capable schema contract (object root, closed objects, every key required, and the keyword subset every strict-capable provider accepts). Violations throwToolSchemaStrictnessErrorwith aviolationslist naming each offending schema path and a fix hint.
@core-ai/anthropic
- Strict tool schemas are now per-tool opt-in on Claude 4.5 and later models; previous releases marked every tool strict. The 20-strict-tool limit counts only opted-in tools, and discriminated unions (
oneOf) are rewritten toanyOf. The internalstrictToolSchemasEnabledfactory option was removed.
@core-ai/anthropic-vertex
- Breaking: the
useStrictToolSchemasoption was removed. Strict tool schemas follow the per-tool opt-in and the underlying model capabilities. Vertex enforces thestructured_outputspartner-model feature through your GCP organization policy.
@core-ai/openai
- Support per-tool
strict: trueon the Responses and Chat Completions APIs. Strict tools are sent with a normalized schema ($schemastripped,additionalProperties: falseadded recursively,oneOfrewritten toanyOf); non-strict tools keep the raw schema and carry an explicitstrict: falseon the Responses API. Models that predate Structured Outputs report strict schemas as unsupported through both APIs; unknown model IDs, including fine-tunedft:...models, resolve optimistically to supported. ThestrictToolSchemas,strictToolSchemasUnsupportedReason/Details, anddisableParallelToolCallsWithStrictToolsfactory options were removed.
@core-ai/azure-openai
- Support per-tool
strict: trueon the v1 (Responses) endpoint and on classic deployments with API version2024-08-01-previewor later; thestrictToolSchemasEnableddeployment assertion was removed.
@core-ai/openai-compat
- Forward per-tool
strict: truefunction tools with normalized schemas to gateways that implement OpenAI strict function tools; thestrictToolSchemasendpoint assertion was removed.
@core-ai/kimi
- Forward per-tool
strict: truefunction tools with normalized schemas.
@core-ai/omnifact
- Report strict tool schemas as supported and forward per-tool
strict: trueto the gateway with normalized schemas.
@core-ai/google-genai, @core-ai/google-vertex, @core-ai/mistral
- Report per-tool strict schemas as unsupported; a tool with
strict: truethrowsToolSchemaStrictnessErrorbefore any provider I/O.
@core-ai/core-ai
- Add
ProviderQuotaExceededErrorfor non-retryable provider billing and exhausted-credit failures.
@core-ai/openai
- Raise Responses API failures (
error/response.failedstream events, and generatestatus: 'failed') as provider errors instead of a successful result withfinishReason: 'unknown'.response.incompleteends the stream with the reported finish reason (length/content-filter) and usage. - Map in-band Azure
no_capacitystream errors toModelOverloadedError.
@core-ai/mistral
- Map Mistral
service tier capacity exceedederrors toModelOverloadedError, aligning backend-capacity errors with AzureNoCapacityand Anthropicoverloaded_error.
@core-ai/anthropic, @core-ai/openai, @core-ai/google-genai, @core-ai/mistral
- Normalize non-retryable billing and exhausted-credit failures to
ProviderQuotaExceededError.
@core-ai/google-genai
- Add model capability support for
gemini-3.8-flash,gemini-3.7-flash,gemini-3.6-flash,gemini-3.5-flash, andgemini-3.5-flash-lite.
@core-ai/core-ai
- Add
ProviderError.codeso adapters can lift the provider’s machine-readable error identifier, andcreateChatStream({ mapError })so in-band stream failures use the same typed errors as the initial request.
@core-ai/anthropic
- Wrap in-band stream errors as typed provider errors and expose the Anthropic error type as
ProviderError.code. In-bandapi_errorandtimeout_errorbecome a retryableServiceUnavailableError.
@core-ai/openai
- Wrap in-band stream errors as typed provider errors and expose the OpenAI error
code(includinginsufficient_quotaandcredit_balance_exhausted). - Classify Azure OpenAI context-window responses without a machine-readable error code as
ContextLengthExceededError.
@core-ai/google-genai
- Wrap in-band stream errors as typed provider errors and expose Google’s gRPC status (for example
RESOURCE_EXHAUSTED) asProviderError.code.
@core-ai/mistral
- Wrap in-band stream errors as typed provider errors and expose the Mistral error type as
ProviderError.code.
@core-ai/core-ai
- Allow application-owned metadata on image, file, and audio input parts.
@core-ai/core-ai
- Add optional application-owned
metadatatoSystemMessage. Provider adapters ignore it and never serialize it to provider APIs.
@core-ai/core-ai
- Add
providerMetadatatoToolCallPartand thetool-call-endstream event so provider-owned data attached to a tool call, such as a Google thought signature, survives aggregation and can be replayed with the call.
@core-ai/google-genai
- Round-trip thought signatures on function calls. Without this, Gemini 3 rejects multi-step tool calling with a 400 for a missing
thought_signature. Assistant text is read from candidate parts instead of the SDK.textgetter.
@core-ai/openai
- Namespace Responses API encrypted reasoning under each wrapper’s
providerIdinstead of always usingopenai. Foreign namespaces downgrade to thinking text; same-namespace ciphertext still round-trips.
@core-ai/azure-openai
- Breaking: Responses encrypted reasoning is stored under
azure-openaiinstead ofopenai. Read metadata withgetProviderMetadata(..., 'azure-openai'). ForeignproviderMetadata.openaiciphertext is downgraded to thinking text on Azure continuation.
@core-ai/core-ai
- Breaking: add chat modality capabilities as directional arrays on the required
ModelCapabilities.modalitiesfield:input(ChatInputModality[]) andoutput(ChatOutputModality[]). CustomChatModelimplementations and capability registries must add it. Presets (TEXT_ONLY_MODALITIES,MULTIMODAL_INPUT_MODALITIES) and helpers (supportsInputModality,supportsOutputModality) are exported. - Add
validateInputModalities, which rejects user content parts whose modalities the model does not support withUnsupportedInputModalityError. Provider adapters run the same check before sending a request. - Breaking: add base64
AudioPartuser content. Code that exhaustively handlesUserContentPartmust add an'audio'branch.
@core-ai/openai
- Report chat modalities per model and reject images for text-only models (
gpt-3.5-turbo,o1-mini,o3-mini) before calling the API. - Accept WAV and MP3 audio input on supported Chat Completions audio models.
- The Responses adapter resolves capabilities and the provider id from the chat model, so wrappers such as
@core-ai/azure-openaivalidate against their own capability registry.
@core-ai/anthropic
- Report chat modalities (
['text', 'image', 'file']input) and reject audio user content before calling the API.
@core-ai/google-genai
- Report chat modalities and accept base64 audio input on Gemini chat models.
@core-ai/mistral
- Resolve capabilities per model. Vision families advertise image input, while text-only families (
codestral,devstral-*,open-mistral-*,open-mixtral-*) reject images before the request is sent. Pinned versions from before a family gained vision are reported as text-only. - Reject unsupported audio user content.
@core-ai/kimi
- Report chat modalities. K2.7 Code models are text-only and reject image and audio parts before the request is sent.
@core-ai/opentelemetry
- Serialize audio user content in recorded chat input attributes.
@core-ai/anthropic
- Add model capability support for
claude-opus-5.
@core-ai/core-ai
- Add a reusable model capabilities registry with normalized model ID lookup, a fallback for unknown models, and explicit reasoning modes, sampling constraints, and supported tool choices.
- Add structured
ProviderErrorsubclasses (ContextLengthExceededError,RateLimitError,ModelOverloadedError,ServiceUnavailableError) with aRetryableProviderErrorbase for transient failures, includingRetry-Afterparsing.
@core-ai/kimi
- Add
@core-ai/kimi, a provider for the Moonshot AI Kimi API built on the shared OpenAI-compatible implementation, with nativereasoning_contentsupport, preserved thinking round-trips, and structured output viagenerateObject()/streamObject().
@core-ai/openai
- Add native reasoning round trips, JSON object structured output, capability-driven request validation, and capability overrides through a shared registry.
- Breaking: the
nativestructured output mode is renamed tojson-schema. - Map SDK failures to structured
ProviderErrorsubclasses, including non-retryableinsufficient_quotaand AzureNoCapacityoverload. - Convert historical reasoning to assistant text for models that do not support reasoning input.
@core-ai/openai-compat
- Breaking: the
nativestructured output mode is renamed tojson-schema. Add ajson-objectmode for endpoints that support JSON Mode.
@core-ai/anthropic
- Map SDK failures to structured
ProviderErrorsubclasses, including Vertex error envelopes and correct rate-limit vs context-length discrimination.
@core-ai/google-genai
- Map SDK failures to structured
ProviderErrorsubclasses, including streaming error bodies and Vertex throttled overload. - Report always-on reasoning for Gemini models whose thinking cannot be disabled.
@core-ai/mistral
- Map SDK failures to structured
ProviderErrorsubclasses. - Preserve historical reasoning when sending conversation history. Native reasoning is replayed as a thinking chunk only when the target model supports it; otherwise it is injected as
<thinking>text.
@core-ai/anthropic-vertex
- Add a first-party Anthropic Vertex AI provider for Claude models. Authenticates with Application Default Credentials or an explicit service account key.
- Allow disabling strict tool schemas with the
useStrictToolSchemasprovider option.
@core-ai/google-vertex
- Add a first-party Google Vertex AI provider for Gemini, embedding, and Imagen models with Application Default Credentials or explicit service-account authentication.
@core-ai/openai-compat
- Add a standalone Chat Completions provider for OpenAI-compatible gateways. Configure nonstandard reasoning extraction and structured output transport independently with
reasoningandstructuredOutputMode. - Select the Chat Completions token-limit parameter automatically for known OpenAI models while keeping
max_tokensas the compatibility default for unknown models.
@core-ai/openai
- Root
createOpenAI()uses the Responses API by default. Strict Chat Completions are available atopenai.chat.chatModel(). Object generation prefers native strict JSON Schema output. - Map
maxTokenstomax_completion_tokensfor known GPT-5 and o-series models when using strict Chat Completions.
@core-ai/azure-openai
- Azure OpenAI v1 uses the Responses API by default. Strict Chat Completions are available at
azure.chat.chatModel(). Classic API access is unchanged. - Select
max_completion_tokensautomatically for known OpenAI model IDs used with Azure Chat Completions while keepingmax_tokensfor unknown deployment names.
@core-ai/google-genai
- Support Gemini native image models through
imageModel()while preserving the existing Imagen generation path. - Expose a reusable provider factory with configurable provider attribution for Google GenAI clients.
@core-ai/omnifact
- Use the shared OpenAI compatibility layer for nonstandard reasoning response fields.
- Always map
maxTokenstomax_completion_tokensfor Omnifact Chat Completions requests.
@core-ai/core-ai
- Normalize dated Vertex model IDs for capability detection.
@core-ai/core-ai
- Add optional application-owned metadata on text-bearing message parts and
text-start/text-endstream events. Stream aggregation preserves metadata through results andresultToMessage().
@core-ai/core-ai
- Add a shared
ModelCapabilitiescontract onChatModelwith reasoning support and sampling restrictions. Expose providerget*ModelCapabilitieshelpers so consumers can inspect model behavior without duplicating provider maps.
@core-ai/openai
- Add model capability support for
gpt-5.6-sol,gpt-5.6-terra, andgpt-5.6-luna.
@core-ai/anthropic
- Add model capability support for
claude-sonnet-5.
@core-ai/axiom
- Add a first-party Axiom GenAI telemetry package with
createAxiomMiddleware, embedding and image middleware aliases, and OTLP exporter configuration helpers.
All packages
- Add
requireanddefaultexport conditions so packages resolve under CommonJS loaders such as tsx.
@core-ai/omnifact
- Add a first-party Omnifact provider for the Omnifact API Gateway with a default production base URL.
@core-ai/azure-openai
- Add an Azure OpenAI chat provider with v1 Chat Completions support by default and classic API fallback.
@core-ai/openai
- Add model capability support for GPT-5.5, GPT-5.4 mini/nano, GPT-5.3 Codex, GPT-5 Pro, o3-pro, and GPT Image 2.
- Export
createOpenAICompatChatModelfrom@core-ai/openai/compatand allow a custom provider id in the compat chat layer.
@core-ai/anthropic
- Add model capability support for Claude Fable 5, Claude Mythos 5, Claude Opus 4.8, and Claude Opus 4.7, including adaptive-thinking effort support.
@core-ai/core-ai
- Normalize provider model IDs with dashed
YYYY-MM-DDsnapshot suffixes so current model aliases and snapshots share capability handling.
@core-ai/langfuse
- Add a first-party Langfuse middleware package for chat, embedding, and image model telemetry.
@core-ai/core-ai
- Add model-level middleware wrappers (
wrapChatModel,wrapEmbeddingModel,wrapImageModel) for intercepting and augmenting model calls.
@core-ai/opentelemetry
- Add first-party OpenTelemetry middleware via
createOtelMiddleware,createOtelEmbeddingMiddleware, andcreateOtelImageMiddleware.
@core-ai/core-ai
- Standardize library error handling around
CoreAIError,ValidationError,ProviderError, and abort error classes so callers can distinguish validation, abort, provider, and structured output failures without relying on provider SDK exceptions.
@core-ai/openai
- Wrap provider SDK errors in the standardized
CoreAIErrorhierarchy.
@core-ai/anthropic
- Wrap provider SDK errors in the standardized
CoreAIErrorhierarchy.
@core-ai/mistral
- Wrap provider SDK errors in the standardized
CoreAIErrorhierarchy.
All packages
- Require Zod 4 (
^4.0.0) and switch JSON Schema conversion to Zod 4’s nativez.toJSONSchema()support. - Export
zodSchemaToJsonSchema()from@core-ai/core-aifor direct schema conversion.
@core-ai/core-ai
- Refactor internal chat/image wrapper plumbing and stream event reduction logic to reduce duplication and improve readability without changing public behavior.
@core-ai/openai
- Add model capability support for
gpt-5.4andgpt-5.4-pro. - Refactor chat adapter internals to reduce duplicated stream and part-aggregation logic, and consistently report
finishReason: 'tool-calls'when a function call is emitted from the stream.
@core-ai/google-genai
- Add model capability support for
gemini-3.1-proandgemini-3.1-flash-lite-preview. - Refactor adapter internals to reduce duplication and simplify stream/request helper logic without changing runtime behavior.
@core-ai/mistral
- Refactor adapter internals to reduce duplication and simplify stream/request helper logic without changing runtime behavior.
@core-ai/core-ai
- Replace
ModelConfigwith flat sampling fields (temperature,maxTokens,topP) on generate options. Introduce method-specific typed provider option interfaces (GenerateProviderOptions,EmbedProviderOptions,ImageProviderOptions) that providers extend via declaration merging. - Restructure reasoning
providerMetadatato use provider-namespaced keys. Adapters now detect cross-provider reasoning blocks and downgrade them to plain text instead of forwarding opaque metadata. AddgetProviderMetadatahelper. - Redesign chat and object streaming around replayable stream handles with
resultandevents, rename the handle types toChatStreamandObjectStream, and accept caller-providedAbortSignals for cancellation.
@core-ai/openai
- Migrate default chat models to the OpenAI Responses API and add a
@core-ai/openai/compatentrypoint for Chat Completions compatibility. - Namespace provider options under
openaikey with Zod validation. Responses API options:store,serviceTier,include,parallelToolCalls,user. Compat options:stopSequences,frequencyPenalty,presencePenalty,seed. Embed options:encodingFormat,user. Image options:background,moderation,outputCompression,outputFormat,quality,responseFormat,style,user. - Update streaming adapters to expose replayable stream handles using
ChatStreamandObjectStream.
@core-ai/anthropic
- Namespace provider options under
anthropickey with Zod validation. Generate options:topK,stopSequences,betas,outputConfig. - Restructure reasoning
providerMetadatato use provider-namespaced keys. - Update streaming adapters to expose replayable stream handles using
ChatStreamandObjectStream.
@core-ai/google-genai
- Namespace provider options under
googlekey with strict Zod validation. Generate options:stopSequences,frequencyPenalty,presencePenalty,seed,topK. Embed options:taskType,title,mimeType,autoTruncate. Image options:aspectRatio,personGeneration,safetyFilterLevel,negativePrompt,guidanceScale,seed. - Restructure reasoning
providerMetadatato use provider-namespaced keys. - Update streaming adapters to expose replayable stream handles using
ChatStreamandObjectStream.
@core-ai/mistral
- Namespace provider options under
mistralkey with Zod validation. Generate options:stopSequences,frequencyPenalty,presencePenalty,randomSeed,parallelToolCalls,promptMode,safePrompt. Embed options:outputDtype,encodingFormat,metadata. - Restructure reasoning
providerMetadatato use provider-namespaced keys. - Update streaming adapters to expose replayable stream handles using
ChatStreamandObjectStream.
All packages
- Fix release publish race: remove
prepublishOnlyto avoid concurrent tsup builds failing to resolve@core-ai/core-ai.
@core-ai/core-ai
Add unified reasoning/thinking support with effort-based configuration.Breaking changes:AssistantMessage:contentandtoolCallsfields replaced byparts: AssistantContentPart[]arrayStreamEvent:content-deltarenamed totext-delta, newreasoning-start,reasoning-delta,reasoning-endevents addedGenerateResult: adds requiredpartsandreasoningfieldsChatOutputTokenDetails.reasoningTokens: changed fromnumberto optional
ReasoningEffort, ReasoningConfig, AssistantContentPart, ReasoningPartNew utilities: resultToMessage() for multi-turn reasoning state preservation, assistantMessage() for convenient message constructionNew option: reasoning?: ReasoningConfig on GenerateOptions, GenerateObjectOptions, StreamObjectOptions@core-ai/openai
- Add reasoning support for OpenAI models (Chat Completions API). Maps unified
reasoning.efforttoreasoning_effortwith model-aware clamping. Extracts reasoning content from responses and streams. Validates parameter restrictions for GPT-5.1+ models.
@core-ai/anthropic
- Add reasoning support for Anthropic models with adaptive and manual thinking modes. Maps unified
reasoning.effortto adaptive effort levels or manualbudget_tokensbased on model capabilities. Extracts thinking and redacted thinking blocks with signature preservation for multi-turn fidelity.
@core-ai/google-genai
- Add reasoning support for Google GenAI models. Maps unified
reasoning.efforttothinkingLevelfor Gemini 3 orthinkingBudgetfor Gemini 2.5 based on model capabilities. Extracts thought content with thought signature preservation for multi-turn fidelity.
@core-ai/mistral
- Add reasoning support for Mistral Magistral models. Extracts thinking chunks from response content and streams as reasoning events.
@core-ai/core-ai
Refactor the coreChatUsage contract to nested detail objects for input and output token accounting.Breaking changes:- Remove
usage.totalTokens - Move
usage.reasoningTokenstousage.outputTokenDetails.reasoningTokens - Add
usage.inputTokenDetails.{cacheReadTokens, cacheWriteTokens}
@core-ai/openai
- Update usage mapping to the new nested
ChatUsagestructure. Mapsprompt_tokens_details.cached_tokenstoinputTokenDetails.cacheReadTokensandcompletion_tokens_details.reasoning_tokenstooutputTokenDetails.reasoningTokens.
@core-ai/anthropic
- Update usage mapping to the new nested
ChatUsagestructure. Reports totalinputTokensincluding cache tokens, mapscache_read_input_tokensandcache_creation_input_tokenstoinputTokenDetails.
@core-ai/google-genai
- Update usage mapping to the new nested
ChatUsagestructure. MapscachedContentTokenCounttoinputTokenDetails.cacheReadTokensandthoughtsTokenCounttooutputTokenDetails.reasoningTokens.
@core-ai/mistral
- Update usage mapping to the new nested
ChatUsagestructure with zero defaults for cache and reasoning token details.
@core-ai/core-ai
- Add first-class structured output support with
generateObject()andstreamObject()across core and all provider chat models. Introduces schema-driven typed object generation, structured output streaming events, and standardized structured-output errors. - Clarify embedding usage semantics by making
EmbedResult.usageoptional in the core API contract, so providers can returnusage: undefinedwhen token counts are not exposed by the underlying API.
@core-ai/openai
- Add structured output support with
generateObject()andstreamObject().
@core-ai/anthropic
- Add structured output support with
generateObject()andstreamObject().
@core-ai/google-genai
- Add structured output support with
generateObject()andstreamObject(). - Update embedding behavior to only include usage when token statistics are present, and add provider E2E contract coverage.
@core-ai/mistral
- Add structured output support with
generateObject()andstreamObject().
All packages
- Add initial Zod 4 compatibility by broadening package ranges and updating
zod-to-json-schemato a version that supports Zod 4.