@devries-cameron20 / t3code Mirror · read-only
Fork 0

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, 07:15 UTC

main
md 252 KB

@effect/ai-anthropic

4.1.2

Patch Changes

4.1.1

Patch Changes

4.1.0

Minor Changes

  • #8829 38f96d8 Thanks @effect-bot! - Regenerate the unstable Generated module from the pinned anthropic-sdk-typescript 0.135.0 spec, so newer request settings such as adaptive thinking display can be configured. Every released Generated export name still exists. The released Skills schemas, such as Skill and CreateSkillResponse, keep their released definitions. Other released types follow the current API: they gain fields and union members, and fields added since the release stay optional, so older responses still decode. The Files and Skills changes below are the exception: they follow Anthropic's migration of those APIs to their GA shapes and do not decode the previous beta shapes.

### Breaking changes

  • The Skills client methods decode the current API shapes, exported under new *Resource names. No method decodes with the released Skills schemas.
    • createSkillV1SkillsPost, getSkillV1SkillsSkillIdGet and their beta* variants return SkillResource / BetaSkillResource. Read display_name instead of display_title, and latest_version_id instead of latest_version.
    • createSkillVersionV1SkillsSkillIdVersionsPost, getSkillVersionV1SkillsSkillIdVersionsVersionGet and their beta* variants return SkillVersionResource / BetaSkillVersionResource, which no longer include directory or version.
    • The Skills list methods return List*ResourcesResponse. Page with next_page instead of has_more.
    • The delete methods and Skill version results type type as the literal the API always sends, such as "skill_deleted" and "skill_version", instead of string.
  • The Files list methods listFilesV1FilesGet and betaListFilesV1FilesGet page with page and next_page. Their params no longer include before_id or after_id, and FileListResponse / BetaFileListResponse no longer include has_more, first_id or last_id. Pass the previous response's next_page as page to fetch the next page.
  • When migrating to the current Files and Skills shapes, remove the dated files-api-2025-04-14 and skills-2025-10-02 tokens from any anthropic-beta header you send, and keep any other beta tokens. The API still returns the previous beta shapes to requests that send these tokens, and the Files and Skills methods cannot decode them. See the upstream migration guides for Files and Skills.
  • Uploads take files instead of strings. UploadFileV1FilesPostRequestFormData.file and each Skills files entry are a File or Blob. Skills files is now required and non-null. As before, every file must be in one top-level directory that has a SKILL.md. The Skills create input renames display_title to display_name:

    const created = client.betaCreateSkillV1SkillsPost({
      payload: {
        display_name: "My skill",
        files: [new File([skillMd], "my-skill/SKILL.md", { type: "text/markdown" })]
      },
      config: undefined
    })
    
  • BetaMessageIterationUsage.model can be null as well as missing. Read it with a fallback, such as usage.model ?? "unknown".

  • Text blocks in BetaResponseMCPToolResultBlock content have optional citations. Read them with a fallback, such as part.citations ?? [].

  • Response unions gain members. Exhaustive switches without a default need new cases:

    • web fetch error_code adds "content_too_large";
    • stop reasons add "model_context_window_exceeded";
    • beta content blocks, server tool names and iteration usage add advisor variants.
    • #8829 3c42058 Thanks @effect-bot! - Remove AiError.HttpRequestDetails and Response.HttpRequestDetails, so AI errors and response metadata no longer carry request headers or query parameters. AiError.NetworkError records the request as method and url fields instead of request, and the request field is gone from AiError.HttpContext and Response.ResponseMetadataPart.

Patch Changes

4.0.7

Patch Changes

  • #9861 4f0600e Thanks @effect-bot! - Add a toModelOutput option to Tool.make and Tool.dynamic for 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 new Prompt.toolModelOutputToText.

OpenAI Responses now sends PDF file parts given as base64, data URL or HTTP(S) URL strings instead of dropping them.

4.0.6

Patch Changes

4.0.5

Patch Changes

4.0.4

Patch Changes

4.0.3

Patch Changes

4.0.2

Patch Changes

4.0.1

Patch Changes

4.0.0

Patch Changes

  • #8633 2c552f2 Thanks @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 the 4.0.0-beta.* and 4.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 effect and every @effect/* package.
  • @effect/platform, @effect/rpc, @effect/cluster, @effect/cli, @effect/ai, @effect/sql, @effect/workflow, @effect/experimental and similar packages are merged into effect. 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/sql and effect/schema import from effect/<area>. APIs tagged @stability unstable may 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 covers NodeRedis, DenoRedis, BunRedis, @effect/platform-node/Undici and the undici dispatcher APIs, the ws options 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-pglite and @effect/sql-sqlite-do, the provider clients, models and generated schemas in the @effect/ai-* packages, @effect/opentelemetry, and the vitest re-export in @effect/vitest.
  • effect has 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-generator and @effect/doctest. @effect/docgen now 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, FiberRef is replaced by Context.Reference, Cause has a flat structure, and many combinators were renamed. See the migration guide for the full list.
  • Software transactional memory is built into Effect.tx, with TxRef, TxQueue, TxHashMap, TxPubSub, TxSemaphore and related Tx* data types.
  • Clock separates wall-clock time from monotonic time.
  • New modules include Semaphore, Latch, LayerRef, ErrorReporter, ByteSize, Newtype and Crypto. Arbitrary is 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, make constructors on every schema, and effectful decoding with services.
  • SchemaRepresentation powers JSON Schema (Draft-04, Draft-07, 2020-12 and OpenAPI 3.0/3.1) import and export, TypeScript code generation, and AI structured output.
  • SchemaBinary provides 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

  • HttpApi supports typed response headers, streaming and SSE responses, the HTTP QUERY method, HttpApiTest for 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.
  • Socket has a pull-based reader with backpressure and STARTTLS support. Network addresses are modeled by effect/net.
  • RPC serialization is schema-aware and supports server-originated requests and notifications.
  • @effect/platform-deno adds full Deno support. The Node, Bun, Deno and browser packages all provide the platform Crypto service, and the browser package adds IndexedDB support.

Cluster and Workflow

  • Workflows can be declared with class syntax, and DurableQueue and an in-memory WorkflowEngine are available.
  • Runner memory can be bounded with ShardingConfig limits. Shutdown, entity movement and persisted replies are more reliable.

SQL

  • @effect/sql-pg uses a built-in PostgreSQL client with pipelining, prepared statements and binary codecs, and no longer depends on pg.
  • @effect/sql-sqlite-node uses Node's built-in node:sqlite and requires Node 22.16 or newer.
  • SqlError exposes structured reasons such as UniqueViolation.

AI

  • effect/ai adds EmbeddingModel, the DecisionModel classification 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/cli adds global flags, command aliases and examples, an interactive wizard mode, and shell completions for Bash, Zsh and Fish.
  • effect/reactivity and 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/opentelemetry aligns logs and spans with the OpenTelemetry specification.
  • @effect/vitest runs property tests with the native Arbitrary module and supports Vitest fixtures.

Requirements

4.0.0-rc.118

Patch Changes

4.0.0-rc.117

Patch Changes

4.0.0-rc.116

Patch Changes

4.0.0-rc.115

Patch Changes

4.0.0-rc.114

Patch Changes

4.0.0-rc.113

Patch Changes

4.0.0-rc.112

Patch Changes

4.0.0-rc.111

Patch Changes

4.0.0-rc.110

Patch Changes

4.0.0-rc.109

Patch Changes

  • #7208 0303139 Thanks @moishinetzer! - Default new Anthropic models to modern capabilities while preserving the limits of legacy Claude models.

Unknown models now default to native structured outputs and 128K output tokens, so future model releases do not require capability-table updates. Use the new structuredOutputs model config option to override capability detection when needed. - Updated dependencies [a0743f2, 17892e7, 4d8a230, f21f9c9, 18270dd, 26db404, 2670398, 3702bed, ccae60e, 6ff5396]: - effect@4.0.0-rc.109

4.0.0-rc.108

Patch Changes

4.0.0-beta.107

Patch Changes

4.0.0-beta.106

Patch Changes

  • #7129 d0baed9 Thanks @mkdynamic! - Correct the maximum output tokens for Claude Opus 4.6, 4.7, 4.8 and Sonnet 4.6.

These models were grouped with the 4.5 family at 64000 output tokens, half of the 128000 the API actually allows, so requests defaulted to a cap far below the model's real limit. The 4.5 models keep 64000, which is correct for them. - Updated dependencies [2695168, 6310a8c, c2071b1, 7aff81a, a1d4057, abf77b0, 6c60375, 22f4897, 615d1d5, 3a86757, f4a9762, 0bcf6ed, ba9cb63, 42c810d, 1416ccd, 08d0d39, 548908a, 4b3460d, d170596, aea89d0, deed5fb]: - effect@4.0.0-beta.106

4.0.0-beta.105

Patch Changes

4.0.0-beta.104

Patch Changes

4.0.0-beta.103

Patch Changes

4.0.0-beta.102

Patch Changes

  • #6608 0e50ec7 Thanks @gcanti! - Add Schema.Natural for non-negative safe integers and use canonical Schema.Int, Schema.Finite, and Schema.Natural schemas 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.

4.0.0-beta.101

Patch Changes

4.0.0-beta.100

Patch Changes

4.0.0-beta.99

Patch Changes

  • #6371 7543afe Thanks @polRk! - Fix client-executed provider tools (Memory, Text Editor, Computer Use, Bash) which were unusable on the wire.
    • makeResponse (and the streaming equivalents) now map a provider tool_use wire name (e.g. "memory") back to the tool's custom name (e.g. "AnthropicMemory") that the toolkit is keyed by, instead of raising ToolNotFoundError.
    • AnthropicTool.MemoryCreateCommand now includes the required file_text field, so a create command no longer drops the file body.
    • Optional parameters on client-executed provider tools now use Schema.optionalKey instead of Schema.optional, which the Anthropic codec rejected with "Unsupported AST Undefined": Memory/TextEditor view_range, ComputerUse coordinate, and Bash restart.

Closes #2615.

4.0.0-beta.98

Patch Changes

4.0.0-beta.97

Patch Changes

  • #2568 97a4138 Thanks @K-Mistele! - Widen the Anthropic Model schema to accept both known model identifiers as well as any string to allow for newer models
  • Updated dependencies []:

4.0.0-beta.96

Patch Changes

4.0.0-beta.95

Patch Changes

  • #2531 bdca354 Thanks @polRk! - Fix Memory_20250818 provider-defined tool missing requiresHandler: true. Like the other client-executed tools (TextEditor_20250728, Bash_2025*, ComputerUse_2025*), the memory tool requires the application to implement its execution (view/create/str_replace/insert/delete/rename over /memories/*). Without this flag, Tool.HandlersFor excluded it from the required handlers, making it impossible to type-check a handler for Memory_20250818 in Toolkit.toLayer.

  • 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

4.0.0-beta.91

Patch Changes

4.0.0-beta.90

Patch Changes

4.0.0-beta.89

Patch Changes

4.0.0-beta.88

Patch Changes

  • #2450 7b8a549 Thanks @DomiR! - Fix non-streaming Anthropic responses throwing when a tool call carries caller metadata. The mapper emitted caller.toolId: undefined, but ProviderMetadata is Record(String, NullOr(Json)) and undefined is not a valid Json value, so decoding the model's own response threw Expected JSON value. Emit null instead, matching the streaming mappers.

  • Updated dependencies [911f1b8, 8beeeea, c306fcf]:

4.0.0-beta.87

Patch Changes

4.0.0-beta.86

Patch Changes

4.0.0-beta.85

Patch Changes

4.0.0-beta.84

Patch Changes

4.0.0-beta.83

Patch Changes

4.0.0-beta.82

Patch Changes

4.0.0-beta.81

Patch Changes

4.0.0-beta.80

Patch Changes

4.0.0-beta.79

Patch Changes

  • #2357 3efe308 Thanks @jbmusso! - Mark the Claude 4-6 generation as supporting native structured output in getModelCapabilities. claude-opus-4-6 and claude-sonnet-4-6 support Anthropic's constrained-decoding structured output (verified against the live API), but were classified as supportsStructuredOutput: false, so generateObject fell back to a forced JSON tool instead of requesting output_config.format (json_schema). claude-opus-4-7 / claude-opus-4-8 are classified the same way for when the generated Model enum picks them up.

  • 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

4.0.0-beta.74

Patch Changes

4.0.0-beta.73

Patch Changes

4.0.0-beta.72

Patch Changes

4.0.0-beta.71

Patch Changes

4.0.0-beta.70

Patch Changes

4.0.0-beta.69

Patch Changes

4.0.0-beta.68

Patch Changes

4.0.0-beta.67

Patch Changes

4.0.0-beta.66

Patch Changes

4.0.0-beta.65

Patch Changes

4.0.0-beta.64

Patch Changes

4.0.0-beta.63

Patch Changes

4.0.0-beta.62

Patch Changes

4.0.0-beta.61

Patch Changes

4.0.0-beta.60

Patch Changes

4.0.0-beta.59

Patch Changes

4.0.0-beta.58

Patch Changes

4.0.0-beta.57

Patch Changes

4.0.0-beta.56

Patch Changes

4.0.0-beta.55

Patch Changes

4.0.0-beta.54

Patch Changes

4.0.0-beta.53

Patch Changes

4.0.0-beta.52

Patch Changes

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

4.0.0-beta.45

Patch Changes

4.0.0-beta.44

Patch Changes

4.0.0-beta.43

Patch Changes

4.0.0-beta.42

Patch Changes

4.0.0-beta.41

Patch Changes

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

4.0.0-beta.36

Patch Changes

4.0.0-beta.35

Patch Changes

4.0.0-beta.34

Patch Changes

4.0.0-beta.33

Patch Changes

4.0.0-beta.32

Patch Changes

4.0.0-beta.31

Patch Changes

4.0.0-beta.30

Patch Changes

4.0.0-beta.29

Patch Changes

4.0.0-beta.28

Patch Changes

4.0.0-beta.27

Patch Changes

4.0.0-beta.26

Patch Changes

4.0.0-beta.25

Patch Changes

4.0.0-beta.24

Patch Changes

4.0.0-beta.23

Patch Changes

4.0.0-beta.22

Patch Changes

4.0.0-beta.21

Patch Changes

4.0.0-beta.20

Patch Changes

4.0.0-beta.19

Patch Changes

4.0.0-beta.18

Patch Changes

4.0.0-beta.17

Patch Changes

4.0.0-beta.16

Patch Changes

4.0.0-beta.15

Patch Changes

4.0.0-beta.14

Patch Changes

4.0.0-beta.13

Patch Changes

4.0.0-beta.12

Patch Changes

4.0.0-beta.11

Patch Changes

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

4.0.0-beta.6

Patch Changes

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