Package: @effect/ai-openrouter
Module: OpenRouterLanguageModel
Creates an OpenRouter LanguageModel service from a model identifier and
optional request defaults.
When to use
Use when you need to construct a LanguageModel.Service value backed by
OpenRouterClient inside an Effect.
Details
The returned effect requires OpenRouterClient. Request defaults from the
config option are merged with any Config service in the context, with
context values taking precedence. The service supports both generateText
and streamText.
Gotchas
Provider-defined tools are not supported by this provider integration;
requests that include them fail with an InvalidUserInputError.
See
layer for providing the service as a Layermodel for creating a model descriptor for Effect.providewithConfigOverride for scoping request defaults around operationsSignature
declare const make: (args_0: { readonly model: string; readonly config?: Omit<typeof Config.Service, "model"> | undefined; }) => Effect.Effect<LanguageModel.Service, never, OpenRouterClient>
Since v4.0.0