effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
Upgrading effect From 4.0.1 to 4.0.2
1 release in betweenevery note read
- 1
- change to make
- 0
- advisories fixed
- 7
- new
- 77
- fixes
Before you upgrade
Tick each one off as you go- Breaking4.0.2
Release by release
- Breaking
Remove
gen_ai.token.type, which is not a span attribute in the current conventions, along with thetokenoption,TokenAttributesand theAllAttributestypes. - New
Add image input to
DecisionModel.decide. Providers opt in withsupportsImages: trueand receive images throughProviderOptions.images. Models without image support reject nonempty image input withInvalidUserInputError. - New
Allow interruption while waiting for permits or locks in TxSemaphore and TxReentrantLock helpers, while preserving automatic release after acquisition.
- New
Allow spans without an Effect parent to inherit active OpenTelemetry spans created outside Effect.
- Breaking
9 other lines we could not sort, mostly version bumps
- 4.0.2
Replace
gen_ai.systemwithgen_ai.provider.name. Thesystemoption,BaseAttributesandWellKnownSystemare removed in favor ofprovider: { name },ProviderAttributesandWellKnownProviderName. - 4.0.2
LanguageModelspans are client spans and recordgen_ai.output.type(textorjson) for every provider. The OpenAIresponseFormattelemetry option andWellKnownResponseFormatare removed. - 4.0.2
Move OpenAI service-tier and system-fingerprint attributes from
gen_ai.openai.*toopenai.*. - 4.0.2
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. - 4.0.2
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. - 4.0.2
Name statement spans by
db.namespace,server.address[:server.port]ordb.system.name, falling back tosql.execute. The rules are exported asStatement.spanNameandStatement.spanTarget. - 4.0.2
Record Effect execution methods in
effect.sql.methodinstead ofdb.operation.name. - 4.0.2
Use internal transaction spans with
effect.sql.transaction.commit|savepoint|rollbackevents. - 4.0.2
Name D1 batches of two or more statements
BATCH, orBATCH {target}when a target is set, withdb.operation.nameset toBATCHanddb.operation.batch.size.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.