Issue with AnthropicClient Layer Configuration in Node.js Environment

Not so very urgent but maybe easy to solve or relevant:
I tried to reproduce the code from this Claude Code from Scratch with Effect
-> https://effect.website/play#c872c7a642a0

This works fine in node.
But if i want to run it in bun, how to Provide a HttpClient layer to the AntropicLayer ?

const AntropicLayer = AnthropicClient.layerConfig({
  apiKey: Config.redacted("ANTHROPIC_API_KEY"),
}).pipe(Layer.provide(NodeHttpClient.layerUndici));
YouTubeKit Langton
In this tutorial, we build a terrible version of Claude Code using the all-powerful Effect library. You’ll see how to set up an "agentic harness" (a.k.a., a while loop), connect to Claude with @effect/ai, define schema-based tools, handle multiple tool calls, and switch from safe stub handlers to fully live, “dangerous” filesystem operatio...
Claude Code from Scratch with Effect
Effect Documentation
Was this page helpful?