Packages

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

Other targets from 4.0.1Newest 4.x4.1.5Latest4.1.4
  1. 4.0.1yours
  2. 4.0.2target

Before you upgrade

Tick each one off as you go
  • Breaking4.0.2

Release by release

  1. 4.0.2

    Migration needed7 Oct 20267 new · 77 fixes
    • Breaking

      Remove gen_ai.token.type, which is not a span attribute in the current conventions, along with the token option, TokenAttributes and the AllAttributes types.

    • New

      Add image input to DecisionModel.decide. Providers opt in with supportsImages: true and receive images through ProviderOptions.images. Models without image support reject nonempty image input with InvalidUserInputError.

    • 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.

9 other lines we could not sort, mostly version bumps
  • Replace gen_ai.system with gen_ai.provider.name. The system option, BaseAttributes and WellKnownSystem are removed in favor of provider: { name }, ProviderAttributes and WellKnownProviderName.

    4.0.2
  • LanguageModel spans are client spans and record gen_ai.output.type (text or json) for every provider. The OpenAI responseFormat telemetry option and WellKnownResponseFormat are removed.

    4.0.2
  • Move OpenAI service-tier and system-fingerprint attributes from gen_ai.openai.* to openai.*.

    4.0.2
  • Rename concurrency, toolChoice and objectName span attributes to effect.ai.concurrency, effect.ai.tool_choice and effect.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_tokens and report cache reads and writes as gen_ai.usage.cache_read.input_tokens and gen_ai.usage.cache_write.input_tokens. The duplicate Anthropic cacheCreationInputTokens and cacheReadInputTokens response options are removed.

    4.0.2
  • Name statement spans by db.namespace, server.address[:server.port] or db.system.name, falling back to sql.execute. The rules are exported as Statement.spanName and Statement.spanTarget.

    4.0.2
  • Record Effect execution methods in effect.sql.method instead of db.operation.name.

    4.0.2
  • Use internal transaction spans with effect.sql.transaction.commit|savepoint|rollback events.

    4.0.2
  • Name D1 batches of two or more statements BATCH, or BATCH {target} when a target is set, with db.operation.name set to BATCH and db.operation.batch.size.

    4.0.2

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.