OpenRouterLanguageModel.ts overview
Since v1.0.0
Exports Grouped by Category
Ai Models
model
Signature
declare const model: (
model: string,
config?: Omit<Config.Service, "model">
) => AiModel.Model<"openrouter", LanguageModel.LanguageModel, OpenRouterClient>
Since v1.0.0
Configuration
withConfigOverride
Signature
declare const withConfigOverride: {
(config: Config.Service): <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>
<A, E, R>(self: Effect.Effect<A, E, R>, config: Config.Service): Effect.Effect<A, E, R>
}
Since v1.0.0
Constructors
make
Signature
declare const make: (options: {
readonly model: string
readonly config?: Omit<Config.Service, "model">
}) => Effect.Effect<LanguageModel.Service, never, OpenRouterClient>
Since v1.0.0
Context
Config (class)
Signature
declare class Config
Since v1.0.0
Layers
layer
Signature
declare const layer: (options: {
readonly model: string
readonly config?: Omit<Config.Service, "model">
}) => Layer.Layer<LanguageModel.LanguageModel, never, OpenRouterClient>
Since v1.0.0
Provider Metadata
OpenRouterReasoningInfo (type alias)
Signature
type OpenRouterReasoningInfo =
| {
readonly type: "reasoning"
readonly signature: string | undefined
}
| {
readonly type: "encrypted_reasoning"
readonly format: typeof Generated.ReasoningDetailSummaryFormat.Type
readonly redactedData: string
}
Since v1.0.0
utils
Config (namespace)
Since v1.0.0
Service (interface)
Signature
export interface Service
extends Simplify<
Partial<
Omit<
typeof Generated.ChatCompletionCreateParams.Encoded,
"messages" | "response_format" | "tools" | "tool_choice" | "stream"
>
>
> {}
Since v1.0.0