import * as LanguageModel from "@effect/ai/LanguageModel"; import * as AiModel from "@effect/ai/Model"; import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import type { Simplify } from "effect/Types"; import type * as Generated from "./Generated.js"; import { OpenRouterClient } from "./OpenRouterClient.js"; declare const Config_base: Context.TagClass; /** * @since 1.0.0 * @category Context */ export declare class Config extends Config_base { /** * @since 1.0.0 */ static readonly getOrUndefined: Effect.Effect; } /** * @since 1.0.0 */ export declare namespace Config { /** * @since 1.0.0 * @category Configuration */ interface Service extends Simplify>> { } } /** * @since 1.0.0 * @category Provider Metadata */ export type OpenRouterReasoningInfo = { readonly type: "reasoning"; readonly signature: string | undefined; } | { readonly type: "encrypted_reasoning"; readonly format: typeof Generated.ReasoningDetailSummary.Type["format"]; readonly redactedData: string; }; /** * @since 1.0.0 * @category Provider Options */ declare module "@effect/ai/Prompt" { interface SystemMessageOptions extends ProviderOptions { readonly openrouter?: { /** * A breakpoint which marks the end of reusable content eligible for caching. */ readonly cacheControl?: typeof Generated.CacheControlEphemeral.Encoded | undefined; } | undefined; } interface UserMessageOptions extends ProviderOptions { readonly openrouter?: { /** * A breakpoint which marks the end of reusable content eligible for caching. */ readonly cacheControl?: typeof Generated.CacheControlEphemeral.Encoded | undefined; } | undefined; } interface AssistantMessageOptions extends ProviderOptions { readonly openrouter?: { /** * A breakpoint which marks the end of reusable content eligible for caching. */ readonly cacheControl?: typeof Generated.CacheControlEphemeral.Encoded | undefined; } | undefined; } interface ToolMessageOptions extends ProviderOptions { readonly openrouter?: { /** * A breakpoint which marks the end of reusable content eligible for caching. */ readonly cacheControl?: typeof Generated.CacheControlEphemeral.Encoded | undefined; } | undefined; } interface TextPartOptions extends ProviderOptions { readonly openrouter?: { /** * A breakpoint which marks the end of reusable content eligible for caching. */ readonly cacheControl?: typeof Generated.CacheControlEphemeral.Encoded | undefined; } | undefined; } interface ReasoningPartOptions extends ProviderOptions { readonly openrouter?: { /** * A breakpoint which marks the end of reusable content eligible for caching. */ readonly cacheControl?: typeof Generated.CacheControlEphemeral.Encoded | undefined; } | undefined; } interface FilePartOptions extends ProviderOptions { readonly openrouter?: { /** * The name to give to the file. Will be prioritized over the file name * associated with the file part, if present. */ readonly fileName?: string | undefined; /** * A breakpoint which marks the end of reusable content eligible for caching. */ readonly cacheControl?: typeof Generated.CacheControlEphemeral.Encoded | undefined; } | undefined; } interface ToolResultPartOptions extends ProviderOptions { readonly openrouter?: { /** * A breakpoint which marks the end of reusable content eligible for caching. */ readonly cacheControl?: typeof Generated.CacheControlEphemeral.Encoded | undefined; } | undefined; } } /** * @since 1.0.0 * @category Provider Metadata */ declare module "@effect/ai/Response" { interface ReasoningPartMetadata extends ProviderMetadata { readonly openrouter?: OpenRouterReasoningInfo | undefined; } interface ReasoningStartPartMetadata extends ProviderMetadata { readonly openrouter?: OpenRouterReasoningInfo | undefined; } interface ReasoningDeltaPartMetadata extends ProviderMetadata { readonly openrouter?: OpenRouterReasoningInfo | undefined; } interface UrlSourcePartMetadata extends ProviderMetadata { readonly openrouter?: { readonly content?: string | undefined; } | undefined; } interface FinishPartMetadata extends ProviderMetadata { readonly openrouter?: { /** * The provider used to generate the response. */ readonly provider?: string | undefined; /** * Additional usage information. */ readonly usage?: { /** * The total cost of generating the response. */ readonly cost?: number | undefined; /** * Additional details about cost. */ readonly costDetails?: { readonly upstream_inference_cost?: number | undefined; } | undefined; /** * Additional details about prompt token usage. */ readonly promptTokensDetails?: { readonly audio_tokens?: number | undefined; readonly cached_tokens?: number | undefined; }; /** * Additional details about completion token usage. */ readonly completionTokensDetails?: { readonly reasoning_tokens?: number | undefined; readonly audio_tokens?: number | undefined; readonly accepted_prediction_tokens?: number | undefined; readonly rejected_prediction_tokens?: number | undefined; } | undefined; } | undefined; } | undefined; } } /** * @since 1.0.0 * @category Ai Models */ export declare const model: (model: string, config?: Omit) => AiModel.Model<"openrouter", LanguageModel.LanguageModel, OpenRouterClient>; /** * @since 1.0.0 * @category Constructors */ export declare const make: (options: { readonly model: string; readonly config?: Omit; }) => Effect.Effect; /** * @since 1.0.0 * @category Layers */ export declare const layer: (options: { readonly model: string; readonly config?: Omit; }) => Layer.Layer; /** * @since 1.0.0 * @category Configuration */ export declare const withConfigOverride: { /** * @since 1.0.0 * @category Configuration */ (config: Config.Service): (self: Effect.Effect) => Effect.Effect; /** * @since 1.0.0 * @category Configuration */ (self: Effect.Effect, config: Config.Service): Effect.Effect; }; export {}; //# sourceMappingURL=OpenRouterLanguageModel.d.ts.map