Package: @effect/ai-openrouter
Module: OpenRouterClient
Creates an OpenRouter client service from explicit options.
When to use
Use when you need the OpenRouter client service value inside an effect.
Details
The returned service uses the current HttpClient, prepends apiUrl or
https://openrouter.ai/api/v1, adds the bearer token and optional
HTTP-Referer and X-Title headers, accepts JSON responses, and applies
transformClient when provided.
Gotchas
Scoped OpenRouterConfig.withClientTransform applies to generated client
request methods. Streaming chat completion requests are sent directly by this
module and do not read that scoped transform.
See
layer for providing this client from explicit optionslayerConfig for loading client settings from ConfigSignature
declare const make: (options: Options) => Effect.Effect<Service, never, HttpClient.HttpClient>
Since v4.0.0