The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
@effect/ai-openai
4.1.2
Patch Changes
- Updated dependencies [
5216684,b707ad1,46f48af,92201bc,cf329f3,1d25d78,d190d97,d7b3b6b,a478745,69eaa29,3711ba6,715c5e4,b0a1cee,2a10622,6bccdd5,60be011,e1edcdc,ef81e9d,013fb34,113dbc7,519d66e,e7a6ea4,019f35e,2a0d16c,e5570c9]:
4.1.1
Patch Changes
- Updated dependencies [
8567117,3f5c6aa,29b89b6,0b4cfbc,088510f,ad62cd7,ba406a5,5e56eba,6a95d51,24d5acd,c38dfa0,f2755e7,a40cb20,bd6b9c2,49d84d6,a8f77d5,7a9c22f,efcb8cc,378f5f0,d4272bd,7d6ead4,59178ce,9394b6d,5d3f066,49d84d6,2863a22,49d84d6,49d84d6,20cca92,1f22f02,dd2b7a3,52f4e42,194dd79,c5de00a,460827e,0325583,20bef50,2f50b91,b41529e,80954c9,5daca23,c96c31e,136ddf9,5ca262e,898b049,73e6ea1,937f170,f5f96b2,1946637,197ce1d,b49120e,33d3088]:
4.1.0
Minor Changes
- #8829
3c42058Thanks @effect-bot! - RemoveAiError.HttpRequestDetailsandResponse.HttpRequestDetails, so AI errors and response metadata no longer carry request headers or query parameters.AiError.NetworkErrorrecords the request asmethodandurlfields instead ofrequest, and therequestfield is gone fromAiError.HttpContextandResponse.ResponseMetadataPart.
Patch Changes
#8829
7ea1ea2Thanks @wmaurer! - Add an optionalcauseto the AINetworkError. It holds theHttpClientErrorthe request failed with, stored unchanged and not redacted, so the reason a request failed is no longer lost. The newNetworkError.fromHttpClientErrorsets it, and all AI providers now use it.NetworkError.fromRequestErroris unchanged.#8829
3f8f359Thanks @jem-computer! - Declare decision images as input fields withDecision.Image, and addDecision.locate, which answers with a bounding box around one target in an image field.DecideOptions.imagesis removed. AddDecision.Imagefields to the input schema and refer to each image by its path in instructions:
// Before DecisionModel.decide(Triage, { input: "Checkout error", images: [screenshot] }) // After const Triage = Decision.make({ input: Schema.Struct({ report: Schema.String, screenshot: Decision.Image }), decisions }) DecisionModel.decide(Triage, { input: { report: "Checkout error", screenshot } })- Custom providers receive
imagesas{ reference, path, image }, with each image replaced by its reference instateand its data as a base64 string orURL. Decision.locate({ image: "photo", instructions })takes a path thatDecision.makechecks against the input's image fields. Providers opt in withsupportsLocate: true.Decision.AnyandDecisionModel.ProviderAnswergain locate variants, so exhaustive switches over them need aLocatecase.TypeSafeDecisionModelsupports images, sent as assets keyed by reference, and sends locate decisions as Box questions, which needjev-previeworjev-1.14.0. OpenAI and Cloudflare label each image with its reference.
#10087
472c469Thanks @effect-bot! - Node.js 22.19.0 (required byundici8) is now the minimum for@effect/platform-node,@effect/platform-node-shared,@effect/opentelemetryand@effect/docgen, up from 18.
NodeSocket WebSocket clients now use Node's global WebSocket instead of ws, so client-only usage no longer bundles ws.
Breaking: ws moved to a new NodeWS module.
NodeSocket.NodeWSandBunSocket.NodeWSare removed. ImportNodeWSfrom@effect/platform-nodeor@effect/platform-node-shared(on Bun, importwsdirectly). UseNodeWS.WebSocketin place ofNodeSocket.NodeWS.default.NodeSocket.layerWebSocketConstructorWSis removed. UseNodeWS.layerWebSocketConstructor.
Behaviour changes for clients that pass handshake headers, which previously used ws. Use NodeWS.layerWebSocketConstructor to keep the old behaviour:
- Reads cannot be paused. Incoming frames are buffered without limit, and a configured
highWaterMarkfails the socket with aSocketReadError. - Connection errors are a generic
ErrorEvent, soSocketOpenErrorcauses lack the underlying error code. - The
Socket.WebSocketservice is a globalWebSocket, sowsinstanceofchecks andws-only methods such asterminate()andping()no longer apply. - A custom
Hostheader is ignored. - Outgoing messages are not compressed. Incoming
permessage-deflatemessages are still decompressed. - Connections use undici's global dispatcher instead of
http.globalAgent/https.globalAgent.- Updated dependencies [
631d4f4,7ea1ea2,a2ccc14,ed20129,20795b9,a8e5e6c,c4d298d,fb5dbee,8309b94,ac10e55,af23904,df8dce5,0c24a8f,468c6ee,2d1fcd4,8f23668,3f8f359,fe6b748,2a03584,40e145e,7217410,cf249fe,4f0fad1,e75708c,7890077,c4a00fc,f74db37,069cf72,9a07ebc,f40dc4e,fa516c6,ffd9237,93895b9,8938b19,e5a1479,89e1e1e,eda0960,65db606,7c42335,cb21d14,89e1e1e,c32eb78,be9895b,26b4bfe,e19c611,f97711f,4f16778,d2b6bc7,8e668fe,ce9e999,3d88452,3c42058,2ae4045,e853fa1,6dc3f7c,1513bbd,c065ed7,1194a4c,2cb498e,89e5443,2a9a425,e710bbb,b0d6e75,32b3570,9f93f4f,27370c7]:
- Updated dependencies [
- effect@4.1.0
4.0.7
Patch Changes
- #9861
4f0600eThanks @effect-bot! - Add atoModelOutputoption toTool.makeandTool.dynamicfor sending text, images and files to the model in place of the serialized tool result. Anthropic and OpenAI Responses send native content blocks; OpenAI-compatible APIs and OpenRouter send text with a placeholder for each file, via the newPrompt.toolModelOutputToText.
OpenAI Responses now sends PDF file parts given as base64, data URL or HTTP(S) URL strings instead of dropping them.
#9859
16321ffThanks @nmnmcc! - Fail with anUnsupportedSchemaErrorthat names the tool when its parameters do not produce a JSON Schema object, for exampleSchema.Struct({}).#9920
0b65c9fThanks @Marve10s! - FixLanguageModelresponses reportingfinishReason: "unknown"instead of"length"when OpenAI stops withmax_output_tokensor Anthropic stops withmodel_context_window_exceeded. A truncated OpenAI response that contains a tool call now reports"length"and no longer runs the tool handler.Updated dependencies [
ac3485a,3a4c691,4f0600e,110fd22,aa58cda,8e257e7,e62a149,dcd43a5,3388cdd,81b0e14,a046435,f6d8968,5741c3a,381d5c6,d47478a,383716d,46dc30a,3d5c862,93ebc4f,c7b161a,e55945d,1a53d6a,5e25cc9,9503d5c,13efb72,8ca6abb,4a09dd1,346fc92,20e5ba8,f4b237e,1dd08ee,940be42,37be245,563fde0,938cecb,cf197c1,7ca71bb,1e73219,4dd860d,4d24a11,6bbc5ac,5fd25f4,a461561,832b3c6,837e906,cd1f2d4,fb38ce6,446c7ac,b48b7d8,dc66d90,d5a3dc3,482e0d5,d84f518,d34d399,5bbd25e,14eab6b,af8fcb3,6b82a28,3043aea,785577e,a8dbbce,65094ac,113ec70,ad3126e,eedfb27,45c467a,c983fc1,58f164f,f6df1aa,c05355c,ae7805c,9ffc621,c97b331,15297e5,41f6738,53f9352,b72f6a2,52e1716,50c863a,c148d27,a11ecdd,08e338e,8450ad5,39da87a,a2adb31,a6174d5,96e6004,3ebd645,3c3c79b,8c6d2fa,1ff35d2,2b100e9,e3938e5,f90101a,306c9a1,5b69c67,a12ffe3,f6cf0fd,3541f65,d50aaa2,3731ddb,3b8090c,137757a,a658477]:
4.0.6
Patch Changes
- #9437
fed70deThanks @effect-bot! - AddDecisionModel.decideSettledto retain valid answers alongside per-decisionResultfailures (Missing,Refused,NoDistribution, orInvalid). Provider failures still fail the effect;decideremains all-or-nothing.
OpenRouter now passes missing distributions to core validation. OpenAI reports refusals per decision and wrong-kind score answers as invalid rather than missing.
Update hand-built services to implement decideSettled, handle optional provider probabilities and refusal answers, and use settled outcomes instead of the removed OpenAiContentPolicyMetadata and metadata.openai.refusedDecisions.
#9552
44c8c1dThanks @wmaurer! - Add an optionalbatchKeytoEmbeddingModel.maketo group concurrentembedcalls by provider-relevant context. OpenAI and OpenAI-compatible providers now separate batches with different configuration overrides or client transforms. Undeclared context, such as per-callFetchHttpClient.RequestInit, still uses the first caller's value.#9709
85e2aeeThanks @tim-smart! - Add typed HTTP date andRetry-Afterheader values toHeaders, and parse them consistently across the HTTP client, OTLP exporter, GraphQL client, AI clients and static server.Headers.parseHttpDate/Headers.formatHttpDateread all three RFC 9110 date formats as UTC, whatever the process time zone, and emit IMF-fixdate.Headers.parseRetryAfter,Headers.formatRetryAfterandHeaders.retryAfterDelayaccept whole non-negative seconds of any size, read exactly, or an HTTP date, and the delay is never negative. HTTP dates accept the23:59:60leap second, read as the following second.Headers.RetryAfterholds either aDuration(RetryAfterDuration) or aDateTime.Utc(RetryAfterDateTime).Headers.retryAfterDurationbuilds the first from anyDuration.Input: infinite durations throw, finite negative ones become zero, and fractional seconds are rounded up when formatted.- Parse failures are reported as
Headers.HeaderParseError. Schema.DateTimeUtcFromHttpDateandSchema.RetryAfterFromStringexpose the same parsing as string codecs for HTTP API headers.- Invalid
Retry-Aftervalues such as-5,1.5,1e3orInfinityare now ignored everywhere.HttpClient.retryTransientandHttpClient.withRateLimiterno longer honour fractional seconds, and the AI clients no longer produce negative or infiniteretryAfterdurations. HttpStaticServerreadsIf-Modified-SinceandLast-Modifiedas UTC; asctime dates were previously shifted by the process time zone.
#9430
48102acThanks @effect-bot! - Add non-retryableAiError.InvalidResponseErrorfor provider response schema and SSE decoding failures, with optional HTTP context; model-generated output validation remains retryable. Update exhaustive matches onAiErrorReasonto handle the new tag, and update serialized-error consumers to accept it.#9242
12b2726Thanks @effect-bot! - Consistently nest authentication, internal provider, and unknown error metadata under theopenaioropenai-compatprovider key, including error codes, error types, and request IDs.#9667
225f2c6Thanks @effect-bot! - SupportpromptCacheBreakpointon OpenAI image and file prompt parts, sendingprompt_cache_breakpointoninput_imageandinput_filecontent blocks.#9670
ab5c1a8Thanks @effect-bot! - Support thesafety_identifierandprompt_cache_retentionResponses request options inOpenAiSchema.CreateResponseandOpenAiLanguageModel.Config.Updated dependencies [
ce13a48,f3bbbb4,5547315,6093cfb,30319d5,74a7596,bfb32a3,f8bf7f4,7f3d3df,db1046d,3c4f88a,916e709,916f843,66ec757,daac06f,c2552ec,b02c1cd,1855f1d,683ed2c,ac68940,22a8401,c53c194,ca6d1cc,47940c5,e8b24ef,2e8aae0,ad7497b,7f504a3,99e365d,954067d,3e1a035,41a1fe7,bcb3a86,739d3d1,ed4da35,3d84e19,cc00906,09ba1f5,9ff1a73,06bc532,97bfd84,25efaef,c10335b,a808972,20e844c,b9f73f3,5739878,28acdf3,59b6396,0bccc9c,fed70de,82648a2,afb5f32,28813f5,0fae934,f260830,19b63eb,14db221,679f956,b72707c,44c8c1d,1e7909b,0611a65,2fadc65,feb6ce5,5a2ed53,c8d26a4,0c8b446,05c3409,b04191b,05c3409,4067e64,e04563d,02d7fc5,561d2a1,8fe2dcc,a8086fa,88a33b4,e77372a,3dd4388,ba2b00c,a049d4a,84aeede,43e5e19,77bbf16,6af3a47,aac8d21,84c8dc4,78d1988,5676a2a,4b437bf,1af11fd,716f8df,ee27718,4d86d1b,5462ed7,658837c,00261cc,7cccb93,7c98228,5a8e248,8037a65,25912db,7f32606,0386f88,403298a,5a3ebc0,fac2191,fdb12dc,97909b8,c3983f4,3a5e65e,8b40fbc,3f3e119,7c7b8ed,d4f71bc,c66241e,f0e941e,5f8a6e5,2800a09,e9749b0,eaef09c,a3c56e5,bb61152,e9c842b,6d8c8e2,1f28187,0b9842b,c29ddd8,84c3405,3934c0c,048e7c8,1121334,9a680d6,85e2aee,34ec440,343a149,915117b,7f823c1,6e614e6,9990b39,22bf781,41f08b7,e8482ca,5ae85fa,c477a0a,8fbb39e,1c70828,8207d1e,7886b84,4839c60,2595d83,f5ae278,7a8ce00,688d302,c7072e4,425cedb,88bc680,268e09c,7e94505,afa5da3,c29ddd8,48102ac,463eca3,e7162ea,95752db,4577a28,973d599,2f066a5,f0ccbb6,2dda6ce,3da7c0a,5a67e0b,73b3a6e,c6f9e4c,be02676,26de861,9313799,d5c1e5b,11bb31f,8c23e46,9c96011,0d50570,9ed2bf1,76ec912,af2756d,3ec8100,93abf02,1e94993,99a4616,0a7978e,b4a060b,274f4a4,25f29be,9036440,415f005,191308b,4b96570,d84ec3f,392aa1c,99e9bd9,6f6f45f,13fc07e,a4b38dd,8b18580,0c477fe,9a5331d,a706d73,c9a1e72,89eaaf8,8215811,ad69018,a733eba,7282d5f,da33572,d9e2d12,dc923b8,1b74086,8a5507b,23460fa,0dbbea6,70aad3f,0909236,a9e66d8,ee5c0d5,631c5d6,7e60c1a,4cddd3c,8727e5d,2bc97fa,f9a7f05,d978cca,b334ccf,0b50cfc,5b7d2b5,6ee26b1,eab7e6a,e618f10,da14b1f,3314fc3,66db624,4b8a50d,8d52668,1de1055,db130e6,5fa5fa5]:
4.0.5
Patch Changes
#9140
91f4c74Thanks @tim-smart! - AddOpenAiDecisionModel, aDecisionModelbacked by OpenAI's Decisions API (gpt-6-luna), andOpenAiClient.createDecisions. Refused decisions fail the call withAiError.ContentPolicyError, and remote image URLs fail withAiError.InvalidUserInputError.#9097
68caf1dThanks @adam-r-kowalski! - Stop Responses streams at thedata: [DONE]sentinel sent by some OpenAI-compatible servers instead of failing to decode it.#9115
5d018e1Thanks @danieljvdm! - Preserve theultrafastservice tier in finish metadata.#9124
793d89eThanks @jem-computer! - Support structured decision instructions, descriptions, and score legends in TypeSafe, Cloudflare, and OpenRouter.Decision.rateaccepts labeled descriptions;Rate.criteriaentries are now{ label, description }objects instead of strings.#9100
51c079bThanks @tim-smart! - Accept omittedpatternfields in OpenAIfind_in_pageweb-search actions so streams do not fail validation. The publicWebSearchActionFind.patternproperty is now optional (string | undefinedwhen read); explicit null and non-string values remain invalid.Updated dependencies [
f665607,dbf442b,74d1930,a03afb6,f159284,5d301cc,cd74ea2,925cf64,54c51d9,995c104,816575e,0df6e06,52a7d3c,ec831c3,3abc63e,a841b8b,91efea7,e271997,7719bda,563397f,65b04f8,c2859bf,c462214,d1ad2c7,12be65e,352618a,2a8ec8b,8dec89d,f05642f,3ad9a0c,dba4e52,7ca8224,65d20dd,e3ff963,bc454a3,793d89e,ec9332b,f2b3d8a,cb2cf5f,b8c201d,118c9c4]:
4.0.4
Patch Changes
#9008
cc843eaThanks @effect-bot! - AddtoolCallValidation: "deferred"for callers usingdisableToolCallResolution: true. Model-generated tool calls return withunknownparameters, including invalid parameters and undeclared tool names, even without a toolkit. Supported by the Anthropic, OpenAI, and OpenAI-compatible providers. Strict validation remains the default; provider-executed calls remain validated.#9067
984b4abThanks @tim-smart! - Regenerate the OpenAI client from a pinned canonical specification. Fix composed schemas that collapsed toSchema.Neverand preserve keys in maps and free-form objects.
Public type changes in Generated:
- Remove Realtime WebSocket event exports no longer referenced by HTTP operations. Rename multipart request bodies to
*Multipartor*FormData. - Require fields specified upstream, including
CreateImageRequest.model,AdminApiKey.expires_at,ProjectApiKey.owner_project_access,AssignedRoleDetails.assignment_sourcesandVoiceResource.type. - Type maps and free-form objects as records instead of
{}.Metadatais now{ readonly [x: string]: string } | null. Make
FineTuningJoba union ofdpo,reinforcementandhyperparametersvariants. UseWebSearchCallStatusforWebSearchToolCall.status.- #9075
de38e53Thanks @tim-smart! - Accept OpenAI web searchfind_in_pageactions without a URL while still requiring the search pattern. - Updated dependencies [
7547a99,711719d,8f1ea52,c93485e,37e088f,9314666,a0a26b7,cc843ea,ab90be9,a59b971,fccf660,1bfd8fd,78e4c43,fde67a1,118deef,cea74c9,b7c1ac6,f837966,09738f4,22e7129,fdcb47e,fc349a1,ab90be9,892d14d,077c557,4a999a3,797696a,cf5179b,e1c6053]:
- #9075
4.0.3
Patch Changes
43bb382Thanks @tim-smart! - Preserve explicitincludevalues and default unknown OpenAI models to reasoning.- Merge explicit and automatic includes without duplicates.
- Treat models as reasoning except for
gpt-3*,gpt-4*,chatgpt-*,chat-latest, andgpt-<version>-chat*. Fine-tunes follow their base model. Reasoning models use thedeveloperrole and request encrypted reasoning when item references are disabled or WebSockets are used. OpenAI returns encrypted reasoning by default withstore: false; the include is retained for compatibility. - Add
reasoningModelto override detection. UsereasoningModel: falsefor incompatible custom deployments to select thesystemrole and disable the automatic encrypted reasoning include. Explicit includes are still preserved.
Updated dependencies [
b4e5af8,b8d6e7a,89d5c88,66257d2,cd2ab19,ca068ce,f686000,e052f1b,c755b69,ebe487f,63bfad8,8598157,76a03f7,182e26d,a46592a,1d3419e,e00eaae,133ceb2,a494a64,d6082a2,ee3a350,7ba976c,9dbd07e,d4f7dc3,a9b5148,e7d84e4,0e2b988,84f48df,48ed32f,59e58a6,b9e7821,aa811e4,bfc5742,f9f7a5a,73fa287,7ff5048,7803e51,93410da,aef1d1f,d6d515b,ea52c24,7e44402,0b17b9e,9753be9,977096b,cf58cb0]:
4.0.2
Patch Changes
#8870
26c1089Thanks @Makisuo! - Update AI tracing to use current OpenTelemetry GenAI conventions:- Replace
gen_ai.systemwithgen_ai.provider.name. Thesystemoption,BaseAttributesandWellKnownSystemare removed in favor ofprovider: { name },ProviderAttributesandWellKnownProviderName. - Remove
gen_ai.token.type, which is not a span attribute in the current conventions, along with thetokenoption,TokenAttributesand theAllAttributestypes. LanguageModelspans are client spans and recordgen_ai.output.type(textorjson) for every provider. The OpenAIresponseFormattelemetry option andWellKnownResponseFormatare removed.- Move OpenAI service-tier and system-fingerprint attributes from
gen_ai.openai.*toopenai.*. - Rename
concurrency,toolChoiceandobjectNamespan attributes toeffect.ai.concurrency,effect.ai.tool_choiceandeffect.ai.object_name. Tool choices record the resolved value, defaulting to"auto"; object choices are JSON-encoded. - Include cached tokens in Anthropic
gen_ai.usage.input_tokensand report cache reads and writes asgen_ai.usage.cache_read.input_tokensandgen_ai.usage.cache_write.input_tokens. The duplicate AnthropiccacheCreationInputTokensandcacheReadInputTokensresponse options are removed.
- Replace
#8770
540ecd1Thanks @fubhy! - Tag every module and directly importable export with an explicit@stability.@stability stablefollows strict semver, and@stability unstablemay receive breaking changes in minor releases.Updated dependencies [
26c1089,6c59de7,467d3ac,375c1b0,45a70ce,fb757e3,716e358,af114e6,d0b3862,7064da9,eee0eeb,b9d6581,7a721ce,a0cb4c2,3cb395e,540ecd1,aefe05a,c381fbc,c6f2179,0aeb7fd,2fbecc8,7095539,46b75b1,99b6b45,e4cb9f1,2e03688,b817ebe,4153144,2b3c63c,bd00773,146e86a,44defad,22d6f4d,7d8d497,98a5ed7,d350f8e,bd96be0,f6af4b6,7234786,1f74b62,42763ce,5630677,a0e1b87,f5716ad,26931d0,972c80f,efebfa9,a3b4cf3,3ed997b,7b396bd,c07c144,8903b68,a84aa4e,88917eb,50a5686,c419a0e,d85a309,7e7ede6,1803500,495740d,985860d,e36abbb,c6086ee,0ac6ac8,90a1bae,b1d200c,1ba8521,1b35732,763b445,00f1cc7,d4f4bc8,f11526a,8781388,5326527,8409eb4,c5cf8ce,684ccdc,33303ea,b79fcb8,888a189,9b8200d,82303c1,76fcd89,f31e6b7,332d363,a6c7dcb]:
4.0.1
Patch Changes
- #8613
f84f41eThanks @danieljvdm! - Supportprompt_cache_options.comparison_response_idand expose Responses API prompt cache diagnostics asfinish.metadata.openai.promptCacheDiagnosticsin JSON and streaming responses. - Updated dependencies [
ed2cc2f,58a2ee8,bc44526,073bb47,2ec021e,cad1118,1672d9c,a81e4e6,f5c2a91,498e72b,cabf123,a5b1d4e,878cb33,5e6f756,18dfb98,04706ef,f157482,b5a2d4c,1c18c68,43416c4,d6ac8f9,1d9fb8c,20dcd50,42e5750,888e326,0b52bb4,e823e69,962647b,43fdcdc,1f89b8e,e1a521a]:
4.0.0
Patch Changes
- #8633
2c552f2Thanks @IMax153! - Effect 4.0 is the first stable release of Effect v4. It replaces the 4.0.0 beta and release-candidate series, whose per-release notes remain below under the4.0.0-beta.*and4.0.0-rc.*headings. To upgrade from Effect 3, follow the migration guide.
Packaging and versioning
- All Effect packages share one version number and are released together. Use the same version of
effectand every@effect/*package. @effect/platform,@effect/rpc,@effect/cluster,@effect/cli,@effect/ai,@effect/sql,@effect/workflow,@effect/experimentaland similar packages are merged intoeffect. Separate packages remain only for platforms (@effect/platform-*), SQL drivers (@effect/sql-*), AI providers (@effect/ai-*), framework bindings (@effect/atom-*), OpenTelemetry, Vitest and tooling.- Modules such as
effect/http,effect/http-api,effect/rpc,effect/cluster,effect/workflow,effect/ai,effect/cli,effect/sqlandeffect/schemaimport fromeffect/<area>. APIs tagged@stability unstablemay have breaking changes in minor releases. APIs without a stability tag follow semver. - APIs that expose a third-party dependency are tagged
@stability unstable, because that dependency's releases can change them. This coversNodeRedis,DenoRedis,BunRedis,@effect/platform-node/Undiciand the undici dispatcher APIs, thewsoptions and re-exports in the platform packages, driver-specific options and clients in@effect/sql-clickhouse,@effect/sql-d1,@effect/sql-libsql,@effect/sql-mssql,@effect/sql-mysql2,@effect/sql-pgliteand@effect/sql-sqlite-do, the provider clients, models and generated schemas in the@effect/ai-*packages,@effect/opentelemetry, and thevitestre-export in@effect/vitest. effecthas no runtime dependencies.- New packages in v4:
@effect/platform-deno,@effect/sql-pglite,@effect/ai-openai-compat,@effect/ai-typesafe,@effect/atom-react,@effect/atom-solid,@effect/atom-vue,@effect/openapi-generatorand@effect/doctest.@effect/docgennow lives in this repository.
Core
- The fiber runtime was rewritten for lower memory use and faster execution, with smaller bundles and better tree-shaking.
- Services are defined with
Context.Service,FiberRefis replaced byContext.Reference,Causehas a flat structure, and many combinators were renamed. See the migration guide for the full list. - Software transactional memory is built into
Effect.tx, withTxRef,TxQueue,TxHashMap,TxPubSub,TxSemaphoreand relatedTx*data types. Clockseparates wall-clock time from monotonic time.- New modules include
Semaphore,Latch,LayerRef,ErrorReporter,ByteSize,NewtypeandCrypto.Arbitraryis now a native property-based testing module and no longer depends on fast-check.
Schema
- Schema v4 is a new implementation with faster parsing, class-based schemas,
makeconstructors on every schema, and effectful decoding with services. SchemaRepresentationpowers JSON Schema (Draft-04, Draft-07, 2020-12 and OpenAPI 3.0/3.1) import and export, TypeScript code generation, and AI structured output.SchemaBinaryprovides a compact binary codec and is the default wire format for cluster transports.- Optional JIT and AOT schema compilers are available as experimental modules.
Platform, HTTP and RPC
HttpApisupports typed response headers, streaming and SSE responses, the HTTPQUERYmethod,HttpApiTestfor in-memory testing, and much faster type checking for large APIs.- The HTTP modules add static file serving, response compression, rate-limited clients and graceful server shutdown.
Sockethas a pull-based reader with backpressure and STARTTLS support. Network addresses are modeled byeffect/net.- RPC serialization is schema-aware and supports server-originated requests and notifications.
@effect/platform-denoadds full Deno support. The Node, Bun, Deno and browser packages all provide the platformCryptoservice, and the browser package adds IndexedDB support.
Cluster and Workflow
- Workflows can be declared with class syntax, and
DurableQueueand an in-memoryWorkflowEngineare available. - Runner memory can be bounded with
ShardingConfiglimits. Shutdown, entity movement and persisted replies are more reliable.
SQL
@effect/sql-pguses a built-in PostgreSQL client with pipelining, prepared statements and binary codecs, and no longer depends onpg.@effect/sql-sqlite-nodeuses Node's built-innode:sqliteand requires Node 22.16 or newer.SqlErrorexposes structured reasons such asUniqueViolation.
AI
effect/aiaddsEmbeddingModel, theDecisionModelclassification and rating API, dynamic tools and tool approvals.- The MCP server supports protocol versions 2024-11-05 through 2026-07-28, including elicitation, sampling with tools, resource subscriptions and typed tool output.
- Provider packages cover Anthropic, OpenAI, OpenAI-compatible APIs and OpenRouter.
CLI, Atom, observability and testing
effect/cliadds global flags, command aliases and examples, an interactive wizard mode, and shell completions for Bash, Zsh and Fish.effect/reactivityand the@effect/atom-*bindings add SSR hydration, stale-while-revalidate atoms and serializable RPC and HttpApi queries.- The OTLP exporters can be configured with standard OpenTelemetry environment variables, and
@effect/opentelemetryaligns logs and spans with the OpenTelemetry specification. @effect/vitestruns property tests with the nativeArbitrarymodule and supports Vitest fixtures.
Requirements
- TypeScript 5.9 or newer. TypeScript 7 is recommended.
@effect/vitestand@effect/doctestrequire Vitest 5.@effect/atom-reactrequires React 19.@effect/platform-denorequires Deno 2.8.3 or newer.- effect@4.0.0
4.0.0-rc.118
Patch Changes
#8400
cb85792Thanks @danieljvdm! - Accept web searches without an action, preserving incomplete calls as failed tool results. Theactionfield is now optional on generated web-search calls and tool parameters/results.#8363
1519fd7Thanks @dardanbujupaj! - Preserve tool call parameters for dynamic tools backed by raw JSON Schema.#8355
24fa0abThanks @tim-smart! - Retry an OpenAI websocket turn with the full prompt when the provider returns previous_response_not_found, and keep the socket when it is still open.Updated dependencies [
f75468a,34cc788,eb02cbb,4bb949e,b409e3f,4093507,325e0fb,e54211a,0c6c2de,cdeccc7,254fcc1,bd14b64,37064fd,702c34e,7ef0ce6,325e0fb,cdec5ef,f9179cb,c760e1e,1b4461e,5709ef6,6b84149,508c70b,382992f,83d7c95,6bf2eb7,ccade14,b8d14d3,8fca194,34e09be,97afa37,321bae6,fb718d3,ccd3440,107dbec,af510e8,537cd82,ff554ae,9a5a383,d2f3547,25d9e47,372a45d,5e9fd25,c85c8c3,b501557,35ef06c,d6cc5d9,83b7b1f,f05fe36,1fd49d4,c79088d,0cbb457,8202a6e,8d070c3,0cf7655,d470d54,2121472,4113bc7,a41a441,3af6bd0,67ee3b8,e8df3d8,1dbc4c3,80d5adb,aa430d8,24f7d32,f4dd1ae,0981d01,0a29ca6,17810b4,62b2ea9,4e4fa8b,3495bd8,b3032f0,d26a913,93f826a,330b747,b808b5d,2575fcc,287273c,0860c0c,8d27554,c2e810c,35ecbb9,b442528,16623c7,5521209,477394d,3036241,ca422fd,4f5f866,54ff4f2,c8a9f85,0c0aa5e,d426feb,2a8f5c7,6332de2,c00c8ff,aa7de26,6f44ca0,98792c3,1f76040,cf7cfd6,6bc0eee,88b79d7,db7b69e,43bbb25,6ecd4b3,7b81a95,dd8990b,19835f2,1a3eb9e]:
4.0.0-rc.117
Patch Changes
- Updated dependencies [
9953c92,c6e8b20,8d40572,1b21e0d,3b155e3,895d944,705fb68,87912c0,106af64,1b21e0d,3d59ae6,89c9a39]:
4.0.0-rc.116
Patch Changes
- #8236
90695b0Thanks @danieljvdm! - Support API sources in OpenAI web search. Narrow sources bytypebefore readingurlorname. - Updated dependencies [
c19c63f,8cb0a4f,8f420bb,1393080,ccae354,553c403,45b5103,77a5612,1076170,f110af1,0045152,51d4a2f,4d4c4e8,ccfe152,d30a0c8,84fe64a,49e4b37,49e4b37,a2c4154,23a58c0,feef90c,755e863,49e4b37,9ad9891,0beded0,2940742,63c1566]:
4.0.0-rc.115
Patch Changes
4.0.0-rc.114
Patch Changes
- #8157
fdec3b2Thanks @danieljvdm! - Report failed OpenAI provider-executed tool calls as failure tool results in bothgenerateTextandstreamText, preserving the call details. - Updated dependencies [
3ff4952,6d55555,716e0c0,d4e4ad5,b1988f4,482b7d7,716e0c0,9941e6d]:
4.0.0-rc.113
Patch Changes
#7477
be0f822Thanks @candrewlee14! - Allow sockets to use browser, Bun, and Node WebSocket implementations without consumer casts. Platform constructors now support typed opening-handshake headers where available.#7588
cec6c2dThanks @tim-smart! - Route tool call parameter validation failures through the tool'sfailureModeand dropToolParameterValidationError.toolParams.#7756
6852750Thanks @kitlangton! - Preserve image data supplied as strings in OpenAI Responses and OpenAI-compatible chat requests.#8037
e255f08Thanks @tim-smart! - Allow OpenAI-compatible Responses API stream events to omitsequence_number.#7805
0b93584Thanks @tim-smart! - Preserve plain-text client tool results when encoding provider requests.#7487
ba53b64Thanks @tim-smart! - RedesignSocketaround a scoped, pull-based reader with transport backpressure.
Socket now exposes reader and writer. Client reader acquisition dials and yields a pull of non-empty batches: one buffer for TCP and one entry per WebSocket frame. TCP applies backpressure while paused; pausable WebSockets pause at highWaterMark (64 KiB by default) and resume after draining. Browser WebSockets cannot pause, so they can fail with SocketReadError at a configured highWaterMark. Writes await native drain signals and batch with cork / uncork where available.
### Breaking changes
Socket.run,Socket.runString, andSocket.runRaware removed. Acquiresocket.reader(orSocket.readerBytes/Socket.readerString) in a scope and pull in a loop. Code before the first pull replacesonOpen.Socket.makenow takes{ reader, writer }. The writer acquisition is infallible and yields aWriterwithwriteandwriteAll; both operations can still fail withSocketError.- Every close fails the pull with
SocketErrorwrappingSocketCloseError. The close-code predicates are removed; useEffect.retryaround the scoped read loop to reconnect. Socket.toChannelandSocket.toChannelStringnow read from the pull and fail on close.Socket.toStreamis added for read-only consumption.fromWebSocketdrops theonInitialRunoption;SendQueueCapacityis removed.- Accepted server sockets pause immediately. Their reader attaches to the existing connection and cannot reconnect after close.
- Updated dependencies [
49e3901,b945ded,d6422f4,5a80204,53511ef,79ae49f,0d083ba,be0f822,debe8fd,a8588f9,f17eb0a,f30cbfe,78cc9c0,ccbdbd5,a63dcbf,b845b18,381b794,4ffcaf4,ba2fd82,02be94c,115d8c2,1452635,77f85fe,a3f2b31,310f8d3,291d616,48dbbb2,b43bfd6,1c89c78,9bbe1a5,dd99ab0,8f397ed,d7ae6b6,8cf1203,87654c5,f05ae0b,436f5eb,d8ff960,8766475,b64f406,4697aaa,cec6c2d,9956f0e,5c7eed0,183c2ea,1e92dbd,4eb0fa7,534b8b9,b76a1cf,acc1e53,4950a91,c020987,abe95d1,027ceb9,3d203b7,a29b8f4,ce4aa65,a8ea807,a3ebb7f,473bd81,53843f6,c5eca65,d6f9eba,8d1e97a,b28ab48,9960708,8ac53b6,84ad49a,72cfa24,95c2581,d5c7cd2,fe4fed1,d150a64,05b1e80,414dc90,3f51acd,d68ff05,f3cf1e6,6525771,4ab4e83,f7f1d78,47b358a,45ffa72,6232650,4b73e1b,284050c,c85fc0b,7999b07,7d455f5,d681c2e,84d2a47,ed74b18,2245997,d386979,fc9fedf,7750dbe,fc91af6,39b9738,88093b5,d14c463,d473bd3,84864bc,e2ae724,f921ed3,1df933d,829aff9,aa0aba3,a71140f,0276a27,10d2c98,c86c999,975f758,2a3a478,1e6e206,fa6027b,7616f73,fc668b6,d425c8c,ce120f4,248201f,e80d397,f1a941d,73bc3a1,b628bb1,6e3ae7b,e891247,53e6c73,1579d6f,d3c6b73,4a59c6a,145d8e1,f74282c,0a38623,0a08ae0,fa6a56b,d60c5d4,07ffd25,9b517ad,604b1c1,ccc2e02,14d810a,a9d1ee3,a31adbe,7245f87,3a0828b,cd83544,6550a07,6f090d4,b505c0d,186dd49,9f37e58,4446451,58be972,1320075,ba53b64,f7490d4,c8ea602,62d82f4,a2c9e7c,97dd022,f984ee8,f1b2910,a29e05a,1aa1d8b,bb99734,222e7ca,797c9e3,b4d5398,c8349ed,8426e5f,26e0085,1a86166,0856631,0af0985,bc582c9,2c63f1e,0d98213,ca6f0dc,d8cc9ed,42fd969,5641ad3,629870d,d592c14,10d2c98,53909a9,78a4269,06c6307,0847c41,5a77084,96f99b3,7bb8781,4907e9b,2a30248,8364ddd,ad67d8c,ec0c087,fa6a56b,a2c1ce6,91e9af0,7bd3f34,ef16581,1693a87,df3fc47,e11be41,2e39e8b,11c5ee7,1742d2f,8efc70e,9642776,6680828,c34edcb,7b2c5bd,1a2ccee,db995df,af0ccdd,addeaea,7704034,e72b12f,310dd9c,1c2afc1,44f44ca,f43b9d6,56e72b3,50ef80e,fc3b718,ee336d8,d12f922,46d8310,59812fd,f9d0dec,4372c79,81485ef,bd393d6,0c95c04]:
- Updated dependencies [
- effect@4.0.0-rc.113
4.0.0-rc.112
Patch Changes
#7437
44675cbThanks @wmaurer! - Add an optionaldescriptiontoAiError.AuthenticationError, rendered after the kind-based suggestion, and pass the provider's own error text through it on HTTP 401 and 403, so authentication failures report what actually went wrong instead of only a category.#7403
7455246Thanks @hsyntax! - Add support for explicit cache breakpoints on the OpenAI responses API for GPT-5.6-or-later.Updated dependencies [
20cb4f2,44675cb,b6bf5e1,0b9f780,150e92c,6740db2,d57bba1,be75d5e,be75d5e,be75d5e,02a5146,15272a6,436f10d,058fb15,4d89bb8,480fb15,f77ec19,925b82a,7455246,118124d,a5f78d3,0dd7825,b722eca,811d579,043b587,8583727,d9d2cfc,5c4b7a0]:
4.0.0-rc.111
Patch Changes
- #7262
b755950Thanks @danieljvdm! - Decode nested OpenAI Responses API error events without changing their decoded type. - Updated dependencies [
0ce3b00,d846331,f93616f,16bf1ef,d568968,bc06292,e03ea90,9b10fc8,770c6d0,7425bcb,563815a,1e83ca1,550a41a,45d79c7,aac8584,7f87022,425457c,008c423,4f6ae04,b6b63e1,92922ee,859c02f,ffc8235,a29eb70,0be2303,b44636f,b19ccc7,ff98f0b,a47cbf1,39b55f8,c6c49c9,bf23ba7]:
4.0.0-rc.110
Patch Changes
- #7258
2b6a6f5Thanks @K-Mistele! - Support max reasoning effort and quota errors returned by OpenAI-compatible providers. - Updated dependencies [
6eebd0a,6eebd0a,d10ceb0,d10ceb0,d10ceb0,189b003,189b003,0a127b8,e491deb,f99c508,7e3f07c,a894fe1,d10ceb0,7e9923b,f064121,d10ceb0,b660bf0,f4fbe9c,d10ceb0,e811353,9761c3c,baa99fc,7fd79b2,a82ffc0,d10ceb0,4026e2d,397bf1e,d10ceb0,d10ceb0]:
4.0.0-rc.109
Patch Changes
- Updated dependencies [
a0743f2,17892e7,4d8a230,f21f9c9,18270dd,26db404,2670398,3702bed,ccae60e,6ff5396]:
4.0.0-rc.108
Patch Changes
- Updated dependencies [
dfb173e,005e090,c82c532,22b579f,3e19539,08a3c74,eb0bae0,97b544d,4f6d131,fad4b7c,accf447,31b27e4,8458951]:
4.0.0-beta.107
Patch Changes
4.0.0-beta.106
Patch Changes
- #7126
16b94c7Thanks @fubhy! - Fix OpenAI response telemetry attribute types to use the emitted response namespace. - Updated dependencies [
2695168,6310a8c,c2071b1,7aff81a,a1d4057,abf77b0,6c60375,22f4897,615d1d5,3a86757,f4a9762,0bcf6ed,ba9cb63,42c810d,1416ccd,08d0d39,548908a,4b3460d,d170596,aea89d0,deed5fb]:
4.0.0-beta.105
Patch Changes
4.0.0-beta.104
Patch Changes
- #7043
dce8219Thanks @fubhy! - Preserve OpenAI provider errors from failed response stream events. - Updated dependencies [
1001bcc,993ba60,67faacd,b78acdf,fbb9ce5,722ea48,3058fd5,62d0575,99dd6b5,7963ce1,af14e75,24e22d2,647d14e,1434eec,a5278b1,6af04a5,cb6c837,d44cead,88c7632,abcbb2a,8f63cce,d56dfcf,a98cda9,6704bb8,6143de2,936b135,1bbae84,d795ee7,0a82d88,9215bc5,a1b5df2,92a9ac5,6bde7f2,a712131,2e6f760,aa05804,badd3bf,02b0265,3437e21,41a550d,17b5d50,96e5e95,e4d589e,ae4cf7b,6ef5f1a,2235a29,b32f4cb,7f4c095,5f3fb81,17f0b91,0cdadd7,39b57d7,5a6a573,59f5e99,45379d6,1949439,e443403,03af7e8,0f721d4,130b28d,c987a12,4158562,306014a,729a663,caf84b6,ce067f7,7a41f5a,781022a,39f1297,2db266b,2141e28,3c5e429,20ddc63,841b3ea,82a3fbf,eb9ee83,64dc7c7,84dc8ab,b4463f4,592dd36,85d2b44,32e4a69,13c5872,3454cdb,e930804,7f12d4b,181c9ef,dd9f891,433fb81,8459cdb,6124ab3,01bd954,ba2c3aa,0a45ef3,8459cdb,eaa7e71,db4c2cc,22f150a,90ffb08,d517692,01af079,32a59e8]:
4.0.0-beta.103
Patch Changes
#6777
8e7c706Thanks @tim-smart! - Bound pending SSE decoder state with a configurable maximum event size.#6921
4686265Thanks @fubhy! - Emit specialized OpenAI tool results only once.#6722
9344742Thanks @mrtdurdenthe2! - Fix OpenAI stable web search response decoding by preserving the provider action in tool call parameters.#6675
4cc95aeThanks @danieljvdm! - Accept image generation-specific lifecycle statuses and nullable results in OpenAI response items.#6701
9867b9fThanks @fubhy! - Removed explicit ./index entrypoints#6920
da10211Thanks @fubhy! - Terminate OpenAI HTTP and WebSocket response streams when aresponse.failedevent arrives.Updated dependencies [
e56cd8f,f77c120,b2f95a9,04fd44a,b74333d,1c40b28,aeba0c8,b3901d2,4a0984a,fffd88b,f3f6c1e,ef07642,f1bc827,aeba0c8,081f4d8,5287b24,13d31cf,acee269,31170c1,205ebc7,ed0ebf8,a3fd084,ee29ddf,6086309,4a57af2,660875b,8e7c706,5f63adb,053bc42,c0a1534,f1e3a37,cedb01a,1747440,aeba0c8,aeba0c8,b4f1ee2,a4757f1,cd122b9,5de588b,3895b9c,89ce5f3,985de09,9800e3a,4dc35f6,e8eb62b,ecd9993,5ab9c08,f5cf965,a94cbed,9160ad7,aeba0c8,aeba0c8,52494be,5441c8e,c9b56ab,8ef7257,1519406,9716990,733f75b,48155c8,951d06b,d767b65,5d52d9d,f4151e1,e02fbb6,724ce09,dbe91f6,4c008d2,b650832,b46c92f,5335797,4b3460d,6301fd7,aebc5c6,52b2d7b,eec5744,24e0e93,aeba0c8,aeba0c8,aeba0c8,1a7ce81,48f22a7,c96b7f6,6d2a942,cc27b19,8f9499f,3eeea73,0a532e5,f398149,aeba0c8,ace903e,e8eb62b,aeba0c8,48f22a7,d48506d,aeba0c8,d48506d,d48506d,52262be,1284aa1,9867b9f,d0f1a22,979ce39,b6d3e67,adf6c6c,7314d60,aeba0c8,1acbd8b,7bde6cc,a959a8b]:
4.0.0-beta.102
Patch Changes
- #6608
0e50ec7Thanks @gcanti! - AddSchema.Naturalfor non-negative safe integers and use canonicalSchema.Int,Schema.Finite, andSchema.Naturalschemas for numeric domain values across Effect, AI protocols, and OpenAPI patches.
Update the date, date-time, file, time-zone, cluster, event-log, persistence, socket, SQL, and DevTools schemas to reject invalid non-finite or non-integer values where appropriate. Correct the decoded schema of Schema.NumberFromString, and allow Schema.DurationFromMillis and Schema.DurationFromNanos to represent negative durations.
#6650
acd385eThanks @IMax153! - Redact OpenAI organization and project headers from client errors.#6549
64c6ab1Thanks @xianjianlf2! - Encode OpenAI Responses API system messages as typed input text content.#6567
5101e92Thanks @gcanti! - AddRecord.assignPropertyand safely handle dynamic record keys such as__proto__and inherited property names.Updated dependencies [
b6392e1,7ed9450,45762bd,a6e8391,4ac7e8b,4cd40f5,6956bc0,0e50ec7,9fcdade,57367d5,35c445f,c917bb9,bc1f358,0e0c9d7,73d40aa,4f1e318,9d8d85c,6079fda,5101e92,d0b3265,7a03c89,cea1d9c,078e1f5,97bafea,fab0ab8,c323d8b,6966353,0444004,028bbb3,ff5d6e2,1bfce93,7ce815c,7271a7f,475fe5c]:
4.0.0-beta.101
Patch Changes
#6519
0e116a1Thanks @tim-smart! - Preserve OpenAI Responses API cache write token usage in language model responses.Updated dependencies [
731bea1,731bea1,731bea1,731bea1,731bea1,b35ed29,dd44624,731bea1,2bae1ac]:
4.0.0-beta.100
Patch Changes
- Updated dependencies [
c1288dd,2b58a3d,6dc83f2,c1e2fe0,f3fbae8,e000f80,f4ee765,510b55f,31d3fc4,875e618,688d46a,6ff5023,c0333e7,06e7e8c,eb9b102,8b155da,3a87335]:
4.0.0-beta.99
Patch Changes
- Updated dependencies [
8ce4795,80b539f,88a54cc,e6e6dba,bfb203e,2e9a34a,55d4eb3,bddb010,a328835,5560d05,8f6e3ad,46997fa,9e6e12d,3394b93,febeabc,54161c9,385f7a4,7eea4d0,7543afe,44b9cf3,7eea4d0,0a8aa6a,c8d9fcf,9ca7f9a,e7aca89,55d7560,f809189,88a54cc,0ebdbe7,7517d09,212493b,88a54cc,80ea8cb,8df19f4]:
4.0.0-beta.98
Patch Changes
- Updated dependencies [
989603b,214c458,a037273,97fdaa9,b24d248,19c222c,eec85dd,0082f4f,8849052,c15e16a,01d00a3,8bd4589,0082f4f,6e08428,388dcf9,2b7ce2b,87bea7e,ce38dc3,a807cd1,fd8a356,c2a5edc,5946da3,4ae0c5f,5b2a0bc,72ac585,5e8c1b8,0f9c078]:
4.0.0-beta.97
Patch Changes
- Updated dependencies []:
4.0.0-beta.96
Patch Changes
4.0.0-beta.95
Patch Changes
- Updated dependencies [
a482442,fbefa85,0b4a32f,18a49e1,266cb90,912f095,a6718f9,bef5154,18e0564,fb50f14]:
4.0.0-beta.94
Patch Changes
4.0.0-beta.93
Patch Changes
4.0.0-beta.92
Patch Changes
- Updated dependencies [
affdc13]:
4.0.0-beta.91
Patch Changes
4.0.0-beta.90
Patch Changes
- Updated dependencies [
d237fdf]:
4.0.0-beta.89
Patch Changes
4.0.0-beta.88
Patch Changes
4.0.0-beta.87
Patch Changes
4.0.0-beta.86
Patch Changes
- Updated dependencies [
0b5795a,3e3a859,7dbec24,d8c00a1,85b6317,6d0fda0,108a933,7e1f455,46b3e79]:
4.0.0-beta.85
Patch Changes
4.0.0-beta.84
Patch Changes
- Updated dependencies [
87f52ba,b8ee07f,867c0d7,b93bc6c,57d387f,bacca41,0f8ac79,25b4482,9cf3a25,8def767]:
4.0.0-beta.83
Patch Changes
- Updated dependencies [
1f2e8ce]:
4.0.0-beta.82
Patch Changes
- Updated dependencies [
193690b]:
4.0.0-beta.81
Patch Changes
4.0.0-beta.80
Patch Changes
4.0.0-beta.79
Patch Changes
- Updated dependencies [
b9704dc,a207113,5e9b9e2,7c128ae,0ada457,d7cc5a2,aad63be,09809f6,2fddda5,5f21768,f27003e]:
4.0.0-beta.78
Patch Changes
4.0.0-beta.77
Patch Changes
4.0.0-beta.76
Patch Changes
4.0.0-beta.75
Patch Changes
#2312
ad4b535Thanks @gcanti! - ValidateSchema.StructWithRestfixed fields against rest index signatures at the type level so schemas cannot be constructed with incompatible decoded, encoded, or make shapes. This keepsStructWithResttypes sound and updates the generated OpenAI conversation-items request schema to keep accepting arbitrary additional fields under the stricter validation.Updated dependencies [
81b187c,ad4b535,a29c2e7,1fdd9ae,1fdd9ae,ffea4ec,4255c9b]:
4.0.0-beta.74
Patch Changes
- Updated dependencies [
b1fc6a4]:
4.0.0-beta.73
Patch Changes
4.0.0-beta.72
Patch Changes
4.0.0-beta.71
Patch Changes
#2279
1fab4acThanks @tim-smart! - handle missing output array in openai responsesUpdated dependencies [
d8ac76b,2c3c00a,3751e7c,fc5f25b,7ccced4,a2e1fe5,4a4a36b,d350292,730afb6,df1b008,6d469d5]:
4.0.0-beta.70
Patch Changes
#2224
74d8f37Thanks @aniravi24! - FixOpenAIFileschema decode failure on responses whereexpires_atandstatus_detailsare returned as literalnull. The OpenAI files endpoint returnsnull(not omitted) for these fields when no expiration / status detail applies (e.g. uploads withpurpose: "user_data"), but the upstream OpenAPI spec marks them only as optional. Codegen patches widen both fields to allownull, which now decodes cleanly viaOpenAiClient.createFile,retrieveFile,listFiles, and any other endpoint returning theOpenAIFileshape.
4.0.0-beta.69
Patch Changes
4.0.0-beta.68
Patch Changes
4.0.0-beta.67
Patch Changes
- Updated dependencies [
a42ef66,35594f8,8bddd62,4be4c8d,0c9d3ab,b156acc,d16c034,b559d68,a3de5d9,7e6c12e,098167a]:
4.0.0-beta.66
Patch Changes
4.0.0-beta.65
Patch Changes
- Updated dependencies [
6f11454]:
4.0.0-beta.64
Patch Changes
- Updated dependencies [
7d4877a]:
4.0.0-beta.63
Patch Changes
#2133
5be0aaaThanks @Zelys-DFKH! - FixOpenAiLanguageModelleaking library-only config fields (fileIdPrefixes,strictJsonSchema) into request body, causing OpenAI 400 errors.
4.0.0-beta.62
Patch Changes
- Updated dependencies [
4ab4b90]:
4.0.0-beta.61
Patch Changes
4.0.0-beta.60
Patch Changes
4.0.0-beta.59
Patch Changes
#2101
953edefThanks @tim-smart! - don't omit reasoning from openai configUpdated dependencies [
56837ea]:
4.0.0-beta.58
Patch Changes
4.0.0-beta.57
Patch Changes
4.0.0-beta.56
Patch Changes
#1933
c5a7327Thanks @IMax153! - Accept bothin-memoryandin_memoryfor OpenAIprompt_cache_retentionschema fields.#1933
c5a7327Thanks @IMax153! - Fix OpenAI MCP tool call handling to keep the canonicalOpenAiMcptool name across response and stream paths, including approval flows.Updated dependencies []:
4.0.0-beta.55
Patch Changes
4.0.0-beta.54
Patch Changes
4.0.0-beta.53
Patch Changes
#2060
aef2b1cThanks @tim-smart! - add back openai reasoning typesUpdated dependencies [
0768509,476aede,4f79c54,4be6a7c,88927eb]:
4.0.0-beta.52
Minor Changes
- #2059
6f73f92Thanks @tim-smart! - Add a new publicOpenAiSchemamodule with minimal local schemas for responses, streaming SSE events (including unknown-event fallback), and embeddings.
Patch Changes
#2059
6f73f92Thanks @tim-smart! - Add a newOpenAiClientGeneratedmodule that exposes the generated OpenAI client as a dedicated context service withmake,layer, andlayerConfigconstructors. This provides a compatibility path for direct generated-client access while preserving existing auth, base URL, header, andOpenAiConfig.transformClientwiring.#2059
6f73f92Thanks @tim-smart! - RefactorOpenAiClientto the handwritten minimal-schema path soclientnow exposes the configuredHttpClient,createResponse/createResponseStream/createEmbeddinguseOpenAiSchemarequest-response types, and websocket mode no longer depends on generated-client internals.
Also migrate OpenAI language and embedding model request-response typing to OpenAiSchema and make embedding decoding explicitly reject non-vector (string/base64) payloads with InvalidOutputError.
4.0.0-beta.51
Patch Changes
4.0.0-beta.50
Patch Changes
4.0.0-beta.49
Patch Changes
4.0.0-beta.48
Patch Changes
4.0.0-beta.47
Patch Changes
4.0.0-beta.46
Patch Changes
- Updated dependencies [
3a30b9e]:
4.0.0-beta.45
Patch Changes
- Updated dependencies [
5c3af6d]:
4.0.0-beta.44
Patch Changes
#1961
7bb5dceThanks @IMax153! - Rename theServiceMapmodule toContextacross exports, docs, and tests.Updated dependencies [
e3f0621,5b476ab,6b40e5a,7bb5dce,3b09fb3,2370410,dabc272,08b63c3,dfff04c,9baed9e,7846792,1556a24,7c11bc2,b5ea591,0853afa,ac845f3,b80c462,b3f535d,6fe2e93,cda8004,8335477,8c836f9,718ff6f,7eed84f,5df46fe,82dd0f2,03ae41e,4677a0a,87e1fc8,c1af1b7,7bb5dce,c8a877b,7da961a]:
4.0.0-beta.43
Patch Changes
4.0.0-beta.42
Patch Changes
#1859
a4809dbThanks @lloydrichards! - add dynamic tooling for openai and openai-compact language models#1890
4549175Thanks @tim-smart! - reset openai websocket on errorUpdated dependencies [
924e216,80e7f0c,f8328bf,66d1c06,bee800b,8930441]:
4.0.0-beta.41
Patch Changes
#1887
f291344Thanks @tim-smart! - make defects a retryable network error in websocket modeUpdated dependencies [
36f5c21,d8ce758,11aab4c,3bc1efb,70e724e,738dee7,2111963,198a553]:
4.0.0-beta.40
Patch Changes
4.0.0-beta.39
Patch Changes
4.0.0-beta.38
Patch Changes
4.0.0-beta.37
Patch Changes
- Updated dependencies [
f7a0b71,1e223c3,53740f4,8c7cf89,b6b81a9,8f4c1f9,f2479f9,c919921,7af90c2,f3be185]:
4.0.0-beta.36
Patch Changes
#1807
1bbd4d9Thanks @tim-smart! - Handle streamed OpenAI function calls fromresponse.function_call_arguments.doneso tool calls are emitted even whenresponse.output_item.doneis missing.#1809
126db2eThanks @tim-smart! - Fix OpenAI reasoning stream state handling so out-of-order reasoning summary events do not crash when prior reasoning item state is missing.Updated dependencies [
60fcbcc,0a60837,49164d2,334b6e4,5700695,f8f4456,969d24f,851eda0,8059c1c,6f83295,65f7f57,e7fabd2,89c3e98,53794ab]:
4.0.0-beta.35
Patch Changes
#1776
f5e553dThanks @tim-smart! - improve openai socket errorsUpdated dependencies [
9252b43,7daf387,e1664a3,fdaa6e0,19aa47e,c667dad,764d150,3c27098]:
4.0.0-beta.34
Patch Changes
#1759
8feecd2Thanks @tim-smart! - Ensure OpenAiSocket sends a{"type":"response.cancel"}websocket event when a response stream is interrupted.#1764
342fc4bThanks @tim-smart! - Add unstable EmbeddingModel support across core and OpenAI providers.- Add the unstable EmbeddingModel module API surface in
effect, including service, request, response, and provider types. - Implement the unstable EmbeddingModel runtime constructor in
effect, withRequestResolverbatching,embed/embedManyspans, provider error propagation, deterministic ordering, and empty-inputembedManyfast-path behavior. - Add and align EmbeddingModel behavior tests in
effectfor embedding usage, batching, ordering, and error handling. - Add
OpenAiEmbeddingModelin@effect/ai-openai, including model / make / layer constructors, config overrides, and provider output index validation with deterministic reordering. - Add OpenAI-compatible EmbeddingModel provider support in
@effect/ai-openai-compat, including config overrides, layer constructors, and output index validation.
- Add the unstable EmbeddingModel module API surface in
#1771
00add69Thanks @tim-smart! - AddEmbeddingModel.ModelDimensionsand require dimensions in embedding providermodelconstructors.#1765
f4e2abaThanks @tim-smart! - retry incremental prompt on invalid request#1760
273f4c6Thanks @tim-smart! - handle openai ws error eventsUpdated dependencies [
f2f75ee,342fc4b,5d704ee,00add69,58217d3,f4e2aba,e3b44b6,e1472b7,7686320]:
4.0.0-beta.33
Patch Changes
#1638
e198feaThanks @tim-smart! - add OpenAiClient.withWebSocketModeUpdated dependencies [
571447d]:
4.0.0-beta.32
Patch Changes
- Updated dependencies [
bf8fff8,1af3ef3,27fea0f,2ad6c1b,398ac3e,51fe22f,4605db6,f4de1b0,60214f2,c4b8b0f,6d9393a,6de4efe,4f969d1,6cc67c8,8531a22,b226760,47a51ab,1521d02]:
4.0.0-beta.31
Patch Changes
- Updated dependencies [
5a84853,6f23f0e,654aaec,2958a42,95d27a2,0fbaea8,21d5d5e,5a84853,6e49959,8f5805d,990df2c]:
4.0.0-beta.30
Patch Changes
#1679
d440fd4Thanks @tim-smart! - Add support for OpenAIkeepaliveresponse stream events.Updated dependencies [
c88e5b7,947d0e4,7517908,a49ecd5,6993e33,514f2a2,3214b47,95ec5ed]:
4.0.0-beta.29
Patch Changes
4.0.0-beta.28
Patch Changes
- Updated dependencies [
ff533f2,dc803ee,d660b1c,93a05e3,2a65cf6,a561a40,29cd24d,662a8e6,d2b52ba,407c3b4,42bc7ce,e741322,5c75fa8,747177b,326cd48,627e922,662287e]:
4.0.0-beta.27
Patch Changes
4.0.0-beta.26
Patch Changes
- Updated dependencies [
fb21462,2ed26b1,e832a57,7f01be7,e965143,b9b80f1,98252aa,56fbd94,3faa109,692ecfe,1e70b72,ecf0782]:
4.0.0-beta.25
Patch Changes
4.0.0-beta.24
Patch Changes
4.0.0-beta.23
Patch Changes
- Updated dependencies [
5c73c41]:
4.0.0-beta.22
Patch Changes
- Updated dependencies [
0874332,c592dcd,1dbe28d,564d730,3cfadc4,6634fd0,d10dabe,f82f549,78a3382]:
4.0.0-beta.21
Patch Changes
- Updated dependencies [
e691909,d5f413f,139d152,947e3d4,84b2cce,7f5305e,9e6fd84,fdb8a4b,0f986ef,9355fc0]:
4.0.0-beta.20
Patch Changes
#1529
e542c94Thanks @tim-smart! - Add dedicated AiError metadata interfaces per reason so provider packages can safely augment metadata without conflicting module declarations.#1528
6f4ebd1Thanks @tim-smart! - AddModel.ModelNameand provide it from AI model constructors.Updated dependencies [
842a624,4785eef,8fac95b,12ee8e2,e542c94,8fac95b,6f4ebd1,989d1cc]:
4.0.0-beta.19
Patch Changes
#1522
19984c2Thanks @IMax153! - Fix missingyield*inOpenAiLanguageModel.prepareResponseFormatUpdated dependencies []:
4.0.0-beta.18
Patch Changes
#1520
725260bThanks @IMax153! - Ensure that OpenAI JSON schemas for tool calls and structured outputs are properly transformed
4.0.0-beta.17
Patch Changes
- Updated dependencies [
8f59c32]:
4.0.0-beta.16
Patch Changes
4.0.0-beta.15
Patch Changes
#1502
285b7e6Thanks @tim-smart! - allow undefined for ai configUpdated dependencies [
24ae609,0e3c059,e843b0a,f4389a2,5b73de0,595d2d6]:
4.0.0-beta.14
Patch Changes
4.0.0-beta.13
Patch Changes
- Updated dependencies [
368f4c3,db8a579,668b703,d40e76b,6e18cf8,86062e8,c27ce75,e2d4fbf,114ab42,484caec]:
4.0.0-beta.12
Patch Changes
- Updated dependencies [
70a74e8,b5b6e10,f5ce5a9,a29eb70,c7b36e5,9381d6d,88439f1,e35307d,c7df4bc,accaf3b,3e1c270,6cd81f7,f222da3,61f901d]:
4.0.0-beta.11
Patch Changes
- Updated dependencies [
88659ed,f2915e8,eb71ace,2a16999,d42dd52,339adaf,de19645,9b1dc3b,e4cb2f5,8bced95,9431420,948dca2,d18e327,ab512f7]:
4.0.0-beta.10
Patch Changes
4.0.0-beta.9
Patch Changes
4.0.0-beta.8
Patch Changes
4.0.0-beta.7
Patch Changes
- Updated dependencies [
a2bda6d,1f95a2b,a8d5e79,a5386ba,a5386ba,06d8a03,8caac76,8caac76,f9e883e,8caac76]:
4.0.0-beta.6
Patch Changes
- Updated dependencies [
3247da2,f205705,f35022c,8622721,fc660ab,f37dc33,3662f32,a7d436f,6856a41,8c417d0,5419570,449c5ed,4b5ec12,df87937,5dbfca8,e629497,981c991,1ca2ed6,45722bd,eb2a85e]:
4.0.0-beta.5
Patch Changes
4.0.0-beta.4
Patch Changes
4.0.0-beta.3
Patch Changes
4.0.0-beta.2
Patch Changes
4.0.0-beta.1
Patch Changes
4.0.0-beta.0
Major Changes
Patch Changes
- Updated dependencies [
be642ab]: