AnthropicConfig
The AnthropicConfig module lets a workflow temporarily customize the HTTP client used by generated Anthropic requests. It is used by AnthropicClient when request helpers run, so code can add middleware, logging, or other client changes without rebuilding the client layer.
Configuration
withClientTransform
Added in v4.0.0
Source
Signature
declare const withClientTransform: { ( transform: (client: HttpClient) => HttpClient, ): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>; <A, E, R>(self: Effect<A, E, R>, transform: (client: HttpClient) => HttpClient): Effect<A, E, R>;};Other
AnthropicConfig
Added in v4.0.0
Source
Namespace containing types associated with the AnthropicConfig service.
Services
AnthropicConfig
Added in v4.0.0
Source
Service tag for Anthropic client configuration overrides, such as transformations applied to the generated HTTP client.
When to use
Use when you need to provide or read Anthropic client configuration through Effect's context from a layer or integration.
See
withClientTransformfor scoping an HTTP client transformation
Signature
declare class AnthropicConfig extends Shape<"@effect/ai-anthropic/AnthropicConfig", Service, this> { constructor(_: never); static readonly getOrUndefined: Effect<Service | undefined>;}
Runs an effect with an
AnthropicConfigoverride that transforms the underlyingHttpClientused by generated Anthropic requests.When to use
Use when you need to apply a temporary
HttpClienttransformation, such as adding middleware or logging, to a specific scope of an effectful program.